Code.GeekInterview.com
 
Code Samples Flash
 

Alphabet Conversion


Code ResourceAuthor: lavanyarani  

Difficulty Level: Intermediate

Published: 10th Nov 2009   Read: 2483 times  

Filed in: Flash
Add Comment


 

 

Sponsored Links


 

 
A sample conversion between A,B,C,D are given below.
 


Sample Code
  1.  
  2. Step-1: Create 4 buttons with the texts on them as A, B, C, D
  3. Step-2: Select the first frame and draw a circle.
  4. Step-3: Select the first frame and select shape as tween.
  5. Step-4: Select the first frame and open the script pane and write “stop();”.
  6. Step-5: Insert key frames in the time line at the frame numbers 15, 30, 45,              
  7.              60.
  8. Step-6: Select the 15, 30, 45, 60 frames serially one by one and open the
  9.              script and write “stop();” for each frame
  10. Step-7: Select the 15th frame and delete the circle and write the letter “A”.
  11. Step-8: Select Modify Break apart;
  12. Step-9: Select the 30th frame and delete the “A” and write the letter “B”.
  13. Step-10: Select Modify Break apart;
  14. Step-11: Select the 45th frame and delete the “B” and write the letter “C”.
  15. Step-12: Select Modify Break apart;
  16. Step-13: Select the 60th frame and delete the “C” and write the letter “D”.
  17. Step-14: Select Modify Break apart;
  18. Step-15: Select the button “A” and open the script pane and write the
  19.                following code.
  20. on (release)
  21. {
  22.                 gotoAndPlay(2);
  23. }
  24. Step-16: Select the button “B” and open the script pane and write the
  25.                following code.
  26. on (release)
  27. {
  28.                 gotoAndPlay(16);
  29. }
  30.  
  31.  
  32.  
  33.  
  34.  
  35. Step-17: Select the button “C” and open the script pane and write the
  36.                following code.
  37. on (release)
  38. {
  39.                 gotoAndPlay(31);
  40. }
  41. Step-18: Select the button “D” and open the script pane and write the
  42.                following code.
  43. on (release)
  44. {
  45.                 gotoAndPlay(46);
  46. }
  47. Step-19: press ctrl+enter to test the movie and click the appropriate button to convert the circle into different letters
  48.  
Copyright GeekInterview.com


Next Article: Simple Mathematic Operations (Round, Ceil, Floor, Square Root)


 

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. lavanyarani35497

Active Coders

# Coder NameCodes
1. lavanyarani13

Refined Tags