View Full Version : Problem with script

04-01-2011, 03:37 PM
Hello all. :)

I don't think I know what I'm doing here. I'm trying to embed a youtube video into my flash page with this script:

this.createEmptyMovieClip("video_mc", 10000);
this.video_mc.loadMovie("youtube link here"); (I had to take the link out to be able to post this thread LOL).

but when I did that, I got a warning saying createEmptyMovieClip was no longer supported and to use var mc= new MovieClip(); addChild(mc) instead, but when I inserted that to replace the createEmptyMovieClip, I got a syntax error saying it's expecting an identifier before the var. I'm lost. Any help would be greatly appreciated.

04-04-2011, 03:45 PM
createEmptyMovieClip() is an AS2 function that does just that. Since you are getting that error, you must be trying to publish using AS3.

try either changing the publish setting to AS2 or you'll have to change that line to:

var mc:MovieClip = new MovieClip();

You could use this.addChild(mc); if you are using a framescript and these two lines are not in another function.



05-10-2011, 05:15 PM
Flash is full of errors anytime whatever you do.