stay in the middle


what have movieclip moves around on background.

what want movieclip move around on background , background move negatively movieclip centered in flash player.

 

i understand move background , keep object want focused on in static position , focus may shift 1 object keeping moving in interests.

 

it sounds simple enough when tried doing didnt come out planned.

and im sure been done countless times figured id ask incase knew how done off hand

i wouldn't there's 1 correct way of doing it. sounds want clip fixed , when clicked movement of mouse affects background rather clip itself.

 

in case need listen mouse_down , mouse_up. on mouse_down should add listener mouse_move , based on amount moved, move background (not clip clicked). that, every time mouse_move fires, keep track of mouse on stage via stage.mousex / mousey upon mouse_down , adjust every mouse_move event.

 

for mouse_up i'd both attach listener stage. chances user won't keep mouse on object won't receive mouse_up, stage once let mouse go. once receive that, remove listener mouse_move background stops moving.

 

consider listening other focus/unfocus events incase user clicks , drags outside stage area swf doesn't stuck listening mouse_move forever.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Could not place because the source rectangle is empty

Thread: Using smartcard reader with vpnc

Adobe Font Folio 7.0 or just 7?