Links

Is there any way to make different instances of a movie clip link to different urls. I cant seem to make it work. Any help would be appreciated.

Ok, I don’t and have never used Flash 5, but I will take a shot at this.

Unlike MX, Flash 5 cannot apply actions to a movie clip symbol, and I am going to assume in this case it is important your button symbol is within a movie clip symbol, otherwise you could easily just drag multiple instances of the button symbol onto the stage.

Ok, with this said open your movie clip symbol for editing.

On a frame add a variable that will hold the URL address. Lets call this “goToURL” (no quotes). Alright so on the frame we will write [AS]var goToURL;[/AS] and that will declare the variable.

Now to edit the getURL you will have to do something like this [AS]on (release){
getURL(goToURL, “_blank”);
}[/AS] and that will use the url supplied in the goToURL variable.

Now go back to the timeline that contains the movie clip symbol (the one that contains your button symbol inside of it) and right click on your movie clip symbol and open the actions panel.

Create an onClipEvent(load) command that sets the value of the goToURL inside the clip. That would go something like this… [AS]onClipEvent(load){
this.goToURL = “url to file goes here”;
}[/AS]

This sets the goToURL variable in the clip when the clip loads.

Since all of your movie clip symbols will be the same, the goToURL variable will be within each one, and all you will have to do is add the onClipEvent(load) actions with a different URL onto each clip.

In theory I think that should work :stuck_out_tongue:

this wont work i need help!

This WILL work. I think. Maybe…

Seriously, I don’t see why this wouldn’t work.

Yeah I don’t see why not either. I have never used Flash 5 so I don’t know if I am handling the variables differently, but I really don’t see how it would be different :-\