Flasher Archive

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


Subject: Re: FLASH: Change variable into a duplicated MovieClip
From: Robert Bleeker
Date: Mon, 8 May 2000 12:13:40 +0100

Hi Antonio,

First of all the Random(60)+1 will never return 01 to 09 but 1 to 9. Just
remember that when you generate your "v1","v2","v3",......,"v60" variable
names.

Then your code should be:

Set Variable: "seccion"= Random (60)+1
Duplicate Movie Clip ("/esta", "repe"&var, var)

Comment: "Here is the change!"
Set Variable: "/repe"&var&":ad"= Eval("v"&seccion)


Set Property ("repe"&var, X Position)= Random(550)
Set Property ("repe"&var, Y Position)= Random(400)
Set Variable: "var"= var+1
Go to and Play (1)


Done.

Robert


on 8/5/00 8:48 PM, Antonio at antonioatalikezone [dot] net wrote:

> Hi everybody,
>
> i will try to explain my problem with my not-very-good english :)
>
> i have in my Flash' movie a MovieClip with a text field. In the movie i
> duplicate the MovieClip, but i'd like to change the text of that variable
> everytime the MovieClip is duplicated.
>
> In the first frame of the movie i set 60 variables, named v01, v02, v03,
> etc........
> I use the Random action to get a random number and i add the "v" to this
> number.
>
> It works fine when i change the text in the original MovieClip, but it
> doesn't work when i try to change the text in the duplicated MovieClips
> (they have diferent name).
>
> This is the code i wrote to try to change the duplicated MovieClips
>
> Set Variable: "seccion"= Random (60)+1
> Duplicate Movie Clip ("/esta", "repe"&var, var)
> Set Variable: "/repevar:ad"= Eval("v"&seccion)
> Set Property ("repe"&var, X Position)= Random(550)
> Set Property ("repe"&var, Y Position)= Random(400)
> Set Variable: "var"= var+1
> Go to and Play (1)
>
>
> "ad" is the name of the text field into the MovieClip.
>
> Can someone help me a bit? Thanks in advance.
> Antonio


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Change variable into a duplicated, Antonio

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