Need more info on structure
Main Topics
Browse All TopicsI'm using ASC 2 to grab XML, load an image as my background by creating an empty movie clip, then trying to run a formula to center the image. I need to be able to grab the images width to run the formula, but it always comes out as 0 on a trace.
Also point out any sloppy methods i did.
*unrelated question: How viable is ASC 2 these days? I'm using it for my site because I simply cant grasp the ASC 3 concepts enough (I am trying to learn it though). I want to be a flash developer and I'm worried this is gonna hurt me.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't know what you meant by 'need more info on structure', but you might want to look up the Flash manual for MovieClipLoader and onLoadInit where you should be able to find the code snippets...
It takes great deal of time to learn AS3 because it basically is a new language when comparing it to AS2... There is no easy way to do it... Oh, nobody writes ActionScript as ASC... People normally write AS...
CyanBlue
Business Accounts
Answer for Membership
by: CyanBluePosted on 2009-10-29 at 05:03:58ID: 25692649
The width of the BKGD movieClip is 0 until the image is fully loaded... In other words, you will need to wait until the image is fully loaded to do any sort of calculation with it...
I suggest you using a MovieClipLoader class and utilize its onLoadInit handler for it rather than using the loadMovie which has no builtin way to do so...
AS3 is good to have but it's not the best thing in the world... It's just another tool to use... What's important is the logic itself... You will eventually need to move onto AS3 cuz that's where the main stream is going, but it does not need to be 'now' now... I think it is easier to learn the basics and the logic of programming in AS2 and then move onto AS3... That's my 2 cents...
CyanBlue