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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble loading a movie when by clicking a button 1

Status
Not open for further replies.

tippytarka

Programmer
Jul 19, 2004
115
GB
ok this is really bugging me, i'm newish to flash and i'm trying to load a movie by clicking onto a button.

by using this code the movie loads automatically...

Code:
loadMovieNum("roster_videos.swf", 1);

then if i assign the following code to a button that i've created...

Code:
on (release) {
    loadMovieNum("roster_videos.swf", 1);
}


then i get this error....

**Error** Scene=Scene 1, layer=videos, frame=80:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1

i've googled searched and searched this forum and i can't find clear instructions on how to do it ...even though i know this must be the most basic and easiest thing to do ...hence my frustration.
 
How have you placed that bit of code? In order for that second method to work, you must place the code on the button instance itself.

So you've created your button symbol, right? Then you must select that symbol on the stage, and open the Actions panel. That is where you place that piece of code.

frozenpeas
 
i'm such an a**, i spent all day tring to figure that out and then after waking up this morning and reading your post with a clear head it worked first time.

cheers frozenpeas!!!!
 
HELPPPPP!!!!

ok, so the button now works on the swf file but nothing happens when i click on it in the browser. whats happening????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top