JohneeG
asked on
MC.play() is not working!! Help.
Hi;
This has become a very frustrating problem, and I hope someone can help me.
Here is the setup:
- I have a few external SWFs, which are comprised of flash FLV files. The first and last frame have a stop on it. I also have a "movie-end" variable which I set to true once it reaches the last frame.
- on my main timeline, I have a blank movie clip, called videoMC, which is used to load in the external video SWFs.
- To load in the movies, I've setup two frames for that. On the first frame, I have:
loadMovie("video.swf","vid eoMC");
On the second frame I have:
videoMC.play();
stop();
- I also have another movie clip on these two frames that basically checks for the "movie-end" variable, and once it realizes it is true, it will send a play() to the main timeline, to continue the movie.
So, now the wierd thing is that this works in the Flash Player (on my mac) and the windows browsers (which use the flash OCX). The problem is that it does not work in Mac browsers which use the Flash plugin!! Somehow this code is ignored by the plugin. I even went and grabbed the latest version of the flash plugin, and it still didn't work. The imported flash movies just remain paused, and the videoMC.play() function does not start the playback.
So I'm stumped. I've read the documentation and there doesn't seem to be much to using the play(); command. So what am I doing wrong, and is there a known bug? Thanks for any help.
John
This has become a very frustrating problem, and I hope someone can help me.
Here is the setup:
- I have a few external SWFs, which are comprised of flash FLV files. The first and last frame have a stop on it. I also have a "movie-end" variable which I set to true once it reaches the last frame.
- on my main timeline, I have a blank movie clip, called videoMC, which is used to load in the external video SWFs.
- To load in the movies, I've setup two frames for that. On the first frame, I have:
loadMovie("video.swf","vid
On the second frame I have:
videoMC.play();
stop();
- I also have another movie clip on these two frames that basically checks for the "movie-end" variable, and once it realizes it is true, it will send a play() to the main timeline, to continue the movie.
So, now the wierd thing is that this works in the Flash Player (on my mac) and the windows browsers (which use the flash OCX). The problem is that it does not work in Mac browsers which use the Flash plugin!! Somehow this code is ignored by the plugin. I even went and grabbed the latest version of the flash plugin, and it still didn't work. The imported flash movies just remain paused, and the videoMC.play() function does not start the playback.
So I'm stumped. I've read the documentation and there doesn't seem to be much to using the play(); command. So what am I doing wrong, and is there a known bug? Thanks for any help.
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am thinking that the plug-in might need a more complete path to function..also I put the stop first as the player may be reading it as start/stop for the clip ..even though the stop is for root.
Z
Z
ASKER
Thanks Zeffer. I'm gonna have to try that when I get to work and plug it in. Unfortunately I don't have my fla here at home. Hope that does the trick.... Any particular reason why the play() won't work by itself?
J.
J.
ASKER
Thanks Zeffer. I'm gonna have to try that when I get to work and plug it in. Unfortunately I don't have my fla here at home. Hope that does the trick.... Any particular reason why the play() won't work by itself?
J.
J.
how about removing any stop inside the external swf, this way it will automatically start when it's loaded. That way so wouldn't even need the second frame in your main timeline too.
The fact is, that the movie isn't probably finished loading when you call your play() method so it appears doing nothing.
The fact is, that the movie isn't probably finished loading when you call your play() method so it appears doing nothing.
ASKER
Hi;
The movie is already loaded in cache, since before I come to this point in the timeline, I loaded the movie into cache my loading it in to an instance of a temporary movieclip. For this reason, I need to have a stop on the first frame, so when it is being preloaded into cache, it doesn't play automatically.
I know the play() works in some form or fashion, since on the windows platform, I get perfect playback.
J.
The movie is already loaded in cache, since before I come to this point in the timeline, I loaded the movie into cache my loading it in to an instance of a temporary movieclip. For this reason, I need to have a stop on the first frame, so when it is being preloaded into cache, it doesn't play automatically.
I know the play() works in some form or fashion, since on the windows platform, I get perfect playback.
J.
ASKER
Hi;
The movie is already loaded in cache, since before I come to this point in the timeline, I loaded the movie into cache my loading it in to an instance of a temporary movieclip. For this reason, I need to have a stop on the first frame, so when it is being preloaded into cache, it doesn't play automatically.
I know the play() works in some form or fashion, since on the windows platform, I get perfect playback.
J.
The movie is already loaded in cache, since before I come to this point in the timeline, I loaded the movie into cache my loading it in to an instance of a temporary movieclip. For this reason, I need to have a stop on the first frame, so when it is being preloaded into cache, it doesn't play automatically.
I know the play() works in some form or fashion, since on the windows platform, I get perfect playback.
J.
ASKER
Hi;
The movie is already loaded in cache, since before I come to this point in the timeline, I loaded the movie into cache my loading it in to an instance of a temporary movieclip. For this reason, I need to have a stop on the first frame, so when it is being preloaded into cache, it doesn't play automatically.
I know the play() works in some form or fashion, since on the windows platform, I get perfect playback.
J.
The movie is already loaded in cache, since before I come to this point in the timeline, I loaded the movie into cache my loading it in to an instance of a temporary movieclip. For this reason, I need to have a stop on the first frame, so when it is being preloaded into cache, it doesn't play automatically.
I know the play() works in some form or fashion, since on the windows platform, I get perfect playback.
J.
hi john,
so u are almost there, preloading all all the movies ...
try this ... i don't have a mac with me ... so i can't verify the problem, post the link and let us try in other macs and see if that's a player problem or just isolated case....
maybe u can try
mc.gotoAndPlay(nextFrame() );
or
mc.gotoAndPlay(2); as suggested by Z
cheers
so u are almost there, preloading all all the movies ...
try this ... i don't have a mac with me ... so i can't verify the problem, post the link and let us try in other macs and see if that's a player problem or just isolated case....
maybe u can try
mc.gotoAndPlay(nextFrame()
or
mc.gotoAndPlay(2); as suggested by Z
cheers
ASKER
Hi;
The gotoAndPlay(2) seems to work, but the other wrinkle is that it only works on SWFs that don't have a preloader! For instance, most of my external SWFs have a preloader scene, that is instructed to gotoAndStop on the first frame of the next scene (the main scene).
The videoMC.play() or the gotoAndPlay(2) is ignored in these movies. Only when I remove the preloader scene, it starts to play. Is there a way fix that or modify?
Thanks;
John
The gotoAndPlay(2) seems to work, but the other wrinkle is that it only works on SWFs that don't have a preloader! For instance, most of my external SWFs have a preloader scene, that is instructed to gotoAndStop on the first frame of the next scene (the main scene).
The videoMC.play() or the gotoAndPlay(2) is ignored in these movies. Only when I remove the preloader scene, it starts to play. Is there a way fix that or modify?
Thanks;
John
ASKER
Hi;
The gotoAndPlay(2) seems to work, but the other wrinkle is that it only works on SWFs that don't have a preloader! For instance, most of my external SWFs have a preloader scene, that is instructed to gotoAndStop on the first frame of the next scene (the main scene).
The videoMC.play() or the gotoAndPlay(2) is ignored in these movies. Only when I remove the preloader scene, it starts to play. Is there a way fix that or modify?
Thanks;
John
The gotoAndPlay(2) seems to work, but the other wrinkle is that it only works on SWFs that don't have a preloader! For instance, most of my external SWFs have a preloader scene, that is instructed to gotoAndStop on the first frame of the next scene (the main scene).
The videoMC.play() or the gotoAndPlay(2) is ignored in these movies. Only when I remove the preloader scene, it starts to play. Is there a way fix that or modify?
Thanks;
John
put a label on frame 1 of Scene 2 in video.swf..this is the first frame of the video clip yea?
say the label is..labelOne
_root.videoMC.gotoAndPlay( "labelOne" );
Z
say the label is..labelOne
_root.videoMC.gotoAndPlay(
Z
sorry this would be better..
_root.videoMC.nextScene();
Z
_root.videoMC.nextScene();
Z
ASKER
Thanks Zeffer. That did the trick. ;-)
ASKER
J.