A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Need AS for button to go to another scene

  1. #1
    flash addict
    Join Date
    Jun 2003
    Posts
    136

    Need AS for button to go to another scene

    hi,

    I am using Flash MX 2004 and I need to know the actionscript for getting a new scene to play upon the release of a button.

    this site gives an idea of what i want to happen...

    http://sixstation.com

    keep in mind though-i need to know how to get any scene i want to play, not just the next scene because the buttons are being used for navigational purposes meaning visitors to my site may not always want to go to the next scene.

    many thanks in advance to any one who could give me solution to this~

    p.s. i actually did search for tutorial on this but not much luck with the results.
    ~"Flash is soooooooooooo flashy!"

  2. #2

  3. #3

  4. #4
    flash addict
    Join Date
    Jun 2003
    Posts
    136

    thanks but i think everyone missed the point

    Thank you, but I think everyone missed what I am trying to create. I don't want the scenes to play one after the other just like that, I want to be able to click a button and on that button's release, another scene play. please visit the site I mentioned if you don't understand.

    www.sixstation.com

    seems like when you click a button on his site, a new scene plays whcih contains a new movie clip and continuous sound loop.This is something like what i am going for. Remember, button, not frame on timeline.
    ~"Flash is soooooooooooo flashy!"

  5. #5
    did0bib chero's Avatar
    Join Date
    Jun 2004
    Location
    in a bar, under the sea
    Posts
    751

    Improvise:
    Don't use scene names, use frame names - make the 'labels' layer, and select any in any scene - name it in the properties pane, and then use that code on the last frame like this:

    code:
    gotoAndPlay("myFrameName");

  6. #6
    flash addict
    Join Date
    Jun 2003
    Posts
    136

    still confused

    I really appreciate your help but if anyone out there is capable of explaining all this to me step by step. I may be a "flash addict" but I still need things explained to me.

    Supposing that it might help, I have attached the flash file that I am using just to test all this stuff out. It's just a random movie clip and buttons I threw together in 3 scenes to use in order to figure this all out. But as you will see, the movie has an error window pop up when it is tested so I know I am doing something wrong.

    And like i said, I want the scene to play on release of a button(in this case the button is "greenpea") but as you can see from movie, it doesn't do that. Just see the flash file and you'll see how confused I am. And keep in mind I am using Flash MX2004.

    Thanks a million to anyone who can help.
    ~"Flash is soooooooooooo flashy!"

  7. #7
    flash addict
    Join Date
    Jun 2003
    Posts
    136
    oops forgot to attach the file. here it is.
    Attached Files Attached Files
    ~"Flash is soooooooooooo flashy!"

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Unexpected file format! Can't open your .fla.
    You'd have a better chance of getting an answer if your .fla was in a MX only format, and zipped up.

    You would have to save a copy of your MX2004 .fla, (using Save as...) and changing the Document type to MX only in the Save as... window.

    That said hope you're still not targeting a scene name...
    You should ALWAYS target a labeled frame instead...

    Label the targeted frame in the targeted scene with an unique label, add _root or _level0 to your path, and only target that labeled frame...

    on(release){
    _level0.gotoAndPlay("frame_label");
    }

    See my post in this thread for more info...

    http://www.flashkit.com/board/showth...hreadid=584159 // labels

  9. #9
    flash addict
    Join Date
    Jun 2003
    Posts
    136
    thanks a bunch for your response, oldnewbie. i did what you said and saved the file as a flash mx only file. when i did this it mentioned something about me losing unicode and actionscript 2.0 but i don't think that is a problem. anyone should still be able to get the jist of what i was doing...not to mention the jist of how confused i am.

    yeah i think i really need to be explained all this like i am three year old-i am so lost it's not funny.

    thanks a bunch for your suggestion. hope you or anyone can help me out here.
    Attached Files Attached Files
    ~"Flash is soooooooooooo flashy!"

  10. #10
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Try this...
    Attached Files Attached Files

  11. #11
    flash addict
    Join Date
    Jun 2003
    Posts
    136
    ah yes, thanks very much oldnewbie. you got it-that's what i wanted. i press the greenpea button and on it's release, another scene plays. and i see you put the actions for the button on the timeline.

    thanks again. much appreciated.

    ~peace
    ~"Flash is soooooooooooo flashy!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center