Adobe Dreamweaver Forums



Last 10 THreads :         Opening a file in navpane from toolbar (Last Post : ChrisRousset - Replies : 0 - Views : 1 )           »          Help importing PNG sequence (Last Post : []MULISH - Replies : 0 - Views : 1 )           »          Problems importing PNG sequence (Last Post : []MULISH - Replies : 0 - Views : 1 )           »          Flash CS4 grey Icons in the Tool Panels are hard to see (Last Post : rnfw - Replies : 0 - Views : 1 )           »          Strip EXIF camera data from PSD files? (Last Post : Russell_Proulx@adobeforums.com - Replies : 2 - Views : 3 )           »          CSH Calls for Merged CHM's (Last Post : TrentSnake - Replies : 0 - Views : 1 )           »          Image Replacement (Last Post : WhatNow - Replies : 0 - Views : 1 )           »          Embedding Flash SWF Skin in External Site (Last Post : QADesign - Replies : 0 - Views : 1 )           »          Compatible issue with ie6 (Last Post : zhtjlong - Replies : 0 - Views : 1 )           »          Re: Photoshop CS4 is a disaster (Last Post : Paulo_Skylar@adobeforums.com - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-03-2008, 04:37 AM
Handycam
 
Posts: n/a
Diggs:
Default Drag an item to the "trash"??

I have an application with a custom class that gets added to the stage.

I am trying to wired up a way for the user to "delete" the added objects (s)he
doesn't want anymore. I was thinking of dragging it to a "trash can" area,
and then detect the collision and "delete" it with my deleteMe method. See
code for the methods in this object so far:



private function dragMe(e:MouseEvent):void {
this.startDrag();
this.alpha = .5;
}

private function dropMe(e:MouseEvent):void {
this.stopDrag();
this.alpha = 1;
}

private function clickedMe(e:MouseEvent):void {
parent.setChildIndex(this, parent.numChildren-1);
clickSound.play();
}

private function deleteMe():void {
parent.removeChild(this);
}



Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 04:17 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk