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
Solved

Loading external image center in movie clip (AS2)

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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 select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

792 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