Solved

Loading external image center in movie clip (AS2)

Posted on 2009-05-05
1
554 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
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.

730 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