Solved

Loading external image center in movie clip (AS2)

Posted on 2009-05-05
1
560 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

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…
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 set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
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.

724 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