raulmonda
asked on
ActionScript2- .loadMovie (); Method
hi experts,
I have the following situation: main movie clip (size 900x600). In this movie clip i loaded a secondary movie clip (size 210x40). The secondary movie is loaded and played at (0,0) coords which is not where i want to play. I need it at 430,170. using .moveTo(x,y) didnt work.
to load the secondary movie i used the following code:
Everything is working fine but the jpg is not loaded where i want to.
did i make something wrong in coding? or there is another way to set the position of a loaded movie into another one?
Any help in this matter will be highly appreciated.
Regards,
Raul M.
I have the following situation: main movie clip (size 900x600). In this movie clip i loaded a secondary movie clip (size 210x40). The secondary movie is loaded and played at (0,0) coords which is not where i want to play. I need it at 430,170. using .moveTo(x,y) didnt work.
to load the secondary movie i used the following code:
logo_mc._lockroot = true;// for having access to library in the loaded movie
this.createEmptyMovieClip("logo_mc", this.getNextHighestDepth()); // here i create a" parent" movie to hold a child...
logo_mc.createEmptyMovieClip("container_mc",0);// here i create the child in which the secondary movie will be loaded...
logo_mc.container_mc.loadMovie("image.jpg"); // loading the secondary movie...
container_mc.moveTo(430,170);
// i even use this line : logo_mc.container_mc.moveTo(430,170);
logo_mc.onPress = function() {
trace("It works");
};
Everything is working fine but the jpg is not loaded where i want to.
did i make something wrong in coding? or there is another way to set the position of a loaded movie into another one?
Any help in this matter will be highly appreciated.
Regards,
Raul M.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sjklein solution was very close! i had to set the coords by calling the parent movie as follows:
this.createEmptyMovieClip(
logo_mc.createEmptyMovieCl
logo_mc.container_mc._x=43
logo_mc.container_mc._y=17
logo_mc.container_mc.loadM
Im sorry, Lamase solution didnt works.
Regards, Raul