PDA

View Full Version : Loading a swf to container



geedogg
October 23rd, 2006, 04:31 AM
Hi.

I have a button on stage. And when you push it i want it to load a swf in a container that is also on the stage. (root)

This is the script im using but i cat get it to work:

ani.onPress = function() {
_root.container.loadMovie("stefan_o_video.swf");
};



There is also some other script in the button but i dont think that it will affect it.

But the whole script is:

stop();
var keepGoing = false;
ani.onRollOver = function() {
keepGoing = false;
play();
};
ani.onRollOut = function() {
keepGoing = true;
};
ani.onPress = function() {
_root.container.loadMovie("stefan_o_video.swf");
};



Anyone know what the problem is here?

Thanks :)

junkerjorg
October 23rd, 2006, 05:20 AM
Are you sure you have a blank movie clip with the instance name "container"?

geedogg
October 23rd, 2006, 05:36 AM
Just check it and its there :)

junkerjorg
October 23rd, 2006, 05:42 AM
try tracing out the onPress to make sure that is working


ani.onPress = function() {
_root.container.loadMovie("stefan_o_video.swf");
trace("Loading");
};

junkerjorg
October 23rd, 2006, 05:51 AM
I just tested it with a quickie fla I made and it worked fine for me

geedogg
October 23rd, 2006, 06:11 AM
Strange.
I got the trace.
But it reefuses to load the swf :(

Gupps
October 23rd, 2006, 11:13 AM
do you have the swf in the fame folder?

Gupps
October 23rd, 2006, 11:13 AM
opps i meant same folder.