Free Flash Tutorials

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial - Input boxes

 

Free Flash Tutorial


Page 5     <<   Previous    1   2   3  4   5   >>       >>   Webwasp Mates

 

Step Five: Giving the Reset Buttons Actions

Before we can do this you need to know the width, height, x and y value of your frog. If you select the frog on stage you can then look in the Property panel for these values. Write them down on a piece of paper.

Note: The order or the reset is important. For example if you reset the width then reset the rotation the width will be incorrect. That is: the width of a rotated object is different to an object that is not rotated. For this reason we will reset the rotation first.

Reset Button: Rotation Properties

  1. Right click on the reset button and select Actions.
  2. Select Normal Mode from the View Options button .
  3. Click on the Plus button:
  4. Select: Actions > Movie Clip Control > setProperty
  5. In the Options above the action script go to properties and select rotation from the drop down arrow.
  6. In the options go to Target and type: _root.frogie
  7. In the options go to Value and type: 0
  8. In the options go to Value and select expression in the tick box on the right.

    Reset Button: Width Properties

    Now that the movie clip is rotated to 0 we are to add the line of code that will reset the width properties.
  9. Click on the Plus button:
  10. Select: Actions > Movie Clip Control > setProperty
  11. In the Options above the action script go to properties and select width from the drop down arrow.
  12. In the options go to Target and type: _root.frogie
  13. In the options go to Value and type: the width of your frog.
  14. In the options go to Value and select expression in the tick box on the right.

    Reset Button: Other Properties

    Repeat this for each of the individual properties.

    Reset Button: Textbox Properties
  15. Click on the Plus button.
  16. Select: Actions > Variables > set variable (remember the text box is a variable).
  17. In the options go to Variable and type: _root.textbox
  18. In the options go to Value and type: 000
    This resets the number in the text box to: 000

    Your script should look similar to this:

    on (release) {
    setProperty("_root.frogie", _rotation, 0);
    setProperty("_root.frogie", _width, 98.4);
    setProperty("_root.frogie", _height, 41.2);
    setProperty("_root.frogie", _alpha, 100);
    setProperty("_root.frogie", _visible, 1);
    setProperty("_root.frogie", _x, 64.8);
    setProperty("_root.frogie", _y, 68.6);
    _root.textbox = "000";
    }

    The width, height, x and y values will be different in your script as it will be dependant on the position and size of your frog. The alpha (transparency) rotation and visibility will be the same.

Save and test you movie as it should now be finished. Enjoy your new skill.

Please indicate what you thought of this tutorial 
10 is the best: 
10 9 8 7 6 5 4 3 2 1

         

Page 5     <<   Previous    1   2   3  4   5   >>       >>   Webwasp Mates


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

73388 visitors to this page since Jan 04

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.