Slight problem, I have a flash game in which i have a target following my mouse cursor and when i hit an object the score rises all working ok.
But when i hit the target then move my mouse cursor off the target Score Stops (which is fine) But while still with my mouse clicked i move back onto the target score needs to continue to rise and with my code below it stops.
The target **cog_mc.hitTarget_mc **needs to detect the mouse has been pressed and when you rollover with mouse still pressed score needs to rise.
Do i need some type of listener or Loop?
my code for this part is below, thanx!
cog_mc.hitTarget_mc.[COLOR=#000087]onMouseDown[/COLOR] = [COLOR=#000087]function/COLOR{
[COLOR=#000087]if[/COLOR] ([COLOR=#000087]this[/COLOR].[COLOR=#000087]hitTest[/COLOR]([COLOR=#000087]_root[/COLOR].[COLOR=#000087]_xmouse[/COLOR],[COLOR=#000087]_root[/COLOR].[COLOR=#000087]_ymouse[/COLOR],[COLOR=#000087]true[/COLOR])){
gameScore(); [COLOR=#878787]//function adds points to score[/COLOR][COLOR=#878787]
[/COLOR]
}
}
[COLOR=#878787]//
[/COLOR]cog_mc.hitTarget_mc.[COLOR=#000087]onMouseUp[/COLOR] = [COLOR=#000087]function/COLOR{
[COLOR=#000087]clearInterval[/COLOR](scorerInt); [COLOR=#878787]//function stops adding points to score[/COLOR]
}