Solved

Preloading images in Flash

Posted on 2009-04-02
2
526 Views
Last Modified: 2013-11-11
I am making a Flash app to rotate logos as can be seen on: http://www.james.nedlinux.com/logo_rotator.html.
The colored blocks are jpg images that represent company logos and they are loaded into the Flash application from an XML file using loadMovie.

How I implemented this:

I have a movieclip which is twice the size of my Flash file. The right part of the mc is not viewable because it is on the right of my viewport. I load every new logo into this right part. Then I play the mc that will move the logo into the viewport during 30 frames. The left part of the mc is now not viewable. Then I load the same logo into that left part, so I can move the mc back to the right in 1 frame without noticing. Then again a new logo is loaded... etc..

Problems:

1) Every logo is loaded twice everytime is it shown (appear and disappear). Is it possible to copy the content of a movieclip to another movieclip?
2) When the cyclus ends, I don't want to load all logos again for the next cyclus. How to fix that?
0
Comment
Question by:thijs321
[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
2 Comments
 
LVL 12

Accepted Solution

by:
scooby_56 earned 500 total points
ID: 24052188
Do this in AS3 and the following applies

1)
you can use addChild to switch parents
for example... if myContainer1 has myLogoA and you want to move the logo to myContainer2 just use
myContainer2.addChild(myLogoA);

this will automatically remove from from myContainer1 and place inside myContainer2 effectively copying from one to another
2)
put logos into an array or some variable with meaningfull names. Even if you use removeChild(), the variable will still reference the logo and you can use it with addChild() later.
0
 

Author Comment

by:thijs321
ID: 24261147
Is it also possible in AS1 or AS2?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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.
Suggested Courses

734 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