Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Flash Action script Basics... |
From: | David Gilden |
Date: | Mon, 2 Oct 2000 22:46:56 +0100 |
I'd like to share this with the list.
Comments are not only welcomed but encouraged!
A special thanks is in order to Randy for
taking the time to answer a few questions.
Thanks Randy (:
'''''' ' ' ' ' ' ' ' ' '
From: Randy Kato - Web Master Braincraft
Here are some brief answers for you (within your quoted message)...
David Gilden wrote:
> I've seen mention of .as, what kind file format is this?
It's an external ActionScript file, just a text file full of AS that you
can import, like a .js external JavaScript file.
>
>
> Also please let me know if I have any the following concepts
> wrong, (Flash 4)
>
> GetProperty ("", _currentframe)
>
> This targets the current time line
> (if your in the main time line then it would be referencing
> the main time line)
>
> GetProperty ("/", _currentframe)
> This targets the main time line
>
>
> This also targets main time line
> But is it legal?
>
> /:_currentframe
All correct up until this last one. It targets the main timeline because
of the slash, then the colon means it's a variable. Here's where the
problems start. You're using a property identifier in what should be a
variable name. F4 didn't have many reserved words, but I'm not sure if
you can start a variable name with an underscore (never tried it since
it's a gray area). I don't think it's legal, and even if it works as
expected, the results may be unpredictable.
>
>
> ------
> // where "start" is a frame label
>
> if(GetProperty ("/", _currentframe) eq "Start")
>
> where Start is a frame label (are frame labels case sensitive ?)
> should I use "eq" or =
_currentframe usually returns the frame number. Not sure what it will do
with a frame label...it shouldn't do anything and this shouldn't work
according to the documentation, but we all know the 'documentation'
isn't
the final word. Try it out and see. You would use eq for this since it's
a
string.
>
>
> I am off to test if the following is this the correct syntax:
>
> if (GetProperty ("/", _currentframe) eq "/:Start")
This is correct IF you're trying to compare the value of the main
timeline's _currentframe - which should return a number - and the value
of
the variable named "Start" that is on the main timeline. This might
work,
but = would probably be more appropriate here than eq since the
comparison
should theoretically be of numbers. F4 AS isn't nearly as
syntax-dependent
as F5 script, and data types (string, numerical, boolean, etc.) are
loosely
typed so sometimes things work that you might not expect to.
>
>
> Is it true that all variables need to start with a leading ":"
The colon is the slash-syntax (F4) signifier of a variable, so you see
paths like /MC1/MC2:myVar, or just /:myVar.
>
>
> It would seem sometimes that Flash follows its syntax and then other
> times lets you get by with incorrect code (Like bad html in IE!!!)
Yup. But F5 does away with a lot of that looseness. However, it makes it
quite a bit more complex because things do work according to a fairly
strict set of rules and sometimes you'll get weird results only to
realize much later that it is in fact doing exactly what it's supposed
to.
*====================================================*
* Cora Connection Your West African Music Source *
* http://www.coraconnection.com/ *
* Resources, Recordings, Instruments & More! *
*====================================================*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]