Code.GeekInterview.com
 
Code Samples Flash
 

Assigning actions to an object and button


Code ResourceAuthor: lavanyarani  

Difficulty Level: Beginner

Published: 10th Nov 2009   Read: 1511 times  

Filed in: Flash
Add Comment


 

 

Sponsored Links


 

 
This code makes you to create an object or a button and assign actions to it using action script
 


Sample Code
  1. STEP-1: Draw a circle
  2. STEP-2: Draw a rectangle and convert it into button
  3. STEP-3: Click on the first frame on the time line then tween properties        
  4.                will be displayed. Select “shape” as tween.
  5. STEP-4: Select the destination frame and right click on it and select the
  6.                “insert keyframe”option.
  7. STEP-5: Select the circle from there and drag and drop somewhere else  
  8.                 on the stage and delete it and draw the required size rectangle.
  9. STEP-6: Select the button and select window-Action or press F9 to open the action panel.
  10. STEP-7: Click the Global Function from that select “movie clip control
  11.                on that double click on the “on” then code hint menu will appear      
  12.                from that select “release”.
  13.  STEP-8: Under that write
  14.                        gotoAndPlay (1);
  15.  
  16. STEP-9: Select first frame and write in the script pane as stop();
  17. STEP-10: press ctrl+enter to test the movie.
  18.  
  19.  
Copyright GeekInterview.com


Next: Addition of Two Numbers Using User Defined Class


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Popular Coders

# Coder NameHits
1. lavanyarani35478

Active Coders

# Coder NameCodes
1. lavanyarani13

Refined Tags