dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Please help i'm going mad

  1. #1
    vidiveni
    Join Date
    Dec 2000
    Posts
    77

    Please help i'm going mad

    Simple scene with a button that when pressed moves onto the next frame in the scene.

    I attached actionscript to button as follows but I can't make it work.

    on (press, release) {
    gotoAndPlay(16);
    }

    What am I doing wrong ?

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    528
    on (release) {
    gotoAndStop(16);
    }

    Try removing press. Also, what exactly is happening? Is it going past 16? Do you have a stop action in 16? Are there keyframes in 16?

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    31
    take the "press" off

  4. #4
    vidiveni
    Join Date
    Dec 2000
    Posts
    77
    removed the "press" and still sits at frame 15 and won't go any further! I have a stop on frame 15 as well.

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Posts
    528
    can you paste your button code and tell me what is in 16? Is there a key frame there? Also, are you sure you are putting this on the button and not the frame? Easy to get those mixed up.

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It can be either "press" or "release"...

    Is this button in a movie clip?

    Have you tried with _root?

    on (press) {
    _root.gotoAndStop(16);
    }

  7. #7
    vidiveni
    Join Date
    Dec 2000
    Posts
    77

    Chieffan

    on (release) {
    gotoAndPlay("Scene 1", 16);
    }

    In frame 16 there are several key frames but with no actions script.

    The action is attached to the button not the frame.

  8. #8
    Senior Member
    Join Date
    Apr 2001
    Posts
    528
    Have you tried putting a stop action in 16? Is it possible the movie is playing through to 15 again? How many scenes do you have?

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    How can there be several keyframes in one frame? You mean several keyframes following frame 16?

    Use _root and a frame label. Label frame 16 with an unique label such as frame16, and target that frame label:

    on (release) {
    _root.gotoAndPlay("frame16");
    }

  10. #10
    vidiveni
    Join Date
    Dec 2000
    Posts
    77

    Try agan after the weekend.

    The movie is only 16 frames long.
    On a layer on frame 15 there is a stop statment.
    On a button (Pill) there is the following code

    on (release) {
    gotoAndPlay("Scene 1", "Nexttxt");
    }

    Frame 16 on a layer has a label of Nexttxt

    When you press the Pill button it don't go anywhere ?

    There are lots of layers and many key frames on 15 and 16

  11. #11
    Senior Member
    Join Date
    Apr 2001
    Posts
    528
    ok, let's try again.

    Why do you not have a stop action in frame 16? even if your button did work, you would go to the start of the movie. Flash does not automatically stop at the last frame. So either put a stop action or make your button gotoandStop.

    How many scenes do you have? If you just have one scene, you do not need to reference the scene. Just do like oldnewbie showed you in his/her post.

    What do you mean when you say you have several keyframes in frame 15? You can only have one keyframe per movie. Do you have your button in a movie clip perhaps? Again, oldnewbie's code should work.

    Can you make your movie downloadable from your website?

  12. #12
    vidiveni
    Join Date
    Dec 2000
    Posts
    77

    Not solved but got a solution !

    My problem with the use of the "Pill" button , MX calls it a component not a button, used a different one and seems to work ok. Anyone know how to make the "Pill" component behave like a normal button ?

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