Jump to content


Photo

changing scenes with buttons


  • Please log in to reply
3 replies to this topic

#1 dacopenhagen

dacopenhagen

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 09 February 2005 - 02:30 AM

i want to make a flash file that has an "opener" of sorta and plays a video in the background and then two buttons are on top. i have that down. but now i want those buttons to take me to a new scene. under tutorials it tells you how to do this, but it's giving me this error.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: Left side of assignment operator must be variable or property.
goScene_btn.onRelease(click) = function (){

Total ActionScript Errors: 1 Reported Errors: 1

what does this mean? my button is named button and the incident is Scene_btn what's going on, if you have a simple sample flash file you could make and e-mail me that'd be awesome. i just want a button on scene 1 that moves me to scene 2. e-mail - brandon_copley@hotmail.com it's more of an animated video. where it plays a "video" presenting something, and then the buttons are there for you to move around. aka - intro page with 3 buttons a b and c a takes you to video A b takes you to video B and C takes you to video C, think intro page at homestarrunner really simple i'd think

#2 CoryMathews

CoryMathews

    P2L Jedi

  • Members
  • PipPipPip
  • 554 posts
  • Gender:Male
  • Location:Texas

Posted 20 March 2005 - 05:01 AM

ok this is the code you need to have on a button. i dont know where u got all that from but here is a simple version of that mess.

on (press) {
gotoAndPlay("scene 2", 1);
}

it simply means when you press on this button i want you to go and play "scene 2" (you type the name of the destination scene in quotes) and frame 1 of that scene.

if you have mx or mx2004 when you type gotoAndPlay( a hint should appear) and if you hit over on the arrow it will change to scene and frame.

Hope this helps

#3 PizdusInc

PizdusInc

    Young Padawan

  • Members
  • Pip
  • 37 posts
  • Gender:Male
  • Location:Southern California

Posted 25 March 2005 - 11:02 AM

You can also use frame labels for easy navigation between scenes and different parts of your movie. This gives you the flexibiliby of naming your parts of the movie for easy reference.

This can be accomplished by clicking on a frame in your time line, then in your property inspector typing in a name under frame ("Frame Label"). Then just reference the name in your script. For example, say you add a frame label in the first frame of each video scene and name them "video1", "video2", "video3." Then in your button script you would put:

on(press) {
gotoAndPlay("video2"); (or whichever label you choose)
}

You could do CoryMathews suggested as well, but I guess it all depends on what you are most comfortable with. :angry:

#4 CoryMathews

CoryMathews

    P2L Jedi

  • Members
  • PipPipPip
  • 554 posts
  • Gender:Male
  • Location:Texas

Posted 27 March 2005 - 08:17 PM

ye they both work. not either one better then the other.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users