Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-27-2002, 08:00 PM   #1
Registered User
Join Date: Dec 2002
Posts: 1
Question Stopping a movie clip when it touches another movie clip


I've been having a bit of a problem trying to make a simple game in Flash MX. I want it so that when a movie clip touches another movie clip, it stops like a wall. I've pasted my code below. I know that my method of detecting and stopping the movie clip is incorrect but that was just an idea that didn't seem to work.

onClipEvent (load) {
speed = 5;
this._x = 100;
this._y = 100;
onClipEvent (enterFrame) {
if (Key.isDown (Key.LEFT)) {
this._x -= speed;
if (Key.isDown (Key.RIGHT)) {
this._x += speed;
if (Key.isDown (Key.UP)) {
this._y -= speed;
if (Key.isDown (Key.DOWN)) {
this._y += speed;
if (this.hitTest (413.2, 208.1, true)) {
this._x -= 100;


CTT_Mustapha is offline   Reply With Quote
Old 12-28-2002, 01:41 PM   #2
Billy T
Oops I did it again
Billy T's Avatar
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579

Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote

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 On
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:30 AM.

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.