aalavandhaann
08-10-2004, 06:02 AM
hello every1,
i would like introduce myself.Im ashok srinivasan from india.I am a flash Lunatic.I see tat Experts are there to help here.
Actually my problem is im now making a memmory game! in tat i have a base MovieCLip callled "Card" which im duplicating it through a loop
the names of the card are "card0r0" to "card0r9" and "card1r0 - card1r9"
Everything is fine and the cards are getting duplicated perfectly.so when i click a click i use "this.play()" to play the card so the frames in the card animation starts playing and it stops in the open Statewhere the user can see a picture.Noe there is a variable called "Clicked" which is incremented on every click. this variable is for controlling the Maximum number of cards to open to be only 2 at a time.
So when the user clicks the first card the card opens and the click value is increnmented by1.the Card plays and stops in the open state.in tat frame im calling a function in the Main root timeline.
the function is as follows
function Validate(a,b)
{
if(Click == 1)
{
TempId = a
TempName = b
Stay = false
}
if(Click == 2)
{
TempName = eval(TempName)
CurrentName = eval(b)
if( a == TempId)
{
trace("Card Matches")
}
else
{
TempName.play()// line to be noted CurrentName.play()// line to be noted
}
Click = 0
}
}
Hope u would have got a fair idea of wat the function does.if the click is 2 then it is understood tat there are two cards open and the validation is done.If the cards dont match they are meant to lay the closing sequence animation.
The porblem i encountered here is u can see the commented lines "lines to be noted" there the first card closes correctly and the second one does not.
Wat does this all mean ? is it tat when more than one movie in a set of duplicated movie clips from single source cannot have their timeline controlled at the same time?
but the trace messages give the name and id of the movie clips correctly.
please help me on this !
i would like introduce myself.Im ashok srinivasan from india.I am a flash Lunatic.I see tat Experts are there to help here.
Actually my problem is im now making a memmory game! in tat i have a base MovieCLip callled "Card" which im duplicating it through a loop
the names of the card are "card0r0" to "card0r9" and "card1r0 - card1r9"
Everything is fine and the cards are getting duplicated perfectly.so when i click a click i use "this.play()" to play the card so the frames in the card animation starts playing and it stops in the open Statewhere the user can see a picture.Noe there is a variable called "Clicked" which is incremented on every click. this variable is for controlling the Maximum number of cards to open to be only 2 at a time.
So when the user clicks the first card the card opens and the click value is increnmented by1.the Card plays and stops in the open state.in tat frame im calling a function in the Main root timeline.
the function is as follows
function Validate(a,b)
{
if(Click == 1)
{
TempId = a
TempName = b
Stay = false
}
if(Click == 2)
{
TempName = eval(TempName)
CurrentName = eval(b)
if( a == TempId)
{
trace("Card Matches")
}
else
{
TempName.play()// line to be noted CurrentName.play()// line to be noted
}
Click = 0
}
}
Hope u would have got a fair idea of wat the function does.if the click is 2 then it is understood tat there are two cards open and the validation is done.If the cards dont match they are meant to lay the closing sequence animation.
The porblem i encountered here is u can see the commented lines "lines to be noted" there the first card closes correctly and the second one does not.
Wat does this all mean ? is it tat when more than one movie in a set of duplicated movie clips from single source cannot have their timeline controlled at the same time?
but the trace messages give the name and id of the movie clips correctly.
please help me on this !