|
Written by Geoff Hill
|
|
Saturday, 03 April 2010 13:57 |
The Target
In the previous tutorial, actionscript was placed in the lastframe of the target movieclip to reset it's position when popped. In this game a function in the main timeline will do this.
Open the target movieclip and change the script in the last frame to read as follows: this.reset();
The Blowpipe
 |
The blowpipe movieclip should be approximately 20px wide and 60px high. Note: It is important that the top centre of thee blowpipe is positioned on the '+' symbol in the movieclip editing window as it will be used as the point of reference when firing the dart. |
The Dart
 |
The dart movieclip should be approximately 10px wide by 20px high. Note: It is important that the tip of the dart is positioned on the '+' symbol in the movieclip editing window. |
Link Movieclips for Actionscript.
 |
In this game, the targets, darts and blowpipe will be loaded from the library using the actionscript function: attachMovieClip(library_name, instance_name,level).
Linkage names are used by attachMovieClip to identify the movieclip in the library that will be attached to the game.
Right-click on the blowpipe in the Library panel and select Linkage... from the contextual menu. The Linkage properties panel will open.
|

Click the box labelled 'Export for Actionscript' Change the Identifier to blowpipe as shown above. Click OK.
Repeat this process for the dart and target (balloon) movieclips. Set the Identifiers as follows: dart movieclip = dart target movieclip = target
Save and proceed to modifying the interface.
|