Páginas: 4 (823 palabras) Publicado: 21 de noviembre de 2009

Skipping flash header animation on certain pages
Q.: How can I make a flash header play full animation on certain pages only but skip it on the rest of the pages?
A.: Inthe HTML code of our templates you'll find one of the following two blocks of code:

The 1st one (you'll find in our earlier templates):


The 2nd one:








FAIL (the browser should render some flash content, not this).

You should put a parameter into Flash with the help of one of these blocksof code.  In the .fla file there should be an ActionScript code that will accept this parameter and handle it.  To add a parameter do the following:
In the first case update the code in this way:   



In the second case update it in this way:









FAIL (the browser should render some flash content, not this).From the ActionScript code this parameter will be available as _root.par .  It means that you can use conditions like this:

if(_root.par == "skip"){

//your code here

//you usually usegotoAndStop(); or gotoAndPlay(); functions to skip a certain number of frames


In real situations you will usually incorporate this condition into the code for the preloader.  The code for thepreloader can look like this one:

onClipEvent (load)

    total = _root.getBytesTotal();


onClipEvent (enterFrame)

    loaded = _root.getBytesLoaded();

    percent =int(loaded/total*100);

    text = percent+"%";


    if ((loaded == total) && (_root.par == "skip"))

        _root.gotoAndStop(200); // usually the frame number whereanimation finishes

        } else if (loaded == total) {



I’ve tested this on Wordpress version 2.31 and above. It will not work on version...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Tareas tareas y mas tareas
  • tareas tareas
  • tareas tareas
  • Taran Taran
  • Mis tareas...Tus tareas
  • Tareas de Tareas
  • Tareas Y Tareas
  • Tareas

Conviértase en miembro formal de Buenas Tareas