button controlling movie

  • buzzby_247
  • Beginner
  • Beginner
  • buzzby_247
  • Posts: 46

Post 3+ Months Ago

i would like to control a movie via a button. my movie is made of over 100 frames (swish animation exported to flash) i want a button that will stop the movie at the frame that i desire. eg my button is on frames 10 - 20. in that time i want to be able to press the button to make the movie stop at a particular frame, say frame 35. how do i do that?

basically i want a button to stop the movie at a given frame. the movie has to play until it reaches that frame then stop. so if the button on frames 10 - 20 is pressed, it will play until it reaches frame 35 then stop.
  • ryanbutler
  • Student
  • Student
  • ryanbutler
  • Posts: 86
  • Loc: Springfield, MO

Post 3+ Months Ago

Perhaps I making this too simplistic, but I would think from your explanation that you could direct your playhead with the button click to frame 35, then on frame 35, in the stops layers, place a stop command.
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

U have to Use an instance name for your movie clip ( read about instance names on google !) . say u call it mc

then you can put a button ...on the _root(stage) , ang assign it an instance name as well ... say u call it btn

now go to your actionscript , ( make sure you dont have the button or the movieclip selected when you do that ) ...

Code: [ Select ]
btn.onRelease = function ()
  1. btn.onRelease = function ()
  2. {
  3. mc.gotoAndStop(35);
  4. }

so this way you are targeting the movieclip with its instance name and asking it to stop at frame 35 ...!

if u find this hard , u gotta read more about instance name and targeting your movieclips .

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 6 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-2017. Ozzu® is a registered trademark of Unmelted, LLC.