-
hit test inside IF condition
ive tried with this script (as2)
on (press) {
if (triggermc._visible == true) {
if (d1.hitTest(_root.d2.hit)) {
d1._visible = false;
}
}
}
to combine on button function with if condition and hit test but it isnt working.
It should activate "d1.hitTest(_root.d2.hit)" only when "triggermc._visible == true", and result of that interaction should be "d1._visible = false;"
Is the problem in fact that i have two if conditions in a bunch or something else, is it possible at all to combine two if function in this way.
-
Prid - Outing
Please provide FLA file
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
hers the file
https://rapidshare.com/files/1154379669/Untitled-1.fla
as you will see all that complication was because i want to make d2,d3,d4....and so on disappear when you hold pressed mouse button and hit them with clip which represent cursor (move over them) , and make it work only when trigger mc is visible ( which will tell if you are pressing mouse button or not) please help.
-
Prid - Outing
Remove all code from frames and buttons, and use this one code on your Frame:
Actionscript Code:
Mouse.hide() startDrag(d1,true); triggermc._visible=false;
down = false;
onMouseDown = function(){ down = true; _root.triggermc._visible = true; }
onMouseMove = function(){ if(down == true){ for(i=2;i<6;i++){ if(_root["d"+i].hitTest(_root.d1._x, _root.d1._y, true)){ _root["d"+i]._visible = false; } else { _root["d"+i]._visible = true; } } } }
onMouseUp = function(){ down = false; _root.triggermc._visible = false; }
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
-
Prid - Outing
no problem, glad it helped
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
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
|