Added: 1 year ago
From: DNDigital
Views: 7,018
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (15)

Sign In or Sign Up now to post a comment!
  • very helpful tutorial . I wondered if you can tell the code for giving other responses to the users action like a sound clip and a message that explains why it snapped back along with snapping back. Your help will be much appreciated

  • @TheZmerchant It would go in the 'returnToOriginalPosition()' function. Best to google how to play a sound (it's not difficult). For the message, it's easiest to create a separate MovieClip with your message inside + any related graphics / buttons. You then export this from the library with a custom AS3 class, just like you did with each T-Shirt. Use the 'new' keyword to create a new instance and 'addChild' to display it. "clip = new MessageClip(); parent.addChild( clip )". Hope that helps!

  • I have a Question.. I have made a Trace to track the dropTarget. The Problem is, Even if i dropped it on an Image. It says null, even on the blank space. it still says null.

  • @VinSignusKlein The droptarget depends on the mouse position, not just the graphics themselves. I can't be sure of course but what might be happening is that the mouse really isn't over anything when you release the button. Hope that helps!

  • Comment removed

  • Comment removed

  • Comment removed

  • Great tutorial - helped me a lot. There is just one problem i have. My flash project has a number of frames and when i go to drag my images to its target, it stays there when i move onto the next frame - its always in the same position on the screen. Is there a way to fix that? I cant have it appear on other frames. Thanks for the great video!

  • @elguapo101012 Thanks, glad you enjoyed it. It can be difficult to mix frames with code. What you need is a couple of lines that remove the T-Shirts again. If your instance names are 'black' and 'white', simply say: 'removeChild(black)' and 'removeChild(white)' on the next frame. Hope that helps!

  • @DNDigital Thanks, that helped! Keep up the good work!

  • Comment removed

  • See Part 3 for the final episode!

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more