Solved

Loading external image center in movie clip (AS2)

Posted on 2009-05-05
1
547 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
ID: 24317219
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SWF capture the time on the Video 3 224
Download slideshow or picture elements 16 437
Actionscript in Flash 3 61
flash professional 3 11
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

810 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