A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: buttons link from scene to scene

  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    4

    buttons link from scene to scene

    Hi all,
    i have a problem in buttons while shifting the control from scene 1 to scene 2. in my project there are two scenes and in the two scenes there are two buttons. while the playing the movie, my mouse on rollover the button on scene 1 some animation happens what i created. on release go to scene 2 and after shifting the control back to scene 2 to scene 1 the button animation will automatically happens whether my mouse was not on the button hit area.
    so please do me needful and give the correct coding for that
    thank you

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    give the buttons instance names.
    do not write code on the buttons.
    write all code on the main timeline.

    when you release the button (btn1) in Scene 1, disable it -
    PHP Code:
    btn1.onRelease = function(){
    gotoAndPlay("scene2_label")
    this.enabled false// disable

    when you return to scene 1, re-enable the button -
    PHP Code:
    // frame#1 scene#1 -
    btn1.enabled true

  3. #3
    Junior Member
    Join Date
    Aug 2009
    Posts
    4
    Quote Originally Posted by a_modified_dog View Post
    give the buttons instance names.
    do not write code on the buttons.
    write all code on the main timeline.

    when you release the button (btn1) in Scene 1, disable it -
    PHP Code:
    btn1.onRelease = function(){
    gotoAndPlay("scene2_label")
    this.enabled false// disable

    when you return to scene 1, re-enable the button -
    PHP Code:
    // frame#1 scene#1 -
    btn1.enabled true
    it's not work properly in my project. so please give me the full project tutorials about a animated button from scene 1 to scene 2

  4. #4
    Junior Member
    Join Date
    Aug 2009
    Posts
    4
    Quote Originally Posted by a_modified_dog View Post
    give the buttons instance names.
    do not write code on the buttons.
    write all code on the main timeline.

    when you release the button (btn1) in Scene 1, disable it -
    PHP Code:
    btn1.onRelease = function(){
    gotoAndPlay("scene2_label")
    this.enabled false// disable

    when you return to scene 1, re-enable the button -
    PHP Code:
    // frame#1 scene#1 -
    btn1.enabled true
    it's not work properly in my project. so please give me the full project tutorials about a animated button from scene 1 to animated button scene 2 and vice versa.

  5. #5
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    as i have absolutely no idea what is involved in your project i cannot advise you

    suggest you search Google for tutorials

  6. #6
    Junior Member
    Join Date
    Aug 2009
    Posts
    4
    Quote Originally Posted by a_modified_dog View Post
    as i have absolutely no idea what is involved in your project i cannot advise you

    suggest you search Google for tutorials
    In my project, there are two scenes. in first scene only one button with some animation. in that button the link is to scene 2. in scene 2 there have one button some animation. with link to scene 1. this is my small project. because i am a trainee. my probelm is when i was run the program, for the first time the mouse rollover function was appear correct and sends the control to scene2. and scene 2 rollover function also appear correct. when i was clicking the scene 2 button it goes to scene 1. my mouse was not on the button but the animation happens( i give the animation to the button when my mouse was on rollover).

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