Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: Flash 5 basic questions - programming |
From: | Helen Triolo |
Date: | Wed, 18 Oct 2000 02:26:47 +0100 |
Jeff,
Not sure if this will help, but here's the difference as I see it with
movieclips in Flash 5. They are now real bonafide objects, like all the
other objects that other object-oriented languages include (like arrays,
date objects, string objects, etc). One thing this means is that you
address them with object paths (rather than Tell Targets), as in the
statement
_root.mcOuter.mcInner._x = 30
to set the x position of movieclip mcInner inside movieclip mcOuter that
lies on the main timeline (_root) to 30. This is how you set a property
for *any* object, so no special commands (tell targets, eg) are needed
for movieclips.
And as far as where the code goes, since movieclips are now objects, the
code for them goes into the Object Actions for the object (like you'd do
for a button), not into the frames (as with F4). To accomplish this,
you just drag an instance of the mc to the stage, then click ctrl-alt-a
to open the Object Actions tab and type in your code there. If you want
the stuff to be done only once, put the code inside an onClipEvent(load)
routine -- executed when the mc is first loaded. If you want it to be
done in a loop (every time the mc is executed), put it inside an
OnClipEvent(enterFrame) routine. Best way to see all of this in action
is to look at some F5 routines -- Branden's or Flashkit's F5 section or
I have some in my F5 journal (url below).
As far as "calling an mc from the library", the only thing I can think
of like this is the new attachMovie command (method), which allows you
to use a movieclip that's in the library (and that's been set up for
this by right-clicking on it and giving it an export name) without
having it exist on the stage anywhere.
OK, enough blabbing (not sure if I'm clarifying or muddying things
further...),
Helen
---------------------------------------------------
Flash 5 Journal: http://i-technica.com/flash5
Flash Q&A archive: http://i-technica.com/flashlist
Jefferis Peterson wrote:
>
> >Subject: Re: FLASH: Flash 5 basic questions - programming
>
> >Sorry... those events are sent to movie clips, and so they're available
> >when you select a movie clip.
>
> >
> >Frame scripts are triggered when played, so an "onClipEvent" wouldn't be
> >handled there. (You can define a function in a frame script if you like,
> >but "onClipEvent" messages are sent to movie clips, rather than frames.)
> >
> >jd
>
> Thanks again, jd
>
> Okay, perhaps I am expecting the new scripting to be able to do more than
> I thought it could do. When I tried to load an MC into a frame with code,
> I got the error message
> "Generator item [or something like that ] not available. "
>
> So, unless you are using Generator, you have to physically load and place
> an MC or Symbol on the main timeline stage, rather than just call it from
> the library... ?
>
> Am I also correct in saying that Tell Target is being deprecated?
>
> Jeff
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
Replies
FLASH: Flash 5 basic questions - program, Jefferis Peterson
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]