Search tutorials
Step Four: The Fix
It is possible to skip this step but in the search for Flash perfection we need to introduce a little actionscript to the 'path' and 'slider' MC. Click on the 'slider' MC and open object actions.
Add an onClipEvent(load) (Actions <%gt%> onClipEvent) action and a setProperty (Actions <%gt%> setProperty)action. Because the 'slider' MC needs to be centered on an 'x' point which is an integer (I wont bother you with why!), the setProperty action will move the MC into the closest position. You can also do this manually by turning on the grid and dragging around the slider with "Snap-to-Grid" setting on, in which case you can leave the code out.

Add an onClipEvent(load) action to the 'path' MC with two setProperty actions. All we are doing here is lining up the registration point of the path with the registration point of the 'slider'.So for this reason it doesnt matter where on the stage you place the path, Actionscript will position the path directly under the 'slider' MC. You can also position the path manually using "Snap-to-Grid" and the "Align" tool to align it with the 'sliders' position in which case you can leave out this code.
| » Level Intermediate |
|
Added: 2002-12-06 Rating: 7 Votes: 63 |
| » Author |
| Flash Designer, Snowboarder, Cyclist Extraordinaire. |
| » Download |
| Download the files used in this tutorial. |
| Download (149 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!