Preloader code in wordpress template

I used this code as a preloader on a site a made a few months ago.
I'm trying to use it again in a wordpress template using PHP and it's not working.
The movies loads, but doesn't load the main .swf??
Any ideas why this would work on one site and not another? Is it a PHP conflict?
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("ns_headermovie.swf"));
function loop(e:ProgressEvent):void{
function done(e:Event):void
    removeChildAt(0);
    addChild(l);

Hi,
Why you are using this line
removeChildAt(0);
I think to remove preloader.
I suggest you to use :-
removeChild(this.getChildByName('PreloaderName"));
Let me Know how its work

Similar Messages

  • Fluid grid for Wordpress: insert PHP code into DW or DW code into Wordpress?

    This may be a stupid question but it's a dilemma for me. Here's the problem. I want to create a mobile first, fluid grid Wordpress website in Dreamweaver CS6 based on an existing Wordpress theme. I can see two ways of doing that:
    1) Create a fluid grid layout in DW, then insert the Wordpress PHP code into the right places in DW
    Pro: the fluid grid layout is set up by DW and therefore can be easily edited with DW (I imagine)
    Con: It is beyond my coding skills to make a fully functional WP template
    2) Take an existing responsive Wordpress template with media queries and edit that in Dreamweaver
    Pro: I start with a fully functional WP template and only have to make changes (mostly in CSS) to customise it
    Con: When I start with an existing template (like Skeleton) I run into trouble using DW
    For example: I click a navigation button to get at the CSS but it's not clear to me from DW's interface in which media query I have to make changes. I did a tutorial on creating a fluid grid layout with DW so I can do that. But DW doesn't work the same way with an existing WP template like Skeleton. I searched the web but all I can find is help on creating a fluid layout with DW, not editing an existing one.
    By the way, I am experienced with HTML/CSS but not PHP and I have a local Wordpress server running on my Mac so I can work in Dreamweaver's Live View.
    The problem may be that I am only just starting with responsive web design and need some more experience with media queries, css rules and DW CS6. Could anyone comment on this problem or point me towards more information on the subject?
    TIA!

    You can certainly use DW to customize a 3rd party WP Theme.  However, you must be throughly familliar with how WordPress Themes work and have a good working knowledge of  HTML, CSS and PHP code.  Design View will not be much help to you. 
    WP Themes are a sum of their various parts:  header.php, footer,php, sidebar.php, page.php, index.php, archive.php, etc...  The web server parses code from the various parts and creates whole pages on the fly.  Once WP is deployed on your server, you cannot use DW to edit content.  You must use the WP Admin Panel (CMS) to manage content, Themes, plugins and backup data.
    For simple static sites, the FluidGrid Layout feature in DW is a nice starting point.  But these layouts have definite  limitations which, IMO would not be a good fit with WordPress.
    Nancy O.

  • Creating a WordPress Template

    Hi
    I am new to Muse. Is it possible to create a Word Press template (that can be exported and loaded via the WP Theme interface of a self hosted WP site) with Muse?
    If it is, is there any tutorials on it?

    I hope this will help anyone else who is looking for the same solution. And if anyone has better solutions please add them :-)
    I found this on The Theme Foundry site
    http://thethemefoundry.com/blog/html-wordpress/
    Convert HTML to WordPress
    by Drew Strojny on May 8, 2006      in Tutorials
    39 comments
    Updated February 2012 and now compatible with WordPress 3.3 +
    When I first decided to convert a static HTML design to WordPress I did some searching for a tutorial to help me get started with the basics. Surprisingly, I didn’t find anything that was very complete or easy to follow. For that reason I decided to write a very basic tutorial on how to convert a static HTML template into aWordPress Theme. If you are an absolute beginner at developing WordPress themes then this should help you get started. This tutorial assumes you already have a basic understanding of HTML and CSS. It also assumes you have a website built in HTML and CSS and have it ready for conversion.
    How WordPress Works
    WordPress works in a rather straightforward manner but it may seem confusing if you are completely new to the concept. WordPress relies on PHP to call ondifferent parts of your content from the database management system it stands on. For example, look in your /wp-content/themes/twentyten/ directory and open the header.php file. As you scroll through the code notice the PHP calls, they start with a <?php and end with a ?>. Look at line 37 and notice the call for your stylesheet URL:
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    This line uses PHP to look-up your stylesheet’s location from the database. This basic function of retrieving or calling some kind of data from your database and using PHP to display it in your HTML is how WordPress works. Throughout this process you will be substituting PHP for different parts of your content and your code. This will make editing easier in the long run, as you will find out. Now that you understand the basics of how WordPress works, lets get started.
    First Things First
    The first step is to create a new folder and name it whatever you want your theme to be called. Next, create two new files, style.css and index.php and place them in the folder. Believe it or not, these are the only two files you actually need for a WordPress theme. Now copy and paste the code from your original CSS file into the style.css file you just created. At the top add the following code:
    /* Theme Name: Replace with your Theme's name. Theme URI: Your Theme's URI Description: A brief description. Version: 1.0 Author: You Author URI: Your website address. */
    These comments simply help WordPress properly identify the theme. Your stylesheet is now ready to go.
    Chop It Up
    Now let’s start chopping up your HTML. Remember how we talked about WordPress using PHP to call data from your database? Well WordPress can also use PHP to call different files from within your template folder. Imagine your current HTML code chopped up into 4 (or more) different sections. For example, take a look at the layout and corresponding HTML of this page. The header comes first, followed by the content, then the sidebar, and finally the footer. Instead of keeping these 4 parts of the HTML together in one file, you are going to put each of them in their own separate file. Then call on them one by one using PHP.
    So go ahead and sort through your HTML code and place some markers in the 4 places where you plan on cutting the code into 4 separate sections.
    These next steps assume you have your page set up left to right: header, content, sidebar, footer. If your page is ordered differently you will have to switch a couple of these steps around.
    Now create 3 new files (header.php, sidebar.php, footer.php) and place them in your theme directory. Next take a look at the header.php file from the Twenty Ten theme we looked at earlier. Notice all the PHP that is used in between the <head> tags. Copy that code to your new header.php file. Now open up your original HTML file and copy the code you marked off for your header (1st section) into your new header.php file (underneath the <head> section). Save and close.
    Now open up your new index.php file. Copy the second part of your original HTML code, the content (2nd section) into your new index.php file. Save and close.
    Getting the hang of it?
    Next open up your new sidebar.php file, copy the sidebar (3rd section) of your original code into the sidebar.php file. Finally, copy the original footer (4th section) of code into your new footer.php file.
    Put It Back Together
    Your original code should now be chopped up into 4 different files (header.php, index.php, sidebar.php, footer.php). Let's put it back together using a few lines of PHP. Open up your index.php file, it should contain the HTML from the content (2nd section) of your original code. Add this line at the very top of the file:
    <?php get_header(); ?>
    Now go to the absolute bottom of your index.php file and add these two lines:
    <?php get_sidebar(); ?> <?php get_footer(); ?>
    These 3 simple lines of PHP are telling WordPress to fetch and display yourheader.php, sidebar.php, and footer.php files within your index.php file.Your code is now officially put back together. Now, if you want to edit your sidebar you can just edit your sidebar.php file, instead of sorting through yourindex.php to find it. The same goes for your header.php and yourfooter.php.
    The Loop
    Your index.php is almost finished. The final step is to insert the actual content into the code. Luckily, WordPress uses PHP for this as well. The Loop is the PHP function WordPress uses to call and display your posts from the database they are saved in. Grab this code and paste it into your new theme's index.php file (inside of whichever div you are using to hold your content).
    <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="post-header"> <div class="date"><?php the_time( 'M j y' ); ?></div> <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="author"><?php the_author(); ?></div> </div><!--end post header--> <div class="entry clear"> <?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail(); ?> <?php the_content(); ?> <?php edit_post_link(); ?> <?php wp_link_pages(); ?> </div><!--end entry--> <div class="post-footer"> <div class="comments"><?php comments_popup_link( 'Leave a Comment', '1 Comment', '% Comments' ); ?></div> </div><!--end post footer--> </div><!--end post--> <?php endwhile; /* rewind or continue if all posts have been fetched */ ?> <div class="navigation index"> <div class="alignleft"><?php next_posts_link( 'Older Entries' ); ?></div> <div class="alignright"><?php previous_posts_link( 'Newer Entries' ); ?></div> </div><!--end navigation--> <?php else : ?> <?php endif; ?>
    You just inserted a basic version of the loop into your code! WordPress will use the loop to display your posts and comments on your website.
    The End
    Now upload your theme folder to /wp-content/themes/. Then log into WordPress and activate your theme. Wasn't that easy?
    This tutorial covered the basics for converting your theme to WordPress. To further customize and enhance your theme start looking at the WordPress Codex, specifically Template Tags and Template Files. You can use template tags in your sidebar, in your header, or your footer to call menus, categories, posts, etc. As you learn more about template tags and template files you will discover the endless possibilities for customizing your new WordPress blog.

  • How can I view wordpress template in Dreamweaver

    I have some wordpress templates but can't view them in a browser since there is no index.html just php. How can I get around this and use a wordpress template as a regular dreamweaver CSS page? I don't want to load the wordpress app or the database in my server so is this possible?
    Thanks

    I don't want to load the wordpress app or the database in my server so is this possible? 
    No it is not possible because WP runs on apache server, MySql database and PhP.  If your theme is distributed by by WP then you can view it at this link:
    http://wordpress.org/extend/themes/
    Search for your theme and if it is there, you can preview it before downloading.
    Another option is to create a free blog/site at this link:
    https://en.wordpress.com/signup/
    You can then change the themes and try changing it using inline styles.  You are not allowed to upload any css files, plugins or your own themes at this link.  Even js is not allowed for security reasons.
    Hope this helps.

  • Updating sniffer code link in Template

    I have a horizontal CSS menu in a DW template that requires a
    bit of sniffer code to work properly in IE
    Below is the code in the template:
    <!--[if lt IE 8]>
    <style type="text/css" media="screen">
    #menuh{float:none;}
    body{behavior:url(../ebs/csshover.htc); font-size:100%;}
    #menuh ul li{float:left; width: 100%;}
    #menuh a{height:1%;font:bold 0.7em/1.4em arial, sans-serif;}
    </style>
    <![endif]-->
    Child pages of the template do not update the path to
    csshover.htc to create the proper relative path.
    Is there anything I can do to make this section get updated?
    Thanks,
    Jegger

    Here are seven common mistakes that will result in changes
    not propagating
    from Template to child -
    1. Rename the Templates folder
    2. Move the Templates folder to some other folder level in
    the site other
    than root level
    3. Move a template out of the Templates folder.
    4. Make changes to an editable region of the template (which
    will not
    propagate)
    5. Assume that template changes can be uploaded to the server
    without also
    uploading the changed local files
    6. Corrupt the site cache so that the link between template
    and child page
    is broken
    7, Improperly create your child pages by simply opening the
    template,
    adding page specific content, and resaving the template with
    an *.html
    extension rather that its *.dwt extension. (you can tell if
    this is the case
    by looking at the code on a child page - if you see anything
    like <!--
    TemplateBeginEditable... then this is what you have done)
    The 6th problem can be repaired by using SITE | Advanced >
    Recreate Site
    Cache, and the six others can be fixed by just not doing
    them. Have you
    done any of those?
    Or, read this -
    http://www.adobe.com/go/dd83ba8b
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "mmazza" <[email protected]> wrote in
    message
    news:fnnjsf$bfs$[email protected]..
    >I have an email link in my site's template that when I
    change the links
    >properties, it doesn't update on the linked pages. Any
    suggestions?

  • Code added to template not working after publishing

    We want to track the usage and see who is hitting the pages and where they are hitting them from. A developer at our company who wrote some code for us to be able to do this using an includes file. When we place the code directly into the HTM page using notepad (after publishing) it works fine. When we put the code into the template (.HTT) and then publish it, that code does not appear in the published page.
    Is there a setting in the template that would not let us throw a line of code for a server side include in the RoboHelp WYSIWYG editor? Or how do you add such code to the template and have it pull into every page it displays?
    Using RH8, publishing WebHelp and not using RH Server.
    Thanks.

    This question is related to webhelp, not Microsoft HTML Help (CHMs) so I have moved it.
    See www.grainge.org for RoboHelp and Authoring tips
    Follow me @petergrainge

  • BI Publisher pcl codes in rtf template

    Hi all,
    I am using Oracle Business Intelligence 11.1.1.6.9, with oracle database 11G on windows server 2008. I have need to embed pcl commands in rtf templates for printing purposes, but not sure how to do that.
    Only thing I found was PCL codes for use when check printing, but also a sentence saying that other pcl commands may work.
    There are two things I need if possible - on runtime, depending on value of a filed to change font color (let us say that signature must be sometimes red, sometimes green (font color) in same document), and other is if there is a option for "highlight" saying printer from which ink to print picture (let us suppose that original image is black, but for large xerox printers with black + one color  you say use that other color).
    PCL printer I try to use for now is on HP laserjet MFP 375 pcl printer, with pcl5 and pcl6 drivers installed.
    Should I use in rtf field or can I type these codes in text like xsl commands?
    Do I have to use {{beginPCL}}  and {{EndPCL}}?
    Is it enought to use escape sequences like this? <pcl><control><esc/>&l2S</control></pcl>
    Thanks and greetings
    Mario

    Hey Vijay,
    You cannot query in RTF using select :)..
    You have to mess/play with RDF to do it ;)
    Oh wait, did i say , we cannot in RTF, we can , but that is difficult approach to go with., keep this as an end of the world option.

  • Need HTML code to call template from an existing web template

    Hi all,
    Can someone help me with a HTML code which can call another web template from a field of a table.
    I have a web template which includes table as web item.The template when executed displays the data of query view in the form of table.One of the field in the table is Europe.Now my requirement is when i click on that field Europe,it should open up another template which is present in the system.
    Please provide me with a HTML code which can do this.
    Regards,
    Suchitra

    Hi all,
    Can someone help me with a HTML code which can call another web template from a field of a table.
    I have a web template which includes table as web item.The template when executed displays the data of query view in the form of table.One of the field in the table is Europe.Now my requirement is when i click on that field Europe,it should open up another template which is present in the system.
    Please provide me with a HTML code which can do this.
    Regards,
    Suchitra

  • How to write HTML code in Web Template for selection screen

    Hello All,
    Is it possible to write a html code in the web template html tag so that the output of the html is displayed in the selection screen, i.e before the execution of query.
    I know that we can write html, which will be displayed once the query has been executed, but can it be done for selection screen.
    if so, how.
    My exact requirement is : to display a 2-3 lines of text in the selection criteria screen - sort of, various options available to user for entering values in the selection screen.  I was thinking of putting this text using HTML code in the selection screen.
    Regards,
    Nagendra.

    Hi Erick,
    No, unfortunately nobody replied to this thread. So i assumed it is not possible to modify the selection screen thru html code.
    Btw, as my requirement was to provide user with multiple answers on the selection screen. I did the validations on customer exit and popped an errror dialog when applicable.
    Regards,
    Nagendra.

  • Preloader Code: Error 1061

    I bought a preloader on Flashden.com and it didn't come with much instruction.
    Here is what I have done:
    My index file has my timeline with actions, preloader, and then my movie clips for my opening page. I have placed my preloader movieclip in frame 1 and it ends on frame 2. In frame one on the actions layer I have stop();
    I then have all of my movie clips on frame 3 with my actions for my movieclips on frame three. I added a name to frame 3 named index
    My preloader movieclip has this code:
    stop();
    this.addEventListener(Event.ENTER_FRAME, loading);
    function loading(evt:Event):void
        var percentageLoaded:Number = Math.round(this.stage.loaderInfo.bytesLoaded/ this.stage.loaderInfo.bytesTotal*100);
         this.loaderInformation.loadingtxt.text = "Loading "+percentageLoaded+"%";
        if(percentageLoaded>=100)
            this.removeEventListener(Event.ENTER_FRAME, loading);
            this.parent.gotoAndPlay("index");
    When I test the file I get a 1061 Error saying Call to a possibly undefined method gotoAndPlay through a refernece with static type flash.disply:DisplayObjectContainer.
    Any ideas on what I can do to correct this? I contacted the person I purchased it from but have not heard back yet.
    Thank you!
    Mariah Danielsen

    Try casting the parent as a MovieClip...
           MovieClip(this.parent).gotoAndPlay("index");

  • Multiple compnay codes--Blue print template

    Hi Guys,
    I need a Business Blue Print Template with Multiple Company codes,for Reference.Please send the documet to [email protected]
    thanks in advance and points will be assigned..
    suresh

    Hi Suresh,
    When you create a G/L account it is possible to fill in the field  Alternative account number (see the help).
    When you want you can assign this to the countries own chart of account and report on this.
    In this case I advise you to use one chart of accounts and use Alternative account number for reporting by country.
    Now it is possible to use one controling area. This is use-full when you want to make total reports over the company codes.
    In controlling you store document currency, company currency and controlling area currency. It is possible to use paralel currencies.
    When you are doing settlement to an other companie code's it will create an inter company posting. But it is possible with the exchange rates that you have results you don't want
    Paul
    Alternative account number in company code
    The alternative account number field in the company code area is freely definable. You could use it to enter:
    the account number from your legacy system or
    the account number from a country chart of accounts if your corporate group uses a standard chart of accounts.
    The alternative account number is only issued in the financial statement if you explicitly assign it to the relevant items in the financial statement version.

  • Where is the code for html template stored on the server

    I would like to make changes to the html template source code, mainly to update the hard coded server name in it.
    Instead of doing one by one in portal builder, I would like to search for all on the server.
    Can someone tell me where are they stored?
    Thanks.

    wow!
    well, if you wish to do it programmatically, you will have something generic to search and replace (like the hardcoded servername as you said). that will not be sitting in any variable to go and edit. in other words, you wanna edit an uncategorized content value so it will be a job to search and find it in a general text attribute/field value. it will be a pain.
    one method could be to write a script (shell, nt, csh, sh, or simply sed) to make all of those generic changes in any template content. now copy and paste all items out in a temp file, run the script, and paste back the output to the template.
    however, if you're determined to modify uncategorized content using APIs, you might wanna try this:
    Look into wwsbr_api.set_attribute and look for wwsbr_api.ATTRIBUTE_ITEM_TEMPLATE to focus on the template you have. It might work out. more on it is here.
    hope that helps!

  • Preloader for External file Template question

    I used the CS5 Flash templates>sample files>preloader for external file, to create my preloader.
    The problem is that when the preloader is done and my SWF is loaded, my SWF has already started playing.
    It is an animation that builds for 200 frames then buttons appear. By the time the SWF appears it has already gotten to the button frame.
    Depending on connection speed I have caught the animation building.
    Is there some action script I should put in my preloader or the first frame of my SWF to pause play?
    Here is the preloader action:
    var contentLoader:Loader;
    loadContent("stage002.swf");
    function loadContent(url:String):void {
        contentLoader = new Loader();
        contentLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
        contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);
        contentLoader.load(new URLRequest(url));
    function contentLoaded(evt:Event):void {
        //Optionally change to a clip holder and set progressbar visibility.
        addChild(contentLoader);
    function loading(evt:ProgressEvent):void {
        var loaded:Number = evt.bytesLoaded / evt.bytesTotal;
        setBarProgress(loaded);
    function setBarProgress(value:Number) {
        progressbar.bar.scaleX = value;
    Thanks in advance!

    put a stop() on the first frame of your external swf in an otherwise empty first frame.  when preloading is complete apply a play() to your loader's content cast as a movieclip:
    function contentLoaded(evt:Event):void {
        //Optionally change to a clip holder and set progressbar visibility.
        addChild(contentLoader);
    MovieClip(contentLoader.content).play();

  • Preloader code

    I'm using the code from this tutorial for a preloader.  Though I am not using a dynamic text field like the tutorial says.
    I took the line referring to the dynamic text field out of the code, but it's still not working?
    The animation has 2 frames with movie clips in each. One for the preloader and one for the main content.
    Do I need to put somekind of stop or non-looping code in here so it doesn't go back to frame 1(preloader)??
    http://schoolofflash.com/blog/2008/04/flash-cs3-tutorial-actionscript-3-preloader/
    this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
    this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
    function onProgress(e:ProgressEvent):void
        var loaded:Number = e.target.bytesLoaded;
        var total:Number = e.target.bytesTotal;
        var pct:Number = loaded/total;
        loader_mc.scaleX = pct;
    function onComplete(e:Event):void
        nextFrame();

    You would do well to have stop(); commands in both frames, though I believe nextFrame() includes a stop action in its landing procedure.
    You might want to consider an alternative approach for a preloader design.  Here's a link to another tutorial...
    http://www.gotoandlearn.com/play?id=85

  • Php session Code and Dreamweaver Template

    I have a page that I created in dreamweaver.  It's a php page that has sessions, the file is from a Dreamweaver template that I created and am using.  However, when I update the master template file, the items before the Doctype keeps erasing.
    I have some php includes that are useful for post variables.  How can I tell dw not to delete those sections.  I can't create an editable region before the head? Is there a way?
    Thanks for you help.
    Sample Code:
    <?php
              include ("./includes/file1.inc");
              session_start();
              if(isset($_SESSION['code'])){
                        header("location:rsvp_file2.php");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    I'm not clear in what you are saying?
    Are you saying you want to insert this block of php code on all the pages made from the master template file but when you insert it into the master template file and save the file the block of php code does not appear on any of the page made from the template?
    If that is the case then  do a 'find and replace' Find>Find and Replace. Find the doctype:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    and replace it in all the pages with:
    <?php
              include ("./includes/file1.inc");
              session_start();
              if(isset($_SESSION['code'])){
                        header("location:rsvp_file2.php");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Maybe you are looking for