|loading external images from file and animating|
animating pictures automatically loaded from an external file
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.
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.