VERY EZ HITTEST PLEASE HELP
i am trying to build very simple hittest but i am getting stuck. The main thing i am trying to do is give the hitTest every ez actions. what i did was built two Clips, and when the one clip that is attached to the mouse, then hits the other clip= i just gave it _root.clip.gotoAndPlay(1);. but it is not working right i have more then one clip i want to use this for i did in two but it only works in on clip. i am trying to get the same felling as http://www.directiondesign.nl/index.html.
if you want to look at what i have done please feel free http://www.lyfted.com/site/Lyfted_vo.1.swf
i hope this make sense
Thank you.
Ryan
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-18-2002, 03:34 PM
View Complete Forum Thread with Replies
Sponsored Links:
How To Take Time From HitTest True To HitTest False?
hi
i have 2 MCs one is going through the other
and i want to take the time from the beginning
to the end.my code is this:
onClipEvent(load) {
this._visible = 0;
}
onClipEvent(enterFrame) {
first = new Date;
second = new Date;
indicator = 0;
if(!indicator && this.hitTest(_root.rocket)) {
indicator = 1;
sec = erst.getSeconds;
mil = erst.getMilliseconds;
begining = sec add ":" add mil;
}
if(indicator && !this.hitTest(_root.rocket)) {
indicator = 0;
seco = zweit.getSeconds;
mill = zweit.getMilliseconds;
end = seco add ":" add mill;
xposi = getProperty(_root.rocket, _x);
yposi = getProperty(_root.rocket, _y);
position = xposi add yposi;
}
}
further i want to show begining, end and position in 3 different textfields, but nothing works at all !!!
can it be, that it doesn`t work, because "this" is a symbol
in a symbol?!?
thx
bo
View Replies !
View Related
Hittest=false, Trying To Do The Opposite Of Hittest.
This question may have such an easy solution it might be worth for the newbies section...
I need an mc to do an action (go to a certain x point) whenever the mouse ISN'T over a particular box. So basically I would need to revert the typical
if (hitTest( _root._xmouse, _root._ymouse));
Anyone knows how to do this?
Thank you soooo much!
View Replies !
View Related
HitTest...creating The Opposite Of A HitTest
When I roll over a mc an enter frame triggers a function that is designed to evaluate when the mouse moves off the mc...how do you test for the opposite of a hitTest? I though in an "!", but didn't work.
PHP Code:
var buttonTarget:String = "targetMarkets_mc";
root[buttonTarget].addEventListener(MouseEvent.MOUSE_OVER, overHandler);
function overHandler (event:MouseEvent){
root[buttonTarget].gotoAndStop ("active");
root[buttonTarget].addEventListener(MouseEvent.MOUSE_MOVE, mouseEval);
};
function mouseEval (event:MouseEvent) {
if (!root[buttonTarget].hitTestPoint (mouseX, mouseY, true)) {
root[buttonTarget].gotoAndStop ("inactive");
root[targetMC].removeEventListener (MouseEvent.MOUSE_MOVE, mouseEval);
}
};
Also, how do you remove the event listener? Is there a need?
View Replies !
View Related
[hitTest/Mask] Can A Mask Hide A HitTest Area?
Hi, the subject pretty much says it all. I have the following code:
ActionScript Code:
volume.onEnterFrame = function() {
if (volume.hitTest(_xmouse, _ymouse, true)) {
_root.nextFrame();
} else {
_root.prevFrame();
}
};
...and here is the link. Move your mouse under the bar and move it up slowly under the the speaker next to the number. See what happens? Keep in mind that the look is still being perfected, I was just wanting to know if there were a way I could fix the problem or do I just have to start thinking of a new look for it? Thanks in advance.
(PS: let me know what you think of the look and layout please)
View Replies !
View Related
HitTest Again
hi, I'm trying to create a game that is similar to moon lander. How do I write the hitTest? I know i will have to use hitTest with the x and y coordinates but there are so many coordinates for the irregular mountain, how should I write it?? I mean it is riddiculous to write down all the coordinates manually right. So anyone knows how to write that part?
View Replies !
View Related
HitTest?
Ok, I have a quick question.. I've created my first game in Flash 5 and up till now when I did collision detection in Flash 4 I didn't have the option of "hitTest" so I have a question...
Does hit test check the reqtangular box that holds the movie clip, or does it test the content in the clip?
What I mean is if I have a triangle inside a one movie clip, and a circle in another does it only test to see if the Triangle touches the Circle or does it test to see if the 'outline/box' that holds the movie clips touch?
I've looked around for this answer and can't seem to find it anywhere?
If you'd like to see the game I'm working on you can see it in the games section of my half done site: http://members.aol.com/_ht_a/craigfriebolin/freqfestv2/
Thanks
- Frequent-C
View Replies !
View Related
HitTest() SUX
Pardon my french, but hitTest() really sux! Apart from using it for basic collision detection for a shoot out game, its useless when u really require a more precise point of impact.
hitTest() in flash sees every movie clip as a square. Now supposing your movie clip is a triangle. You movie clip only LOOKS like a triangle. It instance is actually a SQUARE!
Imagine! If your space ship is a triangle and a missile is not touching your triangle, but the SQUARE that it belongs to, you're history!
-------------------------
my $0.02 worth
View Replies !
View Related
Hittest
I want to use the hittest to detect collision.
When I press the left arrow I want to move my movie clip called "clip1" to left and when it hits "clip2" the movie should go to frame 100.
I know how to move the clip1, but how can I detect when it hits clip2?
Thx for any help
View Replies !
View Related
Hittest
anyone no how to impliment Hittest onto a MC?
i have a mc called "block12"
and mc called "playarea"
this is what iv got
onClipEvent(enterFrame){
if (playarea.hitTest("block12)){
trace ("this works");
}
}
dont work, what am i doin wrong?
View Replies !
View Related
HitTest
I have a nice hedgehog crossing the road and trying not to be hit by duplicate (" car" + n) random generated cars. I want the hedgehog to be squeshed if hit by a car.
This is the code I have so far but the '_root["car" + n]' bit isn't right
onClipEvent (load) {
if (this.hitTest(_root["car" + n])) {
setProperty ("/you", _yscale, "300");
}
}
anyone help?
Cheers.
View Replies !
View Related
HitTest
Hi,
I have two MCs in my movie. I have written code each of the MC in onClipEvent(mouseDown).I am using the hitTest function to test the click event on the MC.The problem is only the event in the second MC gets fired. If I take out the code of the second MC, then the first one gets fired.
The code is something like this
onClipEvent (mouseDown) {
_root.showdetails._visible = false;
if (hitTest(_root._xmouse, _root._ymouse,true)) {
_root.showdetails._visible = true;
_root.showdetails.countryname = "Greenland";
}
}
Please help me.
Thanks
-r-
View Replies !
View Related
HitTest ?
Code:
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
_root.fire.gotoAndPlay(2);
if (_root.fire.hitTest(box1)) {
_root.box1.gotoAndStop(2);
}
}
}
I am trying to get box1 to gotoAndStop (2) but it will not go there. Help please.
"fire" and "box1" are instance names. All elements are on the _root.
View Replies !
View Related
Hittest? I Don't Think So...
I have 2 MCs name MC1 and MC2 and I want to test if MC1 hits MC2. I did it with the following code:
Code:
if (MC1.hitTest("MC2")) {
do this
}
But the thing is, if the bounding box is hit, hittest returns TRUE. Can't I check if the first MC actually hits the second MC? Like if I have 2 circles, can I have the 2 circles touching and not just their bounding box?
Any help would be greatly appreciated!=)
View Replies !
View Related
HitTest
hitTestI have several mc on the stage with varying names.
I want an action to happen, onClipEvent (mouseDown), that checks to see if it is over none of the mc on the stage.
onClipEvent (mouseDown) {
if (?) {
actions
}
}
I know you can insert every name in the if statement, is it possible to apply script that test all without specifying their name.
View Replies !
View Related
HitTest.....
Hi,
Im trying to make a simple slideover and slideback effect.
I want to have a movie clip slide over to the right when the mouse is moved over button, and then move back when the mouse is moved off the button. Here is what I have and it not working:
function slideover(clip){
if (_root[this].hitTest(_root._xmouse,_root._ymouse, true)){
_root[clip]._x+=5;
}
}
code on the movieclip button:
onClipEvent(enterFrame){
_root.slideover(ball)
}
ball is the instance name of the movieclip I want to slideover.
the problem is that both the button movieclip and the ball movie clip move to the right.
View Replies !
View Related
HitTest Help
Okay, I need a MC to perform a hitTest action with another movie clip inside, a movie clip. the original MC instance is named money. the other MC instance name is try. the MC instance name inside the MC instance try is called "mouth". so this is what I did to perform a hitTest, i used this code in the "money"'s action script.
if (this.hitTest(try.mouth.)) gotoAndPlay ("chew"),well that's basically what i put, it keeps telling me i need a field name or something. i'm pretty sure its the parameters that I'm screwing up on, try.mouth., but if anyone could help me, i'd be very appreciative! Thanks!-Kevin
P.S. if you need anymore details, feel free to email me at kevin@bsanimation.com
View Replies !
View Related
HitTest()
is there any way of setting up a hit test to be more specific than just testing the whole movie clip? for example a hit test on a darts board only detecting a hit between a dart Movie clip and its bullseye, all other areas of the dartBoard movie clip do not register hits, Ive tried putting a Movie clip inside a movie clip i.e. a bullsEye Movie clip inside the dartBoard Movie clip and coding something like :
if(hitTest(dartBoard.bullsEye))
{
some code here
}
but this still seems to register a hit for the whole dartBoard
any help on this would be really appreciated as its something that is really bugging me at the moment
Cheers ~Beedge~
View Replies !
View Related
Help With HitTest
Is there a way to detect a collision between movie clips without having to target them?
This is what I currently have:
if (this.hitTest( _level0.target)){
do this;
}
but I don't want to target anything specific.. basically just having the clip do something when it collides with anything.
so.. something like this (if it is possible):
if (this.hitTest()){
do this;
}
View Replies !
View Related
HitTest Help....=(
Hi guys,
Below is a script which I attached to each individual piece of puzzle for my simply drag n drop puzzle game. Utimately, I would like to snap the puzzle piece to its corresponding location if a player drags it close enough to the proper place and a "click" sound will play to signal the player that "he got it". However, I can't seem to get the hitTest running correctly. Is there something wrong with my x, y coordinates or my logic is totally incorrect? Any hints or help is greatly appreciate.
onClipEvent (mouseDown) {
this.startDrag(true);
if (this.hitTest(180, 140, true) || this.hitTest(165, 125, true)) {
snap.start();
this._x = 175.2;
this._y = 136.8;
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
View Replies !
View Related
HitTest
I've got a movie clip of a ball that is bouncing around the screen using the code below within the clip. I want to make a second instance of the ball and detect collision between the two instances, if a collision is detected then the instances should reverse direction of travel in other words if they collide they bounce of each other. I've racked my brain with this and still get confused/syntax errors! Anyone able to help me?
Code:
onClipEvent (load)
{
dx = 4;// set the initial momemtum of the ball
dy = 4;
}
onClipEvent (enterFrame)
{
_x += dx; //move the ball along dx and dy
_y += dy;
if (_x < 0)
{
_x = 0; //move it back on screen
dx *= -1; //reverse the horizontal momentum
}
else if (_x > 550)
{
_x = 550; //move it back on screen
dx *= -1 //reverse the horizontal momentum
}
if (_y < 0)
{
_y = 0;
dy *= -1;
}
else if (_y > 400)
{
_y = 400;
dy *= -1;
}
}
I tried adding an extra if statement to the end of the code
Code:
if (this.hitTest(ball2))
{
dy *= -1;
dx *= -1;
}
but it didn't work.. I know there should be some other stuf f in there too.. any help greatly appreciated.
View Replies !
View Related
HitTest Help
I've made a simple maze game that works fine.
Problem is, when I try to import the .swf into another .swf, my hitTest doesn't seem to work.
Take a look:
http://www.punchpuppet.com/maze/maze.html
works fine, but
http://www.punchpuppet.com/maze/load_maze.html
It's the same game. In load_maze.html, I've simply created an MC, and used loadMovie to import the .swf. I've also resized the game to 75%.
Here's my hitTest code:
if (Key.isDown(Key.LEFT)) {
kids._rotation = 0;
kids._xscale = -100;
kids._x -= 3;
if (this.maze.hitTest(this.kids._x, this.kids._y, true)) {
kids._x += 3;
}
} else if (Key.isDown(Key.RIGHT)) {
kids._rotation = 0;
kids._xscale = 100;
kids._x += 3;
if (this.maze.hitTest(this.kids._x, this.kids._y, true)) {
kids._x -= 3;
}
} else if (Key.isDown(Key.UP)) {
kids._rotation = -90;
kids._y -= 3;
if (this.maze.hitTest(this.kids._x, this.kids._y, true)) {
kids._y += 3;
}
} else if (Key.isDown(Key.DOWN)) {
kids._rotation = 90;
kids._y += 3;
if (this.maze.hitTest(this.kids._x, this.kids._y, true)) {
kids._y -= 3;
}
Any help would be appreciated.
Thanks.
View Replies !
View Related
HitTest Help Please
Hi Everyone,
I want to write an hitTest code for the following.
I have 2 Movie clips.
1.myBall1
2.myBall2
What i want it to do is when i drag myBall1 over myBall2 it will stay on top of myBall2 and stop dragging and vica verca.
Thanks In Advance!
Blue Dragon
View Replies !
View Related
HitTest
I was wondering how I could use HitTest to detect collisions, among the moving movieclip. And any other clips by giving the static clips a certain propertie or sumtin.
I hope I made myself clear... Thanx
View Replies !
View Related
Some More Hittest...
If you have a hittest thing like:
movie x.hittest(movie y)
when you have this, how do you get it to check if movie x is touching movie y and then do something, like go to frame 10???
eg. If true, gotoandplay frame 10
or wotever it would look like
View Replies !
View Related
Hittest.
okay there is HitTest when ever i want to check if my mouse is over an object.
but is there a test when (or a way) when i can check if my mouse is not on the object??? i mean when it where ever...
out of the flashplayer window... doesn't metter, as long as it not over the object.
i mean i got this if and i want to check if mouse is not over the object then move other object right.
as when ever it is move other object left.
how can i do that???
View Replies !
View Related
Help With Hittest
Just wondering if it is possible to stop a hitTest action after one hit, so that the code doesn't repeat and can be used for multiple instances.
say there is four balls and one square. The squre adds 1 to a variable called numbers everytime it hits one of the circles, but the circles can only add one to the variable and must not repeat. Also once a hit has been made it cannot be made again until a reset button has been pressed.
Can anyone help me with this, thanks
View Replies !
View Related
HitTest In MX
Hello Flashers,
I am having a problem with using hitTest in MX.
This is placed on a mc which is in another mc -
if (this.hitTest(_root.xmouse,_root.ymouse, true)){
trace("hit");
}
Not only does it not work but I get the following error:
Symbol=hong kong, Layer=Layer 1, Frame=1: Line 1: You must export your movie as Flash 5 to use this expression.
if (this.hitTest(_root.xmouse,_root.ymouse, true)){
Does that I can only use hitTest with Flash5? This error is very confusing.
Please help!
jayne
View Replies !
View Related
Help With .hitTest
Ok, i have a game that im making, it consists of 3 m.c's named ship,bullet,gun. on the main timeling i have:
if (_root.["bullet"].hitTest(_root.["ship"])){
gotoAndStop(2)
}
Now You can control the bullet's x,y with the keys, why wont the hitTest work
Luke
View Replies !
View Related
HitTest?
im making a simple platform game... my MC's, which is the character that you have control of, y value increases by 5 evry frame (at 20fps) to cheaply simulate gravity. how do i make it so that the MC wont go thru the ground?
View Replies !
View Related
Hittest
hi thre
I have some difficulty in forming a HITTEST
the following codes are for the "hittest"
ý am supposed to draw two rectangles of different color(how many layers?..)
--and a circle mc
--and a text box nameing it "information"
--attaching codes to..?
if (circle.hittest(red))
{
information = "The Circle Hit Red";
}
if (circle.hittest(blue))
{
information = "The Circle Hit Blue";
}
8.In the second frame give action
gotoAndPlay (1);
9.press ctrl + enter to test the movie.
PLEASE HELP ME FIND OUT MY MISTAKE..CAUSE THIS IS A GOOD EXAMPLE TO UNDERSTAND BOTH "IF" STRUCTURE..TEXT FIELDS..AND "HITTEST"
thanks a lot
View Replies !
View Related
Need HitTest Help
I've got the base for a kind of scavenger hunt game going. I have a top-down view of my player and he moves around horizontally, vertically, and diagonally all with the arrow keys. I have to make him stop moving when he bumps into objects with an instance name of "stops" then be able to walk away (like in real life, you can't walk through a tree, so you smash into it, then walk away).
This is the code I've got for the movement of the character:
onClipEvent (load) {
speed = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT) && !Key.isDown(Key.RIGHT)) {
_x -= speed;
_rotation = 270;
}
if (Key.isDown(Key.RIGHT) && !Key.isDown(Key.LEFT)) {
_x += speed;
_rotation = 90;
}
if (Key.isDown(Key.UP) && !Key.isDown(Key.DOWN)) {
_y -= speed;
_rotation = 0;
}
if (Key.isDown(Key.DOWN) && !Key.isDown(Key.UP)) {
_y += speed;
_rotation = 180;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.UP) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.DOWN)) {
_rotation = 315;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.UP) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.DOWN)) {
_rotation = 45;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN) && !Key.isDown(Key.RIGHT) && !Key.isDown(Key.UP)) {
_rotation = 225;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN) && !Key.isDown(Key.LEFT) && !Key.isDown(Key.UP)) {
_rotation = 135;
}
}
Please help me out: I need some kind of hitTest function for the character to bump into things, and not go through them. The movement code might need to be modified to accomphish this.
I have been trying all day to do this on my own, but I just can't (I'm only 14 years old).
Can anybody give me a hand?
-Cmonkey9
View Replies !
View Related
HitTest
hi,
help me to create a HITTEST action..in which a "red circle" first hit a "blue circle" then a "green circle" and each time it hits "blue circle"let my "text field" write "I am blue" and .."I am green"
**where should I paste the codes***where/when should I create a motion tween for the red circle? .. they all should be on different layers shouldn't they?I have been trying this movie.for 3 days...but I fail..
and send me a"fla..swf.." if u can
View Replies !
View Related
HitTest
I downloaded a fla from actionscript.org of a game with a ship/w laser. I wanted to try placing an object on the game and use hitTest so when the laser hit the object that something would happen. Well I dont know where I should put the hitTest. Should it be on the duplicated laser or the object that I placed in the game
View Replies !
View Related
HitTest
I am trying to make a playhead that, when it moves across the viewing plane, it will play sounds based on whatever objects it touches. I already have the objects linked up to the sounds, and I already have the working playhead, but I can't seem to get the hitTest to work properly. If someone knows how to fix this, it would be greatly appreciated.
View Replies !
View Related
HitTest
is it only possible to do hitTest-areas as squares? I mean, can't you do them as any shape you like? i asked a guy who works with flash daily, and he said he didn't think so, or he didn't know...
/bensa
View Replies !
View Related
HitTest?
Hi guys!
here is my dilema:
I want to make a game and for that I have to figure it out how my main character can sense an anemy... the character is a movie clip, and the obstacle or the anemy i want to be loaded from the game folder.
I can do the loading part but once loaded I do not know how can I tell him that in hitTest with my character the movie loaded should play frame 2..
anybody did that ever?
THNX,
Ovidiu
View Replies !
View Related
Need A Hittest... I Think
I have a polygon with draggable corners. On release it loads another page. Now the problem is that when a corner is dragged over another and is released it doesnt load the required page.
Do I need to do a hittest or can I simple disable the other MC's from being clickable to that point, and have them active again when the button is released?
Code:
// Reset to Initial Locations.
ResetArrayx = [_root.dot1._x, _root.dot2._x, _root.dot3._x, _root.dot4._x, _root.dot5._x, _root.dot6._x, _root.dot7._x, _root.dot8._x];
ResetArrayy = [_root.dot1._y, _root.dot2._y, _root.dot3._y, _root.dot4._y, _root.dot5._y, _root.dot6._y, _root.dot7._y, _root.dot8._y];
Reset.onPress = function() {
_root.dot1._x = ResetArrayx[0];
_root.dot2._x = ResetArrayx[1];
_root.dot3._x = ResetArrayx[2];
_root.dot4._x = ResetArrayx[3];
_root.dot5._x = ResetArrayx[4];
_root.dot6._x = ResetArrayx[5];
_root.dot7._x = ResetArrayx[6];
_root.dot8._x = ResetArrayx[7];
_root.dot1._y = ResetArrayy[0];
_root.dot2._y = ResetArrayy[1];
_root.dot3._y = ResetArrayy[2];
_root.dot4._y = ResetArrayy[3];
_root.dot5._y = ResetArrayy[4];
_root.dot6._y = ResetArrayy[5];
_root.dot7._y = ResetArrayy[6];
_root.dot8._y = ResetArrayy[7];
};
// Loads Cookie Variables
loadVariablesNum("cookies.asp", 0);
// Polygon constructor
MovieClip.prototype.drawQuad = function(p1, p2, p3, p4) {
with (this) {
moveTo(p1.x, p1.y);
lineTo(p2.x, p2.y);
lineTo(p3.x, p3.y);
lineTo(p4.x, p4.y);
lineTo(p1.x, p1.y);
}
};
// Navigation
// on Press
_root.dot1.onPress = function() {
this.startDrag();
};
_root.dot2.onPress = function() {
this.startDrag();
};
_root.dot3.onPress = function() {
this.startDrag();
};
_root.dot4.onPress = function() {
this.startDrag();
};
_root.dot5.onPress = function() {
this.startDrag();
};
_root.dot6.onPress = function() {
this.startDrag();
};
_root.dot7.onPress = function() {
this.startDrag();
};
_root.dot8.onPress = function() {
this.startDrag();
};
// On Release
_root.dot1.onRelease = function() {
this.stopDrag();
changed = true;
// loadVariablesNum("cookies.asp?cookiename=" add _root.dot1._x add "&" add _root.dot1._y add "&" add _root.dot2._x add "&" add _root.dot2._y add "&" add _root.dot3._x add "&" add _root.dot3._y add "&" add _root.dot4._x add "&" add _root.dot4._y add "&" add _root.dot5._x add "&" add _root.dot5._y add "&" add _root.dot6._x add "&" add _root.dot6._y add "&" add _root.dot7._x add "&" add _root.dot7._y add "&" add _root.dot8._x add "&" add _root.dot8._y, 0, "POST");
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Home", "ContentPane", "POST");
};
_root.dot2.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=People", "ContentPane", "POST");
};
_root.dot3.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Projects", "ContentPane", "POST");
};
_root.dot4.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Software", "ContentPane", "POST");
};
_root.dot5.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Troubleshooting", "ContentPane", "POST");
};
_root.dot6.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Magazines", "ContentPane", "POST");
};
_root.dot7.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Search", "ContentPane", "POST");
};
_root.dot8.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Policies", "ContentPane", "POST");
};
// On Mouseover
_root.dot1.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Home";
};
_root.dot2.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "People";
};
_root.dot3.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Projects";
};
_root.dot4.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Software Centre";
};
_root.dot5.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Troubleshooting";
};
_root.dot6.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Magazines & Library";
};
_root.dot7.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Search";
};
_root.dot8.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Policies & Procedures";
};
// On Rollout
_root.dot1.onRollOut = function() {
this.test = "";
};
_root.dot2.onRollOut = function() {
this.test = "";
};
_root.dot3.onRollOut = function() {
this.test = "";
};
_root.dot4.onRollOut = function() {
this.test = "";
};
_root.dot5.onRollOut = function() {
this.test = "";
};
_root.dot6.onRollOut = function() {
this.test = "";
};
_root.dot7.onRollOut = function() {
this.test = "";
};
_root.dot8.onRollOut = function() {
this.test = "";
};
// Original Code to make all dragable.
//
// for (n=1; n<=4; n++) {
// _root["dot" + n].onPress = function() {
// this.startDrag();
// }
// _root["dot" + n].onRelease = function() {
// this.stopDrag();
// changed = true;
// }
// };
changed = true;
_root.onEnterFrame = function() {
if (changed == true) {
this.clear();
// this.beginFill (0x33DD00);
this.lineStyle(1, 0x666666);
// First Polygon
a = {x:dot1._x, y:dot1._y};
b = {x:dot2._x, y:dot2._y};
c = {x:dot3._x, y:dot3._y};
d = {x:dot4._x, y:dot4._y};
// Second Polygon
e = {x:dot5._x, y:dot5._y};
f = {x:dot6._x, y:dot6._y};
g = {x:dot7._x, y:dot7._y};
h = {x:dot8._x, y:dot8._y};
this.drawQuad(a, b, c, d);
this.drawQuad(e, f, g, h);
// this.endFill();
// changed = false; //if you want it to draw only after the drag uncomment this line
}
};
View Replies !
View Related
HitTest
when using hit test and shape evaluation boolean value set to true, it works fine if both my hit area and test clip are in the root of the movie, however the minute one or other are contained within a movie clip, the hit test goes crazy...
do all co-ordinates need converting to global in order for a hit test to function correctly?
HELP!
View Replies !
View Related
About HitTest
I have two Movie clip:
The first one is a circle and the second one is a square.
The collision is not detected when the circle surface collide with the square one. Infact the object hitTest consider my circle as a square. Someon can help me?
Thanks a lot and sorry for my english (it's orrible!)
View Replies !
View Related
HitTest
when creating two circles, i want to detect when they hit each other.
However, when you turn these in to movie clips, it actually creates a square out of them (no matter what shape you've got, it always turns them in to a square or rectangle), and the hitTest is triggered when they both touch.
I was wondering how to do it so the hitTest is ONLY triggered when the two circles touch each other. (attached gif file might help explain)...
Any help?
many thanks
DD
View Replies !
View Related
HitTest Help
Okay, Im trying to make a game but I've come across a snag. When the character moves to a certain location (by using the arrow keys, not the mouse) the movie should jump to the next frame. But it dosen't.
The area in which the character is supposed to move to is covered by a movieclip with an instance name of 'area'
character
|
/
area (when the character walks here it should change frames)
I've being using the hitTest function but the movie won't budge
If any one can help me with this it would be great
Cheers
Zidane
View Replies !
View Related
.hitTest
I am making a raceing game and I need to know how to make things bounce off walls and the AI car, I can only do it with one at a time
View Replies !
View Related
HitTest
I have a game where a round ball(obviously) moves forward and i want to make a ACCURATE hittest the one i have right now makes it so that if theres a round corner then it the hit test activates to soon how do i make an ACCURATE hit test?? help plz
View Replies !
View Related
HitTest
Anyone Know how to do a hitTest check between a hero and maze walls?
Ive been looking and looking but all the code i get doesnt work...
Plz give info in Flash 5 scripting if possible
Thanx
View Replies !
View Related
HitTest Again
CatBert303... do u think you could explain the coding a little better to me... i tried pasting it into my own movie, but it wouldnt work even though all my MCs were named the same as yours, and i thought all my scripting was correct...
View Replies !
View Related
HitTest
hi,
I am using the 'hitTest' function to test the position of my
button. But i realise that with the co-ordinates(x,y) as
parameters,its not accurate. How do I use it to check for a
specific area(box for example)??. Ive used the "target" parameter
but without success,anyone can help???
Ricky.
View Replies !
View Related
HitTest Help
Hi,
i made a clip that i duplicated with a random x and y target...
it gets som info out of a xml-file. Only prob is that i dont want the clips to be on top of each other...any wizz you can solve this?
i think im not far away from it....
i tought about a loop that checks the upper clip myClip[i]+1 to chack for a hitTest....
frame duplication
-----------------
count = my_xml.firstChild.childNodes.length;
for (i = 0; i < count; i++) {
myClip.duplicateMovieClip("myClip" + i, i);
this["myClip" + i].name = my_xml.firstChild.childNodes[i].attributes.name;
this["myClip" + i].myDescription = my_xml.firstChild.childNodes[i].attributes.myDescription;
this["myClip" + i].info = my_xml.firstChild.childNodes[i].attributes.info;
}
myClip._visible=false;
frame for hitTest
-----------------
for(j = 0; j < count; j++){
while (myClip[j].hitTest((myClip[j+1])){
myClip[j].targetx = 20;
myClip[j].targety = 20;
}
}
stop();
View Replies !
View Related
|