A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11255 Flash Movies | 9 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Knife Butterfly
» Title: SkullCandle
» Description: Simple Skull with a candle burning on it.
» More by Knife Butterfly


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 6392 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Cesar Kobashikawa - online portfolio
» Comments: Cesar Kobashikawa's Portfolio


Random Links | Add your own Flash Related Links
Flash Tutorials 1201 Tutorials 7 New Tutorials Added!
What's New | Top100

» FLV Converter for Mac
» After Effects Quality Effect using AS3
» FLV to 3GP: Convert video files from FLV (Flash Video) to 3GP for Mac
» create Christmas business flash presentation with hyperlinks
» Let Photos Show Your Happy Family this Christmas and Upload YouTube
» PowerPoint show to DVD slide show--- PPS to DVD
» How to burn FLV to DVD for Mac
» How to Create Christmas Flash Greeting Ecard with photos and music
» Getting Started In Flash
» Unknown Tag: Title10
Random Tutorial | Add Site

bbm.netBBM.net is designed to save you time and deliver the highest quality royalty-free music for your multimedia projects. Features include: over 450 Music Loop Packages from some of the best composers in the business, our music search engine to speed your selection process, alternate music versions & bonus sounds to use for rollovers or transitions, free technical support and free consulting.

Click here for details »

Web Page Production
Aquent
US-MD-Owings Mills

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Categories Very Highly Dynamic Menu
Author: ::::: Daafy :::::

 
Page 3
«prev 1 2 3 4 5 6 7 8 next»

On our scene, we'll first insert a new layer at top and name it "actions". Open first keyframe's properties (double-click on it) -----> Action tab
Now, we insert our constants (constants var are vars that will be used by the script but not changed by it as contrary as a counter for example). So we put them before the "program" :
Comment : ::::::::: Our constants ::::::
Set Variable: "TotalRubs" = 7
We'll need the height of the rub so we get it
Set Variable: "RubHeight" = GetProperty ("Rub",_height)
Then we input now the label we want for each rub (assuming we've got 7)
Note that all values of them are character string with ""
Comment : -----------------------------------------------
Set Variable: "LabelRub1" = "I"
Comment : -----------------------------------------------
Set Variable: "LabelRub2" = "am"
Comment : -----------------------------------------------
Set Variable: "LabelRub3" = "learning"
Comment : -----------------------------------------------
Set Variable: "LabelRub4" = "to"
Comment : -----------------------------------------------
Set Variable: "LabelRub5" = "create"
Comment : -----------------------------------------------
Set Variable: "LabelRub6" = "awesome"
Comment : -----------------------------------------------
Set Variable: "LabelRub7" = "menu"
Comment : ::::::::: Dupplicating part ::::::
let's always initialize our counter before "Loop" action :
Set Variable: "n" = 0
Do actions in loop as many time as our "TotalRubs" var
Loop While (nDO NOT FORGET to increase our counter !
      Set Variable: "n" = n+1
Our var ("PosY") must be "dynamic" because there will be a different one for each rub.
you must fill three parameters (target, new name, depth).
      Duplicate Movie Clip ("Rub", n, n*10)
We'll see later more about this "if condition"
 If (n=1)
We define here the future position of our dupplicated movies
 Set Variable: "YPosition" = 30
 Else
 Set Variable: "YPosition" = GetProperty (n-1, _y) + RubHeight
 End If
At last, we set our "YPosition" var to our dupplicated movie
      Set Property (n, Y Position) = YPosition
We set the corresponding label for each rub dupplicated
      Set Variable: n&":Label" = eval ("LabelRub"&n)
End Loop
We don't need the original Rub MC, so we set to him an invisibility.
Set Property ("Rub", Visibility) = 0

Here we have set a number as a new name (our counter) for ours dupplicated movies because we'll see later that number as target movie is really practical ! About the third parameter...well, doesn't matter, the important thing about it you must relember is : ALL DUPPLICATED MOVIES MUST HAVE A DIFFERENT DEPTH !!!. If not, you won't see any dupplicated movie having the same depth number than another dupplicated previously. Biggest is your number, more at top will be your MC. Why do we set the depth at n*10 ? Imagine that rubs will have decimal depth and subrub units depth...rub 1 : depth 10, Rub 3 subrub 2 : depth 32. So note that with this calcul we can't set more than 9 subrubs per rub...
Well, we'll place rubs with a reference rub. In fact, eachrub will be placed with regard to the previous one + the height of a rub. So the first rub need to have a properly y position because it doesn't have any reference rub.
Now about setting the right label, to define a var inside an MC, we must set the path of this MC, ":" to mean the next word will be the var name. Ex, you're inside an MC and you want to define a var up in hierarchy, you'll set : "../:MyVar" = "something". Here, the var we want to define is inside our dupplicated movie (with n as name---->see the new name we set on dupplicating) so the path of our var will contain expression (n) and caracter string (":Label"). Then about the value, we set previously in our constants labels for each rub ("LabelRub1"="I", etc, ...), so our value, like its name, should be "dynamic" cauz it contain caracter string ("LabelRub") and an expression (n). So to set a value that is dynamic, we'll need to use the function eval (that eval the value of a var from its name) : eval ("LabelRub"&n). Is it quite clear ??? Sorry for my horrible english writing...

«prev 1 2 3 4 5 6 7 8 next»

» Level Intermediate

Added: : 2001-01-08
Rating: 8.21 Votes: 1279
Hits: 4878
» 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.
Download (105 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Symantec Whitepaper: Converging System and Data Protection for Complete Disaster Recovery
Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
  Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Symantec Whitepaper: Comprehensive Backup and Recovery of VMware Virtual Infrastructure
MORE WHITEPAPERS, EBOOKS, AND ARTICLES