flash actionscript:
ulalume,
[quoted text, click to view] > Can anyone please help? I tried several versions gotoandstop
> ("scene2"); gotoandstop ("2", 1), I just don't know anymore!
Your best bet -- and this is going to help you more than your teacher,
if he or she really is horrible (this will even help you more than Script
Assist) -- is to roll up your sleeves and brave ... are you ready for it?
.... the ActionScript 2.0 Language Reference. It's not a perfect document,
but it's truly the very best place to look first. I don't know why people
seem to shy away from it. Yes, it's a big huge tome, but it really isn't
that hard to read once you know a few basics.
Basic tip #1: everything in ActionScript can be described as an object.
Objects are defined by something called classes, which define an object's
properties (characteristics), methods (things it can do), and events (things
it can react to). Whatever you're dealing with, take a breath, stop and
think, "What sort of object am I dealing with?" In this case, you're
dealing with a movie clip. Why? Because the main timeline itself is a
movie clip. (In this case, this point is the only thing that may not make
sense immediately.) Look up the "MovieClip class" entry of the ActionScript
2.0 Language Reference, and you'll find a gotoAndStop() method (a thing this
object, the main timeline, can do). It shows you the capitalization you'll
need -- gotoAndStop, rather than gotoandstop -- as well as the parameters
that are accepted by this method, such as what frame or frame label you can
send it to.
Basic tip #2: the ActionScript 2.0 Language Reference is largely
organized around classes, so think in terms of classes and you're good.
Basic tip #3: Flash has a long history and hasn't always been as
object-oriented as it is now. In many cases, there are stand-alone
functions that correspond -- or nearly correspond -- to methods. Look
carefully, and you'll also find a gotoAndStop() function that is different
from the MovieClip.gotoAndStop() method. Personally, I recommend against
the stand-alone functions, as they're a historical hold-over, but ultimately
the choice is yours.
[quoted text, click to view] > I am using MX 2004. At school we have Flash 8 and it has
> a help area for actions, but I can't find it in my MX version
> (it lets you type in Scene, Frame type -label, number, etc.) Do
> you know how I can turn this on? Thanks!!
Flash MX had this and it was called Normal Mode (versus Expert Mode).
Flash MX 2004 dropped this feature. There was much uproar, and it was
brought back in Flash 8 as Script Assist, which is slightly different, but
close enough. My personal opinion is that this feature ultimately hurts
you, because it keeps you from having to actually learn how to code. It can
only take you so far, and when you eventually want to "break out" and try
something a bit different, you'll be lost without it. I'm not saying it's a
bad feature, any more than training wheels are a bad feature for someone
learning to ride a bike. It's just that there's a time to let it go ... and
many people don't, for some reason.
See if these articles will help get you grounded, a bit.
http://www.quip.net/blog/2006/flash/actionscript-20/ojects-building-blocks http://www.quip.net/blog/2006/flash/tackling-the-actionscript-20-language-reference http://www.quip.net/blog/2006/flash/debugging-actionscript David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/ "Luck is the residue of good design."