Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Macromedia Flash Externally Load Photos
Your Ad Here

Macromedia Flash Externally Load Photos


Having photos in flash application is great and the process of creating one is not that difficult either. Basically there are two ways to have photos displayed in flash application. One way is to import the photos into flash file during authoring time and the other one is to load externally photos during flash run time. Today, I'm going to show you how to load photos on the fly during flash run time.

Here is what you are going to build today

To begin with, please download the partially done source code. It includes two photos and one incomplete flash file.

1. Open the incomplete flash file you downloaded earlier. You will see two buttons. When clicked you want to load the two external photos namely 'cambodia1.jpg' and 'cambodia2.jpg'.

2. Now, let's work on the flash actionscript part. First, click on first frame of Layer 1 and press F9 to open action panel and paste these flash actionscript codes inside.

_root.createEmptyMovieClip("myPhotoClip",1);
myPhotoClip.createEmptyMovieClip("photoHolder",1);

3. Click on first button and press F9 to open action panel if it's not already opened. Paste these codes inside.

on(release) {
_root.myPhotoClip.photoHolder.loadMovie("cambodia1.jpg");
}

4. Click on the other button and paste these flash actionscript codes inside the action panel.

on(release) {
_root.myPhotoClip.photoHolder.loadMovie("cambodia2.jpg");
}

5. You are ready to test the flash movie. Press Ctrl + Enter to test the movie.

And here is the full flash source code.



Author's URL: CambodiaXP.com
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Macromedia Flash Externally Load Photos"

Only registered users can write comment

Reader's comments