Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-18-2004, 10:35 PM   #1
rustybones
Registered User
 
rustybones's Avatar
 
Join Date: Sep 2003
Location: Canberra
Posts: 94
Default hitTest troulbes

hey guys and gals, I"m having troubles with my hitTest's

What I'm trying to do is to check if my tabbed menu has hit either edge of my movie. I have placed two mc's at either side of the movie and placed the code onto the tabbed menu (which is an MC as well):

onClipEvent (load) {
_x = 0;
speed = 20;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
_x += (endX-_x)/speed;

if (this.hitTest(block)) {
trace("hit");
}
else if (this.hitTest(block2)) {
trace("hit");
}
}

my targeting maybe out, I'm not too sure. The the desired effect I want is to have the tabbed menu slide across with the mouse movement (which it is) but to stop once the MC reaches the edge of the stage...help ?

cheers
rustybones is offline   Reply With Quote
Old 03-23-2004, 10:26 AM   #2
Timmee_3Styler
Canadian Flasher
 
Join Date: May 2002
Location: T dot O dot
Posts: 1,648
Default

although this is the wrong forum
trying adding

this._parent.block or
_root.block

Timmee_3Styler is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:43 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.