Link to home
Start Free TrialLog in
Avatar of jsound
jsound

asked on

Create MovieClip and Linkage in Script

I need to load pictures from the local folder into movie clips at the beginning of the project and then attach the movie clips to place holders at various places.

This is simple to do if the images are already embedded into the SWF file during design time, since I can assign a linkage name and then simply use attachMovie to 'load' them into a placeholder.

How can I do this dynamically during run-time. The issue here is that I can't allow the loading of the image to take place prior to just displaying them. The load process needs to take place right at the beginning.

Thanks for any code suggestions!

JB
Avatar of Billystyx
Billystyx

so load them and then set the visible quality of the container clip to false at the start of the movie.
Just make them visible when you want them.

Billystyx
container.loadMovie("mypic1.jpg");
and when it has loaded:

container._visible=false;

Billystyx
Avatar of jsound

ASKER

I appreciate the suggestion. Thought about that one too. However, the problem is that it's the same container that I need to be swapping the movie clips in. In other words, each image must be contained in a separate movie clip that is dynamically created. Those movie clips are then attached to the said container clip.

Hope this makes sense...

JB
ASKER CERTIFIED SOLUTION
Avatar of Jakob_E
Jakob_E
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jsound

ASKER

Thanks, Jakob. This will be a good workaround. I would have preferred a solution that allowed me to create a movie clip AND specify a linkage name for the clip. However, it seems that Flash Actionscript doesn't have support for that. I may be wrong, but I haven't seen anything, thus the question.

Thanks,

JB