Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Flash:fscommand related question
From: Colin Moock
Date: Sun, 10 Jan 1999 18:14:02 GMT

flasheratshocker [dot] com,Internet writes:
>here is a fscommand related question. i know you can pass arguments into the
>javascript. now the following piece of code:

>args=""+args;

>i guess i'm just wondering what that does to the argument. in this case the
>integer 2 was passed. is this increasing the the value of 2 or?

It converts the variable args into a string. It's a bit of a hack, but used
often in JavaScript because of the language's weirdish handling of string vs
integer with variables.

>here is the entire snippet:
>if( command=="doSound")
If the "Command" parameter from the FS Command action is set to "doSound", then:

> {
> args=""+args;
Convert args to a string

> masthead.TGotoFrame("_flash0/rolls",parseInt(args)-1);
In the movie called masthead, Tell Target named "rolls" on level "_flash0/" to
go to the frame that matches the value of (args - 1).

> }

Not sure why they convert args to a string, only to convert it back to an
integer with "parseInt"...

FWIW,
colin


------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  RE: FLASH: Linking with an URL, Rey, Chrissy
  FLASH: Flash:fscommand related question, ranger

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]