Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-07-2012, 12:41 PM   #1
Registered User
Join Date: Apr 2008
Posts: 2
Default gotoanplay set number of frames


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.

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

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

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 08:01 AM.

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.