A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: I can Break anything!!!!

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    3

    I can Break anything!!!!

    Hello. I am totally perplexed as to why I can't seem to get a simple button to bring me to another Scene. I have followed tutorials (to the letter.. so I assumed anyway) to create a button and create a new scene. The button works fine but it still will not go to Scene2
    Here is the setup
    Scene1;
    layer 1 has "Text"
    layer 2 has "shape" converted to symbol (button)
    on "shape" layer in frame 1 the following action script is typed
    on (release) {
    gotoAndPlay("Scene2",1);
    }
    I know this is action script to button because in action script window it indicates Action-Button.


    I have imported to library a Quick Time Movie and converted to Movie Symbol
    Scene 2;
    layer 1 Movie (dragged onto stage)
    Frame 1 of movie in layer 2 following code in action script window is placed.
    stop();


    Now... I know the movie is OK and plays well because I had previously tested the movie symbol in Scene 1 and it loaded fine and played all the way through.

    Problem now is,On test movie, button works as it should (changes color and pays sound file on 'release') but does not go to Scene 2 and play movie symbol.

    Where have I gone wrong???

  2. #2
    An Englishman in Frankfurt Jimbrowski's Avatar
    Join Date
    Nov 2006
    Posts
    240
    May sound simple but assuming you've created a 2nd Scene, without changing the Scene's name, so the 2nd Scene's name is the default that Flash gave it....

    Also assuming that your message text contains the exact code being used...

    You should be using:

    gotoAndPlay("Scene 2");

    and not

    gotoAndPlay("Scene2",1);

    The default Scene name would be "Scene 2" (with a space) and if you're targetting the start of the Scene, you won't need to mention the 1st frame.

    If it's not that simple, please post your .fla and someone can have a squizz !!

    Jimmy

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