Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

correcting actionscript - need help

Status
Not open for further replies.

TigerGirl7

Programmer
Apr 8, 2003
152
US
Hi-

I did a really stupid thing: I programmed about a hundred buttons with the following script:

on (release) {
unloadMovieNum(1);
loadMovieNum("my_clip", 1);
}
 
and...

sometimes when I post a message on this bulletin board, only part of the message gets posted ... mac thing, I think.

and...

you'll notice that I forgot to include ".swf" after "my_clip". And it so happens that I forgot to do this on about 100+ states of a button (the same button).

I think maybe this also asks another question: Can you create an action that applies a script universally to a specific button? So that every instance of "my_button" responds the same way, such as getURL, etc. without having to program each individual button?

Thanks, oldnewbie!
 
Try Edit>Find and Replace...don't know if it will work, but it has to do something.

Adam
 
Guess you'll have to hand correct them all!
Too bad you didn't use my_clip without quotes, you most probably could have just assigned a value to my_clip, on the first frame of your movie...

my_clip = "my_clip.swf";

To answer your second question, you could add a script to a number of instances, but to my knowledge, that wouldn't work on the original symbol, expecting it to assign it to all instances of itself on the stage. If that makes any sense to you. I'm not sure it does to me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top