flash scripting question
- Started
- Last post
- 6 Responses
- CygnusZero4
Sorry im on a rush project, dont have much time to research options right now.
I have a play/pause button sitting on a main timeline. There is an animation that is broken up into 5 seperate movieclips called “section1, 2, etc...” sitting on that main timeline as well.
How do I have that play/pause button check to see which of those sections is currently playing, and if it is, stop the playhead when clicked? And of course play it when clicked again?
- dbloc0
set a variable
nowPlaying = section2
- acescence0
you can either keep track of which is playing by setting some sort of isPlaying variable when you start playing them, or alternately you can set up an onenterframe to check the currentframe, if it changes, then you know it is playing.
- CygnusZero40
I dont know much about scripting in flash, so both options above arent helping me.
Need someone to post actual code, or show me where to get it.
- fyoucher10
Are only one of the sections playing at one time or do they sometimes play simultaneously?
- CygnusZero40
The play/pause button needs to sit outside of the section movieclips which is where all the animation will take place.
I need the play/pause button to constantly look into all 5 sections, see which one is currently playing and then pause it. After that happens, I would need the play button to remember which was just paused, and start the playhead up again.
If I could put a play/pause button within each section movie clip, it would obviously be very easy for me to make it work, but I cant set it up like that on this project.
- < This is what's outside of my flash scripting knowledge.CygnusZero4
- dbloc0
if the section MCs are on separate frames, start and stop all of them because it will only start/stop the one that is available.
This will only work if it is set up this way obviously.
- They are on seperate frames. Ill give this a shot.CygnusZero4