Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Site Design / June 2007



Tip: Looking for answers? Try searching our database.

action script desription

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
simey70 - 29 Jun 2007 08:49 GMT
Hi there, i am editing a flash site template, and was just wanting to know what
the following script would do.

gotoAndPlay("s" + _root.link);

i know its pointing to and playing a marker called "S", but im not sure on the
latter part.

Hope someone can enlighten me! Thanks :)

simey70
Franz Marksteiner - 29 Jun 2007 09:34 GMT
> Hi there, i am editing a flash site template, and was just wanting to
> know what the following script would do.
[quoted text clipped - 7 lines]
>
> simey70

"Latter part"? I guess you`re talking about the concatenation of two
strings:
String "s" + Variable _root.link

So if _root.link would be the String "SomeString" the gotoAndPlay would
point to the frame "sSomeString".

Signature

Kind regards,
Franz Marksteiner

simey70 - 29 Jun 2007 10:12 GMT
Franz Marksteiner , thansk for your reply.,

can i ask - what dose the   +_root.link); part do ?
David Stiller - 29 Jun 2007 13:23 GMT
simey70,

> can i ask - what dose the   +_root.link); part do ?

   The addition operator, +, is a concatenator for strings.  That means it
combines two or more strings into a single string.  The word "cat", for
example can be presented as the three letters that comprise it, or like
this:  "c" + "at" -- or also this: "ca" + "t"; or "c" + "a" + "t".  (When
the addition operator is used with numbers, it adds them, like the familiar
1 + 2 = 3.)

   So in the line of code you've shown, the letter "s" is being
concatenated (added) to some other string.  What other string?  Well, that
string is stored in an arbitrarily named variable, link.  This variable
exists in a specific location (the main timeline), which can be addressed as
_root.  So the full expression "s" + _root.link means "Combine 's' with the
value of the link variable, which is located in the _root."  The result, of
course, depends on the value of link.

   As Franz said, if the value of link happens to be "SomeString", then
gotoAndPlay() is being asked to go to the frame whose label reads
"sSomeString" and play from that point.

David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."
dzedward - 29 Jun 2007 15:27 GMT
im almost positive you have some buttons and their actions say
_root.link = 1  or 2  or 3  or something

and it's a frame label on the root timline, i.e., s1 or s2 or s3..
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.