go to action script on a movie symbol and not a button

  • wolf woman
  • Born
  • Born
  • wolf woman
  • Posts: 2
  • Loc: London, UK

Post 3+ Months Ago

Good morning everyone...hope the easter bunny came your way.

I have managed to create a small movie symbol to replicate a button that once clicks stays a different colour...the problem is now I cannot get this movie symbol to now go to a selected frame.

I have tried using the go to frame command but it does not work.
I have tried placing an invisible button over the top and placing the actionscript on this.....this works but the button symbol underneath no longer works.

Any help would be most appreciated....

I wait with bated breath....

Wolf Woman
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • stev_ro
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: ro

Post 3+ Months Ago

You can't use the gotoAndStop(); command on a movieclip. The
on(release,press,etc) only works with btns. And if you need to change your btn colour when you rollover him you can change it by editing the btn(if you double click on your btn you will enter inside him...and in your timeline you will see that will appear 4 frames with the names: Up,Over,Down,Hit. On the down frame place a keyframe and change the colour of your btn, and test the movie)

I hope that I understood your question corectly.
  • wolf woman
  • Born
  • Born
  • wolf woman
  • Posts: 2
  • Loc: London, UK

Post 3+ Months Ago

Thankyou for your help.

I want a button that stays a different colour once hit .....as in a conventional html button where you can assign a different colour if the page has been viewed.

I was lucky enough to find an alternative here ....making a movie and assigning keyframes for over, hit etc. and this does work....once it is clicks it stays as assigned in the hit frame.

The problem is I now cannot make this movie (actng as a button) go to where I want to go..namely a specific keyframe in the main movie. It has been saved as a movie symbol.

What action code would I assign to it to enable it to go to a specific frame.

Many thanks.
  • stev_ro
  • Beginner
  • Beginner
  • User avatar
  • Posts: 61
  • Loc: ro

Post 3+ Months Ago

As I mentioned before...you CAN'T place the on(Release){gotoAndStop();} command to a movieclip. This command only works for btns. Try to create an invisible btn inside your movieclip, and atach the script to the invisible btn.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

yes, up to Flash Player 5, on(release) doesn't work for movieclips.
But all the version > 5 a movieclip can have the same methods as a button. on(release), on(press) ... etc.
So, you can either place the action on the movieclip using: on(release) { // do something } or you can place the action in a keyframe where your movieclip exists: myMCInstance.onRelease = function() { // do something }
  • supermatt22
  • Novice
  • Novice
  • supermatt22
  • Posts: 22

Post 3+ Months Ago

I just found out about this myself,
try this:

on(release){
_root.gotoAndPlay(2)
}
  • supermatt22
  • Novice
  • Novice
  • supermatt22
  • Posts: 22

Post 3+ Months Ago

forgot to mention, in the above script, (2) frame two was where I wanted the movie to go to - I'm sure you figured that out.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 26 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.