-
timer problem
I don’t have very much experience with Flash or actionscript. I usually follow tutorials. I’m trying to create a slideshow using actionscript that will play continuous while showing each picture for ten sec. I also want to have the ability to click a button and have it go to that selected picture. I used this tutorial http://www.actionscripts.org/tutoria...um/index.shtml that has shown me how to select a picture by clicking a button, but I can’t figure out how to do both and keep the effect.
Last edited by kurios77; 06-09-2005 at 09:31 AM.
-
Space Monkey
use setInterval to let the slideshow run automatically, and use clear interval on your buttons. don't forget to use setInterval after clearing it again so the auto-function is triggered again.
:::i am jacks complete lack of surprise:::
-
FK's Geezer Mod
I have used set and clearInterval many times in various movies, and have never had it behave right, except in the simplest movies, and then it messes up if I load that movie into another. I gave up. The simplest timer is one with enough frames in the timeline to take up the amount of time you want, and code in the last frame to make it do something. Just letting it loop triggers the last frame code every time, and you can turn it on and off at will. And, best of all, it ALWAYS works as expected.
-
would I still be able to get the same effect that I get now?
-
FK's Geezer Mod
What line of code are you using on a button to trigger your effect now? Essentially, any line of code after the on(release) line in button code can be used as frame code. Like in the last frame of that timer mc.
-
for (i=1; i<=pos.length; i++) {
_level0["the"+i+"_btn"].n = i;
_level0.info_txt.text = _level0.theInfo[0];
_level0["the"+i+"_btn"].onRelease = function() {
_level0.theTgt = _level0.pos[this.n-1]*-1;
_level0.info_txt.text = _level0.theInfo[this.n-1];
_level0.mask_mc.gotoAndStop(Math.round(Math.random ()*_level0.numOfFrames+1));
};
-
FK's Geezer Mod
Try it. Put that in the last frame of the timer movie clip. Should work. Change it to remove the onrelease line
for (i=1; i<=pos.length; i++) {
_level0["the"+i+"_btn"].n = i;
_level0.info_txt.text = _level0.theInfo[0];
_level0.theTgt = _level0.pos[this.n-1]*-1;
_level0.info_txt.text = _level0.theInfo[this.n-1];
_level0.mask_mc.gotoAndStop(Math.round(Math.random ()*_level0.numOfFrames+1));
-
Do I need to make a separate movie clip for my rotation
-
FK's Geezer Mod
You lost me. What rotation? This is just about timing. If you had it working from a button before, it ought to work from frame code.
-
no rotation. I just want it to play automaticlly, and stop when someone clicks on a button.
Last edited by kurios77; 06-09-2005 at 03:55 PM.
-
I got it to work thank you for all your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|