Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3.0 help creating moving objects

    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?

  • #2
    New Coder
    Join Date
    Sep 2007
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    visibility not working

    Ok so Ive got my code partially worked out now however my visibility condition isn't working. What's wrong?

    Code:
    function moveMagnet(event:MouseEvent):void{
    	bunnyMagnet_mc.startDrag()
    }
    
    function moveMagnetStop(event:MouseEvent):void{
    	bunnyMagnet_mc.stopDrag()
    	if (bunnyMagnet_mc.x > 250){
    		bunnyMagnet_mc.visibility = false;
    	}
    }
    
    bunnyMagnet_mc.addEventListener(MouseEvent.MOUSE_DOWN, moveMagnet);
    bunnyMagnet_mc.addEventListener(MouseEvent.MOUSE_UP, moveMagnetStop);

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •