A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [MX] Simple Button command

  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    1

    [MX] Simple Button command

    on (rollOver) {
    gotoAndPlay("Scene 1", 2);
    }

    on (rollOut) {
    gotoAndPlay("Scene 1", 11);
    }

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




    rollover & rollout works perfectly.
    only the 'going to the next scene' doesn't work.
    Is there anything I need to add on to it?


    Help very much appreciated.

  2. #2
    Senior Member
    Join Date
    Sep 2007
    Location
    UK
    Posts
    194
    I found that if you code the AS on the main timeline and not on the button itself, it seems to work.

    PHP Code:
    btn.onRelease = function(){
        
    gotoAndPlay("Scene2");


  3. #3
    Junior Member
    Join Date
    Aug 2008
    Posts
    6

    i was taught to use an actions layer

    for somethings... pertaining separate scenes and such... but basic button stuff i normally apply it to the button.

    glad it worked.

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