Solved

Loading external image center in movie clip (AS2)

Posted on 2009-05-05
1
540 Views
Last Modified: 2013-11-11
I'm currently using a flash "mx.controls.loader" component to load external images into and it will not allow centering of content.

I need some starter Actionscript 2.0 code to run this simple function for me.

Please help as this is urgent.
0
Comment
Question by:webrhp
1 Comment
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
Comment Utility
here is some code I got from LiveDocs...  and added the part that centers a movieclip to the stage...

loadtest = new Object();
loadtest.complete = function(eventObject){
 
   // rp added
   content_mc._x = (Stage.width/2) - (content_mc._width/2);
   content_mc._y = (Stage.height/2) - (content_mc._height/2);

}
my_loader.addEventListener("complete", loadtest)




rp / ZA
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now