Flasher Archive

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


Subject: RE: FLASH: Setting text fields in a MC as the instance is created
From: Tim Walters
Date: Wed, 23 Feb 2000 00:52:26 GMT

OK, downloaded your file, looking at it now.

First thing, your main timeline needs at least 3 frames... I like to move
all code to a "Script" layer, that way I don't have to duplicate objects to
have an extra frame for actions (see modified code).

I moved your initial TellTarget statement to the Script layer on frame 2,
and added a Stop action to frame 3 of the main timeline (wont stop Calc,
just stops the main timeline.

Next point, Calc looks pretty good, but the instance names jump around a
bit... what should stay as ins1 changes to ins2, then back to ins1 again?

You don't even need the additional keyframes if the object isn't changing
(once it's "in place"). I've removed un-needed keyframes in my
modification.

Now, within Calc, you either use TellTarget to access variables OR use their
full/relative path, you've doubled up, so the end result is it's looking in
"Calc/ins1" for a variable called "Calc/ins1:txtCalc", on top of that, it's
looking for all of this INSIDE Calc.. so in the end, you're looking for
_level0/Calc/Calc/ins1/Calc/ins1:txtCalc ... needless to say, it's failing
on the call to tell target.

Method I would recommend for setting variables:
* The script is in "/Calc", so that part of the path isn't needed
* Dont bother with TellTarget
* Use "SetVariable(ins1:txtCalc, 1)" format, easy and simple, or if you want
to refer to the variable from anywhere, use the absolute path
"SetVariable(/Calc/ins1:txtCalc, 1)".

Another thing to be aware of... if you try controlling a MC before it has
loaded, you will get unpredictable results... that's why the code to start
"Calc" is in the frame after Calc is place, we know at this stage that Calc
is loaded.

Anyway, I'll place my modified FLA up for you to download at:
http://www.glasshouse101.com.au/test/calc-fixed.fla

Hope this helps!

---
Tim Walters MVP
Glasshouse101
timatglasshouse101 [dot] com [dot] au

> -----Original Message-----
> From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of
> DeJarnett, Gary
> Sent: Wednesday, 23 February 2000 2:22 AM
> To: 'flasheratchinwag [dot] com'
> Subject: FLASH: Setting text fields in a MC as the instance is created
>
>
> I�m needing a pop-up keypad for some of my work and wanted to make it a
> short Flash movie where each key �unfolded� from the previous key
> until the
> keypad is built. It�s hard to explain, but I have uploaded calc.fla to
> ftp://206.107.180.51/GaryDJ/calc.fla
> <ftp://206.107.180.51/GaryDJ/calc.fla>
> . Anyone interested in helping out with this question will
> probably need to
> be looking at it to understand.
>
> On the main stage, there is an instance (Calc) of a movie clip
> (movOpenCalc). If you open this movie clip and play it, you�ll see the
> �unfolding� effect I�m after. Each button is an instance (ins1,
> ins2, etc�)
> of the movie clip movCalc. For example, to see ins1, go to frame
> 2 in layer
> 1 after hiding layers above it. To see where ins2 appears, go to frame 11
> after hiding layers above layer 2. Each button has a variable text field
> (txtCalc) which will hold the digit of the number of that keypad
> button. It
> is initially the number 4, but as each instance is created, I want to move
> the real keypad number into that field. For example, after creating the
> first button, I move a 1 to the text field on that instance. That works
> fine. On all subsequent buttons, though, the number I move to the text
> field never gets loaded (see frame 11 of the top layer (named code), it
> says, Set Variable: "Calc/ins2:txtCalc" = 2. This statement is
> executed in
> frame 11, because that is where this instance first appears (while the 3rd
> button is �unfolding�).
>
> If anyone can explain why a 2 is not moved into the text field on
> the second
> instance, I would appreciate it. I�ve studied tell targeting and
> thought I
> had it down, but I must be missing a concept somewhere. A second question
> is why my tell target on the first frame of the timeline of the main movie
> is not playing movOpenCalc when I test it. I have Go to and Play
> ("Begin")
> and Begin is the second frame of the movie clip, so the Stop action in the
> first frame should be ignored. Again, I�m obviously missing something.
> Feel free to tell me which part of John�s book I need to reread
> in order to
> get this stuff straight in my head. If it would help in your explanation,
> I�d also be glad for you to replace the broken version with a modified
> version at the FTP site.
>
> Thanks for all your help in the past, and for listening to this problem,
>
> Gary (dejarnettatttu [dot] edu <dejarnettatttu [dot] edu (mailto:dejarnettatttu [dot] edu)> )
>
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and The Flash Film Festival
> "The World�s Premier Flash Solutions Conference and Expo"
> March 27-29, Nob Hill Masonic Center, San Francisco, California
>
> -Register before Feb 25 and save $200!!-- www.flashforward2000.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>
>


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Setting text fields in a MC as th, DeJarnett, Gary

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