PDA

View Full Version : loadmovie in CS4


losse
11-09-2009, 05:15 PM
hi there
I've been trying to load an external SWF but keep getting this error:

TypeError: Error #1006: loadMovie is not a function.

This is the code I have:

location.loadMovie("video.swf");

"location" is the mc that loads "video.swf"

This used to work in other versions of flash but for some reason now it doesn't in these higher versions of flash!?

nysmenu
11-10-2009, 05:32 PM
You have to include video in a folder in your server..

Vadersapien
12-20-2009, 01:28 AM
I've had that error before. It happens because you are using the AS2 function loadMovie() in an AS3 document. Either use this code:
var request:URLRequest = new URLRequest("http://www.[yourdomain].com/externalSwf.swf");
var loader:Loader = new Loader()
loader.load(request);
addChild(loader);
or code your project in AS2.