Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-07-2012, 12:41 PM   #1
jasooon
Registered User
 
Join Date: Apr 2008
Posts: 2
Default gotoanplay set number of frames

Hi,

I am trying to find an easy way in AS2 to use gotoanplay to jump to a named frame and play a set number of frames then stop without using the stop behaviour in a key frame but using it in the AS2 code.

I have a gallery with a bunch of thumbnails to the left. I have play, back, forward and pause control buttone below the content area and have set all 24 different photos to fade in and out in succession when played all the way through.

Basically the user needs to be able to hit the play button and all the 24 images will play through one after the other, but also to have the option to click the thumbnails to go direct to the selected image and play say 20 frames and stop so showing the fade in to full image.

Any tips for the code to program the thumbnails to gotanplay say 20 frames and stop woudl be really great to see.

Many thanks for reading and if you can help.

Jas
jasooon is offline   Reply With Quote
Old 08-10-2012, 10:34 PM   #2
-:)lauri
Senior Member
 
Join Date: Aug 2008
Location: Helsinki, Finland
Posts: 1,182
Default

Make variable where to save the target frame and make also an enterframe function. Both in the frame 1. make if condition in enterframe that tests if the value of the variable and the buildin current frame property of the as2 are the same, and in the curly brackets of that if condition put stop(). Then when ever you call the gotoAndPlay() method save the target frame in the variable. Now your app should stop playing in the target frame made purely with the code instead of using timeline.

Last edited by -:)lauri; 08-10-2012 at 11:39 PM.
-:)lauri is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:02 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.