Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Preloading images in Flash

Posted on 2009-04-02
2
Medium Priority
?
529 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 1500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

722 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