Your Ad Here

December 31, 2009

Loading External Flash Movie by Using Components

Name : Loading External Flash Movie by Using Components
Category : Advanced

Actionscript : 2.0

In Macromedia we can load external Flash Movies (.swf files) by using built in Components. We can also load it using Movie clip but here we will discuss about Loading it by Components only.

1- Open up Macromedia Flash and create a new file.

2- Open the Components window : Window> Components (shortcut: Ctrl+F7)

3- Expand the “User Interface” Menu by clicking on it.

4- Then locate the “Loader” component and Drag n Drop it on to the stage.

5- The flash movie you are going to load in this movie should be placed in the same folder or Directory.

6- When you will select the Loader component on the stage you will see in the bottom of the screen the Properties Tab, beside that you will see Filters and Parameters Tab. Select the Parameters Tab.

7- Here you will see Three Properties:
       -autoLoad: To set that the Movie should be automatically loaded or not

       -ContentPath: The path of the content you are going to load (if the content is in the same folder we will write the file name only)

      -scaleContent: To set that the content loaded should be scaled to the width and height of the component or not

8- Set the “autoLoad” to “true” and “scaleContent” to “true”.

9- Write the name of the file in the “ContentPath”, like we are using “sample.swf”.

10- All done, now test the movie clip by pressing Ctrl+Enter.

*Note: You can set the Properties from the Parameters Tab like if you don’t want to scale the content, just set the “scaleContent” to “false”

No comments:

Post a Comment

Please use sensible language.....!