Dynamic Object Reference (Flex 4/AS3)
hello,
i working on jigsaw puzzle game using flex 4. have created puzzle object group containing of pieces. when puzzle object created dynamically create of pieces using as3.
where problem occurs in moving pieces around puzzle area. pieces kind of complex. tree goes bordercontainer > group > image. format important pieces contain correct portion of image. noticed through debugging have done that, obviously, clicking image piece generates image click event, not border container click event. important because when move pieces want move border container.
so given click event target become image click on, suggestions access border container in click event. again end goal move border container.
fyi: have tried phrase "event.target.parent.parent", first parent being group, second border container. as3 doesnt understand second parent reference, returns group. cannot reference border container use startdrag function. also, means cannot move selected piece front of ui.
thanks replies in advance .
try setting mousechildren=true , mouseenabled=true on bordercontainer,
and mouseenabled=false on group , maybe on image well.
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment