-
targeting questions
Hello fk.
I have some quick questions about actionscript.
I am trying to load jpegs into a movie clip "container", using LoadMovie, so that they are centered always.
Right now I have made the "container" moveclip (lets call it container_mc) 410x410 using a square movie clip at alpha 0%.
I would like the size of this container_mc to have the ability to be changed in size to adapt to my site changes.
The jpegs will themselves be various in size.
Any insight. Also, I'm not sure how to target something that is within another movie clip if it is content that is changed by the user, such as images.
-
Senior Member
The container clip will adapt its size to whatever is loaded into it. However the image you load will take over the movieclip completely, it will replace everything in it.
So normally you use two clips. One container clip and a "frame" clip that will resize to whatever the size the container clip has. For instance....
// On FRAME movieclip
onClipEvent(enterFrame){
this._height=_root.container._height;
this._width=_root.container._width;
this._x=_root.container._x;
this._y=_root.container._y;
}
This simple example will make the frame movieclip always have the same dimensions and position as the container clip.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|