homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

loading external images from file and animating
animating pictures automatically loaded from an external file

5+ Year Member

Msg#: 4072762 posted 3:20 pm on Feb 2, 2010 (gmt 0)

Hi all,

I am not that new to animating in flash but i am new to actionscript, what i am doing is creating a portfolio type of thing, and i was looking around and found an article that discussed loading external images into flash using an empty movie clip.

I was wondering if you could do this and then animate this movie clip, then (depending on the amount of images their are) have flash automatically duplicate th movie clip with the new images alng with the animation.

So all you have to do is create 1 movie clip with the animation with rollover effect ETC and flash will duplicate the whole thing.

Many Thanks



WebmasterWorld Senior Member rocknbil us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4072762 posted 7:12 pm on Feb 2, 2010 (gmt 0)

I don't see why not. I wouldn't duplicate the clip though, because when you duplicate you create another instance, and it takes up memory. The problem is that once you start duplicating, developers often forget to delete unused duplicates, which leads to excessive memory consumption, which is one of the things that gives Flash a bad reputation [webmasterworld.com].

The way I'd probably approach it is create a "viewer" symbol on the stage, load the data via XML, then assign the source of the viewer symbol from URL's in the imported data. This will work with static objects, like images or text, but you have to take a completely different approach with video. When the next images or source is assigned, it overwrites the existing one, replacing it, hence much more efficient use of CPU/memory.

Here's an example [webmasterworld.com] in the context of a slide show with fade in/fade out dynamic effects, all animated/tweened using AS2. The image URL's, page URL's, and captions are all imported from an easy to maintain XML file - in truth, the XML file is written out by a mini-administrative CMS where the images are uploaded, captions and URL's are set.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved