Professional Web Applications Themes

Simple Actionscript Help Needed! GotoandPlay - Macromedia Flash Actionscript

Hello- I have a scene that stops on frame 20 (actionscript "stop();"). In that scene are 4 movie clips that make up a directional compass. Each movie clip has an actionscript that reads "gotoandplay(10);". But, it doesn't work. It never leaves frame 20. I think the movie clips are trying to go to frame 10 of the movie clip and not of the scene. So, I tried "gotoandplay("Scene 1", 10);" ... but still no go. Am I doing something wrong? What do I need to do to get an actionscript contained within a movie to do a gotoandplay for the ...

  1. #1

    Default Simple Actionscript Help Needed! GotoandPlay

    Hello-

    I have a scene that stops on frame 20 (actionscript "stop();").

    In that scene are 4 movie clips that make up a directional compass. Each movie clip has an actionscript that reads "gotoandplay(10);". But, it doesn't work. It never leaves frame 20. I think the movie clips are trying to go to frame 10 of the movie clip and not of the scene. So, I tried "gotoandplay("Scene 1", 10);" ... but still no go. Am I doing something wrong? What do I need to do to get an actionscript contained within a movie to do a gotoandplay for the scene?

    Thanks!


    sledgeweb webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Simple Actionscript Help Needed! GotoandPlay

    _root.gotoAndPlay(10);


    eonyron webforumsuser@macromedia.com Guest

  3. #3

    Default Re: Simple Actionscript Help Needed! GotoandPlay

    Thanks, works like a charm now. I thought it would be something simple...

    Thanks again,
    Sledge


    sledgeweb webforumsuser@macromedia.com Guest

  4. #4

    Default Re: Simple Actionscript Help Needed! GotoandPlay

    Also remember that gotoAndPlay(); is case sensitive. And personally I don't like to use _root.

    The reason I don't like to use it is that if later you decide to load that swf into another, well then _root will be the _root of the loader, not the loaded movie. Of course there is this new lockroot thing in 7, but I haven't used it.

    Depending where the Actionscript was I might have used _parent.gotoAndPlay(10); instead.


    Rothrock webforumsuser@macromedia.com Guest

  5. #5

    Default Re: Simple Actionscript Help Needed! GotoandPlay

    No problem sledgeweb!
    Would love to see your work seems you got a good bead on what your doing!

    And also your question is not a simple thing, just check the post above! It can become a very complicated issue. But my opinion is to never fear the dreaded _root!

    I even stand fearless using root in linux/unix!

    Mostly to my own detriment by the way, but how else am I gunna learn this craziness?


    eonyron webforumsuser@macromedia.com Guest

  6. #6

    Default Re: Simple Actionscript Help Needed! GotoandPlay

    Heh, I definitely don't have things under my belt yet. I'm a fairly decent PHP programmer, but actionscript is new to me. I just learned about the loadVars object... which I'm finding to be more useful than the loadVariables function.

    Right now I'm just doing a little multiplayer game project for myself as a learning challenge. So far, I've got player icons on a map that you can use with a directional compass. If you get close enough to another player, it will show their icon on the map - otherwise they are out of sensor range and do not appear on the map. All the player's position data is stored in a mysql database, along with their team affiliation. Their icon on the map will be one of three colors depending on their team affiliation. I'm using loadVars to load a php page and query the database, returning results to flash.

    It's nothing that amazing, but for me, it's a lot of progress already.


    sledgeweb webforumsuser@macromedia.com Guest

Similar Threads

  1. actionscript resource needed
    By furious70 in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: April 2nd, 02:05 AM
  2. simple XML usage help needed
    By pflynn02 in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: June 24th, 04:30 PM
  3. Simple Looping Stream Needed
    By Cloud 9 in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 29th, 05:41 PM
  4. Actionscript guru needed asap! Month-long project
    By maxlegend in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: February 18th, 01:16 PM
  5. Actionscript newbie: simple stop issue
    By Screenweasel webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 4
    Last Post: January 13th, 08:51 PM

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