Setting instance names in keyframes quickly in AS3

Right now in Flash CS3 and later (using ActionScript 3), if you have the same instance that is used in several keyframes at the level, and you decide to assign or change the instance name later, you will have to go to each keyframe and set the instance name . This is a big nuisance. Is there a faster or better way to do this?

NOTE. In AS2, you can set the name using the name property in MovieClip in your code in the onLoad handler of the MovieClip class so that it runs once and for all. Unfortunately, in AS3 you are no longer allowed to set the name property.

+3
source share
6 answers

JSFL, javascript lanaguage Flash, .

  • "" > ""
  • "Flash JavaScript File"
  • script
  • , FLA .
  • " ()" JSFL script

, :

var prefix:String = "myInstance_";
for(i in fl.getDocumentDOM().selection)
{
    fl.getDocumentDOM().selection[i].name = prefix + i.toString();
}

, myInstance_1, myInstance_2 .. , , , .

( , fl.trace(), - , JSFL , , )

+6

:

  • Flash > a > (CTRL + F)
  • " "
  • ""
  • [ ]
  • , Live Edit .
  • someplace, .

:

  • " "
  • "", ""
  • ,
  • , .

! Flash IDE

+1

! ( F6 - ) .

0

, . " " .

0

( )


  • click the "Edit multiple frames"
    button, this button is located just below the time line next to the onion skin

  • change instance name

this will change your instance name for the whole frame

0
source

This extension sets the instance name for several keyframes: http://ajarproductions.com/blog/2010/03/30/set-instance-name-on-multiple-frames/

0
source

All Articles