7-day free trial to lynda.com video training library.

Flash Extension: Set Instance Name on Multiple Frames

Justin | design,extensions,Flash | Tuesday, March 30th, 2010

Here’s a quick extension by request. This extension adds a command that can batch name instances in multiple frames. Just select the frames and run the command.

Download
(Compatible with Flash MX 2004 & later)
INSTANCE – multi-name.mxp

Related Topics



10 Comments »

  1. Nice. I can see this being very handy. Cheers.

    One bug I’ve encountered within Flash CS4 is this:

    The following JavaScript error(s) occured:
    At line 40 of file “INSTANCE – multi-name.jsfl”:
    TypeError: iFrame has no properties

    This is triggered every time I select keyframes within a tween. Specifically It is caused when you include the final frame of the tween. Selecting multiple keyrames within a tween works fine until you include the end frame.

    Comment by Tim — March 31, 2010 @ 10:47 pm

  2. Thanks for the details, Tim. I should be able to troubleshoot this. Look for a fix in the next few days.

    Comment by Justin — April 1, 2010 @ 5:15 am

  3. Tim, I was able to fix this error. I also corrected another minor glitch so that the command will still run on the first frame selected even if it isn’t a keyframe. Download link above has the new version (1.0.1).

    Comment by Justin — April 1, 2010 @ 4:25 pm

  4. Thank you for this tool I’ve always wanted. You save me lot of time and from clicking those little keyframes, then symbol, then typing a name again and again – until madness :) Maybe you can improve it a little by allowing a symbol be a button. I think, that this works:

    if(iSel.symbolType == ‘movie clip’ || iSel.symbolType == ‘button’)

    Thanx!

    Comment by Lubo — May 13, 2010 @ 12:52 pm

  5. Lubo, I’ve taken your suggestion and updated the extension. Thanks for your feedback!

    Comment by Justin — May 14, 2010 @ 8:51 pm

  6. thanks I’m currently working on a project where I have a lot of similar instances that need to be named like ball1, ball2, ball3 etc. In your function setElementNames I just added the count variable to the end of the new name

    iSel.name = instanceName+count;

    It worked like a charm. Thanks for a great extension that will save me a lot of tedious instance naming.

    Comment by mirek — May 27, 2010 @ 8:02 pm

  7. Hi Guys,

    Mirek, thats exactly what i need!

    Problem is, im not well versed in creating or modifying extensions, do you think you could upload your extension with the count added in?

    Justin, awesome extension. I wasnt aware that flash extensions were this handy until today. Keep up the awesome work!

    Comment by Haansplosion — December 6, 2010 @ 12:59 am

  8. Haansplosion,

    Thanks for the kind words. I’m glad to hear that the extensions are coming in handy!

    Here’s a modified package that appends a number: INSTANCE – multi-name-numbered.mxp. FYI: It restarts the numbering on each new frame.

    Comment by Justin — December 6, 2010 @ 2:58 am

  9. Justin,

    You are a legend. You have no idea how much that is going to help me.

    Thankyou so much, i really appreciate it!!

    Comment by Haansplosion — December 6, 2010 @ 4:23 am

  10. You’re welcome, Haansplosion. Glad I could help!

    Comment by Justin — December 6, 2010 @ 5:00 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

You may use the following html tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight=""> .

Subscribe without commenting