-
hi,
is it possible to make a tell target containing a variable, i mean that target movie clip is designated by a variable. And how could it be wrritten ?
thanks in advance.
-
[Devil in DarkGreen]
if you use flash 5
for a mc in main scene instance name is "a"
there is a var is "b"
_root.a.b=c;
that is ok
A D.S
-
thank you for so a quickly response !
unfortunaly i'm working on flash 4 and i don't know if _root will be understood cause i'll never heard about it. So you show me how to use it, but could you explain me in which case you use what is for me a new function (and its syntax)?
thanks
-
target
I wrote in only last night about this, but got not replys, however I got it figured out. If you be more specific I may be able to help you out. cheers mgb
-
re-target
hi,
so... the background :
i have different swf and each one of them's containing a different sound. Those different movies could be charged on my main scene using a load movie with variable (variables areloaded from a text file)(...the user can chose the sound).
on my main scene i've got a mc containing a buton to control (start and stop) the sound.
the problem :
to interact on sound with the buton in the control mc i want to use a "tell target" action with a "goto".
but the swf files have different names.So i think i have to put a variable in the tell target action, which refers to the sound mc name...
am i clear ? not sure
-
have i got it ? perhaps...
i thougt to it just after posting my novel
the swf files with sound could all have the same instance (occurency), no matter with the name is. So i can forgot the "tell target" with a variable...
for this time, because i still wonder if it's possible to put a variable in the "tell target" and how could it be writen ?
1001 thanks
-
Re: re-target
To use the variable as tell target you need to find out what the variable is and load the corrosponding .swf
Use something like this.
If (myvariable=1)
load movie .swf 1
Else if (myvariable=2)
load movie .swf 2
Else if (myvariable = 3)
load movie .swf 3
or
If (myvariable=1)
Tell target
mc1
play
End tell target
Else if (Myvariable =2)
Tell target
mc2
Play
End tell target
etc.
[Edited by mgb on 10-20-2000 at 07:36 PM]
-
Yes, you can target it with variable
Ecample : (all this works for me)
Code:
Set Variable: "ani"&i&"/font:text" = Substring ( text, i, 1 )
Set Property ("ani"&i, X Position) = getproperty("ani0",_x)+space*i
If, for example, i=1, then the first action wil target ani1/font, while the second one will target ani1
-
thanks for all... and just one more.
And there was light !
with your help i understand how to make a tell target with a variable. But i've got a large choice of swf, so, if i verify the condition with an "if" i should have a water fall of it, and that could make the size heavier.
"If" i well understand, could i have a script like this ?
Load Variables ("test.txt", 0)
Set Variable: "s" = sound
Load Movie (s&".swf", 0)
assuming sound looks like sound=2 or any other number .
thanks a lot
-
Assuming sound=2, then the action
Code:
Load Movie (s&".swf", 0)
Set Variable: "s" = sound
will load the movie 2.swf
Well Done,
-
thank you very much
thank's for all this help !
i began to better understand why, how and when using variables grace to you and everybody using this forum...
a nice and great place !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|