-
Hi all,
I am trying to build a card game, where in, when I click on a "hit" button a movie on the maintime line duplicates itself once. So every time I click on this, the MC duplicates,
On (Release)
Set Variable: "/:i" = /:i+1
Duplicate Movie Clip ("/card", "card" & /:i, /:i+1)
Set Property ("/card" & /:i, X Position) = /:xvalue+(i*xwidth)/4
Set Property (""/card" & /:i", Visibility) = "True"
Begin Tell Target ("/card" & /:i)
Go to and Stop (Random(53)+2)
End Tell Target
Stop
End On
I have a "stand" button which does the same but duplicates another MC on the main timeline.
On (Release)
Set Variable: "j" = j+1
Set Variable: "stand" = 1
Duplicate Movie Clip ("/dealercard", "dealercard"&/:j, /:j+1)
Set Property (""dealercard" & j", Visibility) = "True"
Set Property ("/dealercard" & j, X Position) = /:xvalue1+(j*xwidth1)/4
Begin Tell Target ("/dealercard" & j)
Go to and Stop (Random(53)+2)
End Tell Target
End On
The problem starts when I click on the "hit" and duplicate one set of MC and then move on to stand to duplicate the other MC, the duplicated HIT MCs starts disappearing everytime I click on "Stand".......this happens vice versa tooooooo.....
Has anyone faced a similar problem with Duplication????!!!!
----------------------------------------------
( :: veejay :: )
-
Senior Member
Hi I dont know if this is going to fix your code but this is what I have in mind:
Set Property ("/card" & /:i, X Position) = /:xvalue+(i*xwidth)/4
the expression is not right should be changed to :
Set Property ("/card" & /:i, X Position) = /:xvalue+ (/:I* XWIDTH)/4
this is what I changed (i*xwidth)/4 because you pass all the stuff to the main time line
Does it make sence ?
Mad-Sci
-
thanks:)
hi Mad-Sci,
The problem was due to the depth('j'&'i'). They took the same values for increment. I now have added 100 to J's increment everytime. Silly I over looked this problem....
Thanks anyway...
--------------------------
( ::veejay:: )
-
Senior Member
OL RIGHT
Very good, what about the above note still seems not right though.
Mad-Sci
-
Not Exactly!!!!!
hi Mad-Sci,
Since the script is on the main time line it works without "/:".
----------------------------------------------
( :: veejay :: )
p.s: need to catch some sleep, its nearing day break here..zzzzz
-
Not Exactly!!!!!
hi Mad-Sci,
Since the script is on the main time line it works without "/:".
----------------------------------------------
( :: veejay :: )
p.s: need to catch some sleep, its nearing day break here..zzzzz
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
|