External Image
Right here we gonna use an interesting property of Sprite with Load Movie to upload an external image .
At first, Download the image. . Unzip the file in the directory where your SWF movie 'll be.
1 - Set up width, height, and a background color (white for instance). 'Frame Rate' doesn't matter.
2 - In Menu Insert, click Sprite.
In 'Outline', click text Sprite to edit it. Enter Conteneur.
3 - In 'Outline', click Scene1, then click tab Actions in the right zone. Click Add Event to yield
4 - Then, click Add Action, select Tell Target.
In the Edit field, enter /Conteneur
5 - Right now click Add Action, select Load Movie
Load Movie allows to import an external file on the fly.
There is a special value for the level ( -1 ) which allows this file to replace the content of the Sprite',
BUT position, size and effects of 'Sprite' 'll be apply to it.
Enter the complete pathname for the file and level -1.
6 - Click right now menu File , then Test, then In Player.
What do you watch out ? Image stays at a weird position. Why ?
2 reasons for that :
- the point of coordinates [0;0] from imported file fits with the point [0;0] of 'Sprite'. Cool ! would you say !
- But [0;0] of 'Sprite' is its Center ! The point [0;0] from imported file is the high left corner. So bad !
7 - So we gonna move the image towards the high left corner of the scene.
For that, click Conteneur in 'Outline'. Then click tab Transform in the right zone.
You 'd yield :
8 - Et Voilà, it's over. You just have to export. Don't forget to put your image file in the right directory.