Sign in to follow this  
jam82

Size problem while importing external swf map

Recommended Posts

Hi everyone,

 

 

 

I'm trying to import an external swf Africa map via loadClip function in my .fla. I'm encountering some issues with the size of the imported movie clip, since the imported map takes up all the space in the stage, while I want it to be large only 200x200. Here is the code I'm using right now:

 

 

 

var continent_container:MovieClip = this.createEmptyMovieClip("ContinentHolder", 1);

 

 

 

var movLoad:MovieClipLoader = new MovieClipLoader();

 

 

 

var myListener:Object = new Object();

 

myListener.onLoadInit = function(thisMc:MovieClip) {

 

thisMc._height = 200;

 

thisMc._width = 200;

 

thisMc._x = 10;

 

thisMc._y = 10;

 

};

 

 

 

movLoad.addListener(myListener);

 

 

 

movLoad.loadClip("Africa.swf", "ContinentHolder");

 

 

 

This code does not work, that is tha map is not displayed at all, but if I remove the lines:

 

 

 

thisMc._height = 200;

 

thisMc._width = 200;

 

 

 

everything works and the map with the wrong size is placed in the right position. What am I doing wrong?

 

Thanks in advance for your help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this