I am loading into a container MC multiple .swf’s (QT videos compressed to SWF with Sorenson). I am able to the loadmovie and control its playback. However the SWF once “played” will loop until I press a “stop” button.
How can I get it to play once and stop.
I have looked all over and can’t find a workable solution.
I am familiar with the "add a stop () but…How do you do that to a swf file? The loaded swf’s were created from Quicktime movies compressed by Sorenson. How can you add a stop() to this file? I dont’ think you can except with Flix.
Is there another way? The call is to the external swf’s to load into a empty containerMC. I built a video controller play/stop/rewind forward etc that sits at _root. It controls the loaded movie.
Well, yeah, the idea would be to have a controller clip that will check if the movie is playing its last frame. If it is the case, then you stop it. The code would be something like this:
if (containerMC._currentFrame==containerMC._totalframes) containerMC.stop();
Still can’t get it to work here is the code on the button to loadmovie.
Should the “trace” and 'if" go somewhere else?
Confused but appreciative for all your help!
code:--------------------------------------------------------------------------------
on (press) {
_root.HOME_TVFAMILY_MOV.redMC2.loadmovie(“kswf.swf”, _root.redMC2);
trace (_root.redMC2._totalframes);
}
on (release) {
if (_root.HOME_TVFAMILY_MOV.redMC2._currentFrame == _root.HOME_TVFAMILY_MOV.redMC2._totalframes)
_root.HOME_TVFAMILY_MOV.redMC2.stop(“kswf.swf”, _root.redMC2);
}
Well I am thinking if you want the movie to just play once through, the code would go on a frame, not on a button.
And the trace isn’t required, that is just a preview in Flash thing, it pops up the output window with whatever you are asking it to display. It comes in handy A LOT later on (if you get into AS that is).
What frame?
The video source in a short film trasferred to QT compressed and converted to SWF. There is no original FLA.
It seem strange I can control all other aspects of the SWF:
Start stop nextFrame, prevFrame, play…but not be able to tell it to play once or to play and gotostop (1)
*Originally posted by ilyaslamasse *
**Well, yeah, the idea would be to have a controller clip that will check if the movie is playing its last frame. If it is the case, then you stop it. The code would be something like this:
if (containerMC._currentFrame==containerMC._totalframes) containerMC.stop();
But I have no idea if this can work :-\ **
After seeing that, makes total sense to me. But unlikely I would go there by my own.
Yes, but when you load a .swf file into Flash, it too converts that to frames.
So Ilyas’ method in theory should work.
But you have to put it on a frame on the timeline. You will have to right click on the frame you want your movie to load one, open up the actions panel, then apply Ilyas’ code to that frame.
Unfortunely it does not. However other programs do… like Flix . Considering getting it. Just thought it could be elegantly solved with an actionScript solution.
Baffled
Should the solution fall on the video control button? PLAY?
:q: