First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: ::::: Daafy ::::: | Website: http://

Before begin the movement script, we'll create a basic subrub button. Make a simple square, select it and F8, choose button, ok. Select it, F8, choose MC, ok. Go inside your button, move your square at keyframe 2, fill it with white color with 50 % alpha for ex. Like this, on roll out, it appears. Next, create a new layer, insert a text field at keyframe 1 and name its var : Label. Yes it's the same var name than for rubs I hear you...but this var is EXACTLY : main/Subrub:Label and for rub it's : main/Rub:Label . Ok, return on your main scene, double-click on the subrub MC and fill the occur with : Subrub
Now adjust its x position regard with rub MC. y position doesn't matter cauz we'll define it !

You should obtain that :

we need to add some constants about subrubs in our first keyframe, insert them with the corresponding rub part :

Set Variable: "SubrubHeight" = GetProperty ("Subrub",_height)
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub1" = 2
Set Variable: "LabelRub1_Subrub1" = "Subrub1"
Set Variable: "LabelRub1_Subrub2" = "Subrub2"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub2" = 3
Set Variable: "LabelRub2_Subrub1" = "Subrub1"
Set Variable: "LabelRub2_Subrub2" = "Subrub2"
Set Variable: "LabelRub2_Subrub3" = "Subrub3"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub3" = 5
Set Variable: "LabelRub3_Subrub1" = "Subrub1"
Set Variable: "LabelRub3_Subrub2" = "Subrub2"
Set Variable: "LabelRub3_Subrub3" = "Subrub3"
Set Variable: "LabelRub3_Subrub4" = "Subrub4"
Set Variable: "LabelRub3_Subrub5" = "Subrub5"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub4" = 4
Set Variable: "LabelRub4_Subrub1" = "Subrub1"
Set Variable: "LabelRub4_Subrub2" = "Subrub2"
Set Variable: "LabelRub4_Subrub3" = "Subrub3"
Set Variable: "LabelRub4_Subrub4" = "Subrub4"
Comment : -----------------------------------------------
Set Variable: "Total_Subrubs_Rub5" = 2
Set Variable: "LabelRub5_Subrub1" = "Subrub1"
Set Variable: "LabelRub5_Subrub2" = "Subrub2"

Note that I haven't set any subrubs for rub 6 and 7. To test, you may set only 1 subrub per rub to edit more faster.

» Level Intermediate

Added: 2001-01-08
Rating: 7.99 Votes: 1292
(10 being the highest)
» Author
Daafy works with Flash since 2 years but began to script (never scripted before) since few months with Flash 4. Like you, he began by downloading sources with some white nights, coffee & other...
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

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

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.