Flasher Archive

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


Subject: RE: FLASH: Re: duplicating dots (was blank)
From: Nathan Dicken
Date: Thu, 16 Mar 2000 13:52:55 GMT

Scott,

In this case, the values initially for "x" and "maxdots" should be string
literals. Using expressions as their values would mean that you'd want the
value of "x" and "maxdots" to be the value of another variable or the
result of an expression. If you set x = 1 instead of x = "1", you'd
initially be setting "x" to be true, because using 0 and 1 as expressions
rather than string literals gives false/true values respectively. I hope
that answers your question...

Also, if you're trying to view the value of x as it goes through the loop,
you would't see anything else besides 10... The playhead would need to
exit the frame with the loop action in it before the value of x in the text
field is updated. This is similar to the "updateStage" command in Lingo.
Even if you could see the x updated as the loop took place, it would
probably be way too fast to see any values between 1 and 10.

Just to test it out, did you try changing the depth variable in the
Duplicate MC line from 1 to x or -(x)? I also didn't have the path to the
dot mc as "/dot" as you needed. Those changes should hopefully solve your
problem. Give this code a try:

Set Variable: "x" = "1"
Set Variable: "maxDots" = "10"
Loop While (x < maxDots)
Duplicate Movie Clip ("/dot"&x, "dot"&(x+1), x)
Set Property ("/dot"&(x+1), Y Position) = getProperty("/dot"&x,_y) + 20
Set Variable: "x" = x+1
End Loop

That worked fine when I tried it out.

Nathan Dicken
Fusionary Media



>Nathan,
>Thanks for the input. The x+2 that I sent at first was a typo. I meant x+1.
>I put in what you sent me and I get the same results. First off, with the 2
>variables (x and maxdots) shouldn't the value be expressions and not string
>literals? The way I am viewing what is happening is that I have a text box
>that shows me the value of x. What I get is the screen loads with 2 dots and
>the box says that x equals 10.
>
>Any ideas?
>
>SJ
>
>-----Original Message-----
>From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of Nathan
>Dicken
>Sent: Wednesday, March 15, 2000 12:48 PM
>To: flasheratchinwag [dot] com
>Subject: FLASH: Re: duplicating dots (was blank)
>
>
>Scott,
>
>Your new duplicated dots are being placed in the same location each time,
>not 20px over from each new dot. Also, being that x = 2 to start out with
>and your incrementing it by two each time through the loop, you're only
>going to get four dots. You could change it to be something like this...
>
>Set Variable: "x" = "1"
>Set Variable: "maxDots" = "10"
>Loop While (x < maxDots)
> Duplicate Movie Clip ("dot"&x, "dot"&(x+1), 1)
> Set Property ("dot"&(x+1), Y Position) = getProperty("dot"&x,_y) + 20
> Set Variable: "x" = x+1
>End Loop
>
>Hope that helps...
>
>Nathan Dicken
>Fusionary Media
>
>
>
>>What is wrong with this loop? I am trying to take a MC(in this case a dot)
>>and make 9 copies spaced 20px apart. Something is up with the loop. It
>makes
>>one copy and moves it then x jumps to 10 and the loop stops running. What
>>have I done wrong?
>>
>>
>>Here is my code:
>>Set Variable: "x" = 2
>>Set Variable: "ypos" = GetProperty ("/dot1",_y)
>>Loop While (x < 10)
>> Duplicate Movie Clip ("/dot1", "dot"&x, 1)
>> Set Property ("dot"&x, Y Position) = ypos + 20
>> Set Variable: "x" = x + 2
>>End Loop
>>
>>
>>
>>
>>Scott Jeppesen
>>Programmer
>>University Access
>>6255 Sunset Boulevard, Suite 801
>>Los Angeles, CA 90028
>>(323)460-2149
>>http://www.universityaccess.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
>
>
>
>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



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: Re: duplicating dots (was blank), Nathan Dicken
  RE: FLASH: Re: duplicating dots (was bla, Scott Jeppesen

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