• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

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","videoMC");

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
0
JohneeG
Asked:
JohneeG
1 Solution
 
ZefferCommented:
Hi John
try changing the code on the second frame to

stop();
_root.videoMC.gotoAndPlay(2);

Z

0
 
JohneeGAuthor Commented:
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.
0
 
ZefferCommented:
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
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
JohneeGAuthor Commented:
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.
0
 
JohneeGAuthor Commented:
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.
0
 
dorobo88Commented:
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.
0
 
JohneeGAuthor Commented:
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.
0
 
JohneeGAuthor Commented:
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.
0
 
JohneeGAuthor Commented:
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.
0
 
henrywwCommented:
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
0
 
JohneeGAuthor Commented:
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
0
 
JohneeGAuthor Commented:
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
0
 
ZefferCommented:
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

0
 
ZefferCommented:
sorry this would be better..


_root.videoMC.nextScene();

Z
0
 
JohneeGAuthor Commented:
Thanks Zeffer.  That did the trick.  ;-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now