?
Solved

MC.play() is not working!!  Help.

Posted on 2003-03-01
15
Medium Priority
?
242 Views
Last Modified: 2010-04-03
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
Comment
Question by:JohneeG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 23

Accepted Solution

by:
Zeffer earned 800 total points
ID: 8048782
Hi John
try changing the code on the second frame to

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

Z

0
 

Author Comment

by:JohneeG
ID: 8048817
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
 
LVL 23

Expert Comment

by:Zeffer
ID: 8048840
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
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!

 

Author Comment

by:JohneeG
ID: 8048915
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
 

Author Comment

by:JohneeG
ID: 8048937
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
 
LVL 1

Expert Comment

by:dorobo88
ID: 8048949
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
 

Author Comment

by:JohneeG
ID: 8048979
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
 

Author Comment

by:JohneeG
ID: 8049225
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
 

Author Comment

by:JohneeG
ID: 8049775
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
 
LVL 6

Expert Comment

by:henryww
ID: 8053768
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
 

Author Comment

by:JohneeG
ID: 8053877
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
 

Author Comment

by:JohneeG
ID: 8053902
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
 
LVL 23

Expert Comment

by:Zeffer
ID: 8054795
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
 
LVL 23

Expert Comment

by:Zeffer
ID: 8054861
sorry this would be better..


_root.videoMC.nextScene();

Z
0
 

Author Comment

by:JohneeG
ID: 8055169
Thanks Zeffer.  That did the trick.  ;-)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question