View Full Version : 3.0 help creating moving objects

02-11-2008, 02:10 AM
I just started flash and I'm working on an actionscript 3 project for school due tomorrow. There are several things I cant remember how to do which I need to do.

I want to make several rectangles which you can drag around the screen and if they are in a certain spot they trigger a different object to move. How would I create those restrains?

02-11-2008, 03:11 AM
Ok so Ive got my code partially worked out now however my visibility condition isn't working. What's wrong?

function moveMagnet(event:MouseEvent):void{

function moveMagnetStop(event:MouseEvent):void{
if (bunnyMagnet_mc.x > 250){
bunnyMagnet_mc.visibility = false;

bunnyMagnet_mc.addEventListener(MouseEvent.MOUSE_DOWN, moveMagnet);
bunnyMagnet_mc.addEventListener(MouseEvent.MOUSE_UP, moveMagnetStop);

02-11-2008, 05:00 AM
Thats not the correct way to set a movie clips visibility. Adobe has some awesome help docs within their programs, I suggest you actually use them.