Professional Web Applications Themes

button > graphic > movie clip gotoAndPlay - Macromedia Flash Actionscript

I have a button inside a graphic which is then inside of a movie clip (for fading). In the graphic symbol I have the following syntax applied to the button: on (release) { gotoAndPlay("Scene 1", 1); } When pressed, I want the button to play frame 1 in Scene 1. However, when pressed, the button replays the fading movie clip that happens to be in another movie clip which is then in Scene 1. It seems to me my Flash MX is flaking out because the syntax I applied is very specific and is not being processed. Can anyone tell ...

  1. #1

    Default button > graphic > movie clip gotoAndPlay

    I have a button inside a graphic which is then inside of a movie clip (for
    fading). In the graphic symbol I have the following syntax applied to the
    button:

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


    When pressed, I want the button to play frame 1 in Scene 1. However, when
    pressed, the button replays the fading movie clip that happens to be in another
    movie clip which is then in Scene 1.

    It seems to me my Flash MX is flaking out because the syntax I applied is very
    specific and is not being processed. Can anyone tell me alternate syntax I
    could apply that would accomplish what I want to do?: I want to click the
    button and have it replay the entire movie, not just the symbol.

    nineveh Guest

  2. #2

    Default Re: button > graphic > movie clip gotoAndPlay

    >I want to click the button and have it replay the entire movie,
    > not just the symbol.
    nineveh,

    Flash MX isn't flaking out on you. :) In fact, the code is doing
    exactly what you instructed. The problem here sounds like a pathing issue.
    When you tell a button to gotoAndPlay(), the button applies that instruction
    to its nearest timeline. In this case, as you described, the button is
    inside a movie clip. That makes the movie clip this button's timeline, and
    in fact, the movie clip performs the gotoAndPlay(), which makes the button
    fade.

    To make the *main* timeline go somewhere and play, you'll have to path
    to it from your button. Try

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

    As it turns out, you can omit the "Scene 1" if you like, since by
    default gotoAndPlay() will do what it says in the current scene.


    David
    stiller( at ) quip ( dot ) net


    David Stiller Guest

Similar Threads

  1. text in button in movie clip
    By Andy Petroski in forum Macromedia Flash Actionscript
    Replies: 3
    Last Post: March 1st, 06:16 PM
  2. Movie clip to button with actionscript
    By scourtaud in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 23rd, 01:52 PM
  3. button scripting a movie clip
    By Massive3215 webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 7
    Last Post: January 29th, 12:08 PM
  4. how do you get a button to function inside movie clip ?
    By RadWall webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: January 22nd, 02:31 AM
  5. Movie Clip Button
    By Thundercat webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 2
    Last Post: September 18th, 06:54 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139