Need help with virtual shelf - drag and drop between components?

Hello

Im trying to create a virtual shelf, where book spines are clips of individual video that can be dragged and re-ordered on the set.  For the moment I can drag the thorns to a target affected, but not just any target or "nudge" the position of other books along.

I'm sorry that if that's a little vague I'm not experienced in as3, please do not hesitate to ask any questions and I'll do my best to answer.  IM thinking that a table is necessary which occupies the posts, but I'm not sure how to put it all together!

Any help is greatly appreciated! The code I have so far is:

import flash.events.MouseEvent;
import flash.display.MovieClip;

var dragArray:Array = [red, blue, green, purple, yellow];
var matchArray:Array is [target1, target2, target3, target4, target5];.

var currentClip:MovieClip;
var startX:Number;
var startY: number;

for (var i: int = 0; i < dragArray.length; i ++) {}
dragArray [i] .buttonMode = true;
dragArray [i] .addEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);
matchArray [i] .alpha = 0.2;
}

function item_onMouseDown(event:MouseEvent):void {}
currentClip = MovieClip (event.currentTarget);
startX = currentClip.x;
startY = currentClip.y;
addChild (currentClip); bring to front
currentClip.startDrag ();
stage.addEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);
}

function stage_onMouseUp(event:MouseEvent):void {}
stage.removeEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);
currentClip.stopDrag ();
var int index = dragArray.indexOf (currentClip);
var matchClip:MovieClip = MovieClip (matchArray [index]);
If (matchClip.hitTestPoint (currentClip.x, currentClip.y, true)) {}
a match was found. Position the clip on the corresponding clip:
currentClip.x = matchClip.x;
currentClip.y = matchClip.y;
make not draggable:
currentClip.removeEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);
currentClip.buttonMode = false;
} else {}
football match has not, so send the clip to the back where he began:
currentClip.x = startX;
currentClip.y = startY;
}
}

Yes, you can double click on activate your movieclips and assign the function double click listeners who use navigateToURL

dragArray [0] .doubleClickEnabled = true;

dragArray [0] .addEventListener (MouseEvent.DOUBLE_CLICK, f);

function f(e:Event):void {}

navigateToURL (new URLRequest ("http://www.adobe.com"));

}

Tags: Adobe Animate

Similar Questions

  • Drag and Drop between 2 DataGrids

    I need to drag-and - drop between a series of data grids. However, when I drag from one to the other, he must not remove from the original, just make a copy. This may seem like an easy question, but I am a n00b and need help. Thank you!

    Visit this link, it's a very similar example: (with the list component and removes the element of the old list)
    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=dragdrop_7.html

    check the destination component dragOver event. You can reject the trail and add a copy to your list or accept the drag and attach a copy of the source list.

  • Cannot drag-and - drop between host and guest

    12 workstation

    Host = 10 Pro x 64 Windows

    Comments = 10 Pro x 64 Windows

    Everything is entirely up to date, etc. on a Z87 PC chipset.

    I can copy and paste. I can drag-and - drop comments to the host.

    I can't drag-and - drop between host and guest! lol I just get that bar circle icon.

    I'm totally stumped! I tried a myriad of common things...uninstalled/reinstalled VMWARE, then Tools, then even tried to create new guests. I do not have eccentric tweaks or customizations. It is a desktop PC that I use for a laboratory test and my business. I have no other problems in addition to this. Yet, on my other system, essentially a nearly identical configuration, I don't have this problem.

    Any suggestions?

    SOLUTION FOUND!

    The problem boils down to a matter of RUN AS ADMIN. On the HOST problem, it has been set to RUN as administrator. I've not done this! He has just installed that way automatically. Once I stopped that and it ran normally, all was well again. Read below for more details.

    I have two virtual HOST machine configurations almost identical - we'll we'll call HOST 1 and HOST 2. HOST 2 works perfectly without a problem. Drag and drop, to navigate to drives mapped to access NAS stored VMs, etc...

    I began to compare what was similar vs. different between the two. On HOST 1 (problem child even as I could slide properly - drop on), I noticed that I could not navigate to my NAS location where some virtual machines are stored. In the left navigation panel, the mapped drives would appear as drive letters with question marks next to them as you can see in the image below.

    I deleted the mapped drives then mapped them still fresh, did an other CLEAN uninstall VMWARE WS PRO 12. I combed the registry, records and checked for devices hidden in Device Manager. Clean as a whistle! I reinstalled 12 Workstation and returned the problem! I could yet drag-and - drop properly or navigate to mapped drives. Then I noticed the HOST 2 that he was not being RUN as administrator. Really? So, I removed this parameter and TA DA! Everything started to work properly. I don't know if it's a bug, or knowledge common to others but for me it was new. I don't know why, by default, when installing 1 HOST went down VMWARE to run as administrator, but it was.

    Bottom line - do not run VMWARE as an administrator.

  • Need help with Exchange 2010 Diag and implementation

    I NEED HELP FOR EXCHANGE 2010 DAG AND THE IMPLEMENTATION THAT CAN HELP-IM I IN THE RIGHT SUPPORT GROUP?

    Hello HectorLopez_790,

    Microsoft Communities is for consumer issues with Windows 8, Windows 7, Windows Vista and Windows XP. Your question with Exchange would be better supported in the TechNet forums.
    Click here for a link to transfer your question in the forums of Exchange.

    Thank you

    Marilyn

  • Help code AS3 for drag and drop quiz

    I have a flash drag and drop quiz I want to add different images to match the correct veribage when users have dropped the case.

    I have text works well when the user deletes the folder (i.e. "Yes, that's correct! ', I'm sorry, is not correct.', 'congratulations, you're done!'")

    I don't know where to start and I was wondering if it was possible to add an image from the library onto the stage when the corresponding text appears on the stage?

    I have AS3 below code I use.

    Thanks for the help in advance!

    1.gif

    ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

    var startX:Number;

    var startY: number;

    var counter: Number = 0;

    folder_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    folder_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    folder2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    folder2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    folder3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    folder3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    function pickUp(event:MouseEvent):void {}

    event.target.startDrag (true);

    reply_txt.text = "";

    reply_txt2.text = "";

    event.target.parent.addChild (event.target);

    startX = event.target.x;

    startY = event.target.y;

    }

    function dropIt(event:MouseEvent):void {}

    event.target.stopDrag ();

    var myTargetName:String = "target" + event.target.name;

    var myTarget:DisplayObject = getChildByName (myTargetName);

    if (event.target.dropTarget! = null & & event.target.dropTarget.parent == myTarget) {}

    reply_txt.text = "Yes, that's correct!"

    reply_txt2.text = "Donec sed fermentum lorem. Suspendisse potentialit. Pellentesque hendrerit nunc vitae risus vel gravida Nam semper tempor had lorem sed nulla lacinia vel ante vitae commodo. CRAs ac dolor nibh. « ;

    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);

    event.target.buttonMode = false;

    event.target.x = myTarget.x;

    event.target.y = myTarget.y;

                            counter ++;

                } else {}

    reply_txt.text = "I'm sorry, this is not correct.";  

    reply_txt2.text = "Lorem ipsum dolor sit amet, adipiscing elit computer. Surpassing massa tellus, ut euismod urna. Phasellus bibendum pretium porta. Praesent sed elit vel odio dignissim in tortor ultrices. »

    reply_txt3.text = "Try Again";

    event.target.x = startX;

    event.target.y = startY;

                }

    if(counter == 3)

                   ){

    reply_txt.text = ' congratulations, you're done! "

    reply_txt2.text = "";

        }

    }

    folder_mc.buttonMode = true;

    folder2_mc.buttonMode = true;

    folder3_mc.buttonMode = true;

    Yes, to add a library on the stage using actionscript object to assign the object a class, tell ImageClass.  You can then use the new constructor to create an instance, and then add it to the display list:

    var image: ImageClass = new ImageClass();

    addChild (image);

  • Newbie question with multiple do drag and drop objects

    I am trying to build a drag and drop quiz where you have a list of countries and move the correct country in an empty space in a paragraph to fill properly the sentence (see attachment).
    I can get the first country to drag and drop correctly. But when I tried the second country in the list of code, I get the following error message:
    "definition of the double function of 1021.
    Here is my code:
    afghanistan_mc.addEventListener (MouseEvent.MOUSE_DOWN, startDragging);
    function startDragging(myevent:MouseEvent):void {}
    afghanistan_mc.startDrag ();
    }
    afghanistan_mc.addEventListener (MouseEvent.MOUSE_UP, stopDragging);
    function stopDragging(myevent:MouseEvent):void {}
    afghanistan_mc.stopDrag ();
    }
    burma_mc.addEventListener (MouseEvent.MOUSE_DOWN, startDragging);
    function startDragging(myevent:MouseEvent):void {}
    burma_mc.startDrag ();
    }
    burma_mc.addEventListener (MouseEvent.MOUSE_UP, stopDragging);
    function stopDragging(myevent:MouseEvent):void {}
    burma_mc.stopDrag ();
    }
    It seems that the problem is that you can't 'startDragging' and "stopDragging" defined in different functions. I saw something on the use of the target property of the MouseEvent object when you have multiple objects drag-and - drop, but I can't find how to do this job.
    I would be grateful any advice!

    You have functions duplicate definitions.  Either use the same function for the two MCs (startDragging and stopDragging) by putting two eventhandler in each function calls, so you have 2 each, or declare a separate name as startDragging and startDragging2, etc.

  • Drag and drop between screws

    I don't have much by using the drag and drop experience. I think using a tree control that appears in a sub VI with a list of channel names. I want to drag the name of the channel on an indicator on my main façade. There will be little code concerned after that to get the data of this channel in the indicator, which was chosen, but I don't know how to start the process of moving between the screws the Subvi with the tree control must have a structure of the event? Do I need a FG of operation between the two screws?

    Hi deskpilot,.

    Order the attached example. This should help you. Run the screw and try to drag in the drop-down list and drop into the VISA control

    Kind regards
    Amine31

    (Bravo to give good answers, mark it as a Solution If your problem is resolved)

  • Drag and drop between applications using as3

    Giddayguys

    Research on features just drag-and - d├⌐poser of AS3 in the Air, specifically by dragging an AIR application data in an air application No.  You have no control over what happens to the data once the application without Air?  for example if I click on a datagrid control in the AIR and he copied the text in the column to the Clipboard and then I drag out of the AIR in, for example, Windows Notepad, can I paste data from the Clipboard by a fall?

    Thank you

    Wow, I thought flash.desktop was all the AIR, my mistake, thanks for the info as always kglad!

    And #8 is still correct, there is no simple interface air via drag and drop in another application. The main reason is that other applications will need to be programmed to the win32 message and know how to handle. Some applications may allow it, but you have to respect their API to accomplish this. Less do you a DONKEY win32, chances are that the simple answer to your question is no, this is not possible (for good reasons).

  • Need help with the OSB Assign and replace the

    I have a proxy service that receives the SOAP message:

    " < = xmlns:soapenv soapenv:Envelope ' http://schemas.xmlsoap.org/SOAP/envelope/ "xmlns:SOAP - ENC =" " http://schemas.xmlsoap.org/SOAP/encoding/ "container =" " http://www.w3.org/1999/XMLSchema ">

    " < = xmlns:soapenv soapenv:Header ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    < / soapenv:Header >

    < soapenv:Body >

    " < pidx:OrderChange pidx:transactionPurposeIndicator = 'Replace' xmlns:pidx = ' http://www.API.org/pidXML "xmlns =" http://www.API.org/pidXML "" xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance "xsi:schemaLocation="C:\shareIt\OrderChange_1-2.xsd" > ""

    ...

    < / pidx:OrderChange >

    " < = Xmlns:ocp DeliveryInformation ' http://www.digitaloilfield.com/OCP ">

    ...

    < / DeliveryInformation >

    < / soapenv:Body >

    < / soapenv:Envelope >

    I need to take the OrderChange element and place it in a SOAP body and the DeliveryInformation element and place it in the SOAP of the same SOAP message header.

    The SOAP message is then sent to a business service that makes an HTTP POST of the SOAP XML.

    I created the service of the company and he sent some data test SOAP and it works very well, but cannot create a bridge between the Proxy and the Business Service.

    In the stream of messages of Proxy I tried to do an assignment in a routing. I tried to do the following:

    1. an XQuery query transform to generate the XML SOAP just described

    2. not the entitlement where the "Expression" is the transformation and the Variable is a variable based on a schema for SOAP.

    I can see that the company is trying to be invoked, but the SOAP data does not have to be formatted or passed.

    It is the right approach or is their a better way of

    1. create the SOAP wrapped XML

    2. call the Business Service.

    Any suggestions are appreciated. I can provide more detail if necessary.

    Kind regards.

    Thank you Vlad...

    I think I'm getting in that direction now. Just do some debugging.

    Appreciate the input. I will update with final results.

    Again, your help is greatly appreciated.

    Kind regards.

  • Need help with keyframes for start and stop an effect

    I use a mask and blurred for a few seconds. I understand that I must use keyframes to indicate when to start and stop this effect in the video, so that the same area is not trimmed for video full.

    The problem is, I can't find help by correctly setting the keyframes. When I opened the menu keyframes in the effect, it seems that I must together for both the mask took and the blur effect. I did... to start and stop at specific times, but the rest indeed throughout the video, so of course miss me something by using keyframes. The manual to create effects is not useful. I need assistance with keyframes as what I'm doing is clearly not working. Help!

    If the mask does not move that you don't have to set the keyframe. For the blur, click the stopwatch next to 'bluriness' add keyframes as below, the Reds don't blur and blue those maximum blur this fade effect.

  • Cannot drag and drop between OSX and OSX VM

    Fusion 5.03

    10.8.4 OSX patch entirely on the virtual machine and the host.

    I'm just trying to drag a file 397KO from the desktop of the host to the desktop of the virtual machine

    I have the drag and it snaps back on the desktop of the host.

    I uninstalled and reinstalled the VMWare Tools in the virtual machine.

    I have also uninstalelled and then rebooted and then installed and restarted with no luck.

    I also rebooted the host as well.

    It was originally a Lion install where tools were installed and then upgraded to level to Mountain Lion and then patches.

    I guess it's probably something simple I'm missing.

    Thanks for the help

    Josh

    When in doubt, read the documentation!   Take a look on: create an OS X Server, VMware Fusion Virtual Machine

  • HP 15 - ac043tu: need help with the key feature and WiFi Drivers

    Hi team,

    I try to activate the key feature and WiFi in my new HP 15 - ac043tu laptop.

    I use Windows 7 Ultimate 32 operating system.

    I installed all the drivers available on the site Web of HP (http://support.hp.com/us-en/drivers/selfservice/HP-15-ac000-Notebook-PC-series/7771404/model/8326116... for my product.

    To activate the function key, I installed driver: HP System Event Utility - sp71716, but it doesn't seem to work.

    In Device Manager, network controller shows exclamation as shown below. I tried to install Broadcom and Realtek WLAN drivers, tried to turn on/off, uninstalled/reinstalled drivers referring to other positions, but that did not work.

    I also tried to install HP SoftPaq Download Manager, but it did not help. Tool does not show my product described.

    I went through a similar question posted by other members, but failed to get the solution. This question gave me hard times.

    Appreciate your help in this regard.

    Thank you

    Kishan

    Hello:

    You need these drivers wireless and bluetooth driver 64-bit file should have the 32-bit drivers too.

    Network controller (wireless card):

    FTP://FTP.HP.com/pub/SoftPaq/sp71501-72000/sp71528 .exe

    Bluetooth:

    This package contains the Broadcom bluetooth driver and software for the laptop models running a supported operating system. Broadcom Bluetooth 4.0 driver is required to activate the bluetooth 4.0 Broadcom devices and is compatible with Broadcom bluetooth 3.0 and earlier versions.

    File name: sp71440.exe

    Unfortunately, I can't help you with the next question.  The system of the event utility would be the only software I can think that would have worked.

    You can try the software HP Quick Launch, but I doubt it will work.

    http://h20565.www2.HP.com/hpsc/SWD/public/detail?swItemId=ob_112835_1

  • NEED HELP WITH SELECTION was GOOD AND good POWER (HP dc7900 Convertible Minitowers) MARKET

    Hello! I have a HP dc7900 in Minitour Convertible with the following specifications:

    Core 2 Quad q9400 2, 66 GHz

    nVidia GeForce GT430 1 GB

    Elpida 2x2gb RAM 800 mhz (I'll add 2 x 2 earlier so I can get 8 GB)

    Card mother HP 3032 h

    Block POWER 365 stock w.

    So I was planning to buy a Radeon HD 7770 (MSI, Palit, or Sapphire) because I have a small budget and this seems to be a good fit, but there's better food, so I was wondering if there are more good, good markets that would be able to manage my PC (with the new gpu, 8 GB of ram and a single PCIe 6-pin). I also have an MS PRO-550 Industrial, ATX in my old PC and I wanted to add, but I just discovered that it is very bad and that there actually 200w (not 550) :/ Any help would be appreciated P.S I found 'used' Corsair CMPSU-400cx and an Antec SU - 430 then how do get?

    I see that your desired card has a minimum 400W power quantity, but I recommend moving more to a 500W or 600W for handling units your other hardware too although a little extra space so you would be upgraded.

    I am very pleased with the PSU Corsair, I recently installed a CX500 in my machine, although in a smaller case, you need good cables.

    I hope this helps.

  • BlackBerry Z10 need help with the facebook chat and notifications

    Hey, guys.

    Since I updated to version 10.2.1.2102 of the software I was not able to receive messages from the hub of blackberry facebook chat. Before the update whenever I had my phone connected to a wireless network it was automatically getting messages facebook on the hub. Now, although I can send messages and receive messages if this contact is online, once I close the conversation hub is gone and I don't get the messages, only the "new messages of * person *" e-mail after a certain time.

    In addition, I don't get notifications about birthdays of the people. I get the "next event" x hours notification on the lock screen, if I go in the calendar I see the notification at the top of the page, but it does not sound to warn me of my birthdays from the contacts.

    Can someone help me with this two problems? Thank you!

    Fact. I needed to update the facebook app.

  • Need help with an Export-CSV and ForEach loop

    Hi guys, I'm total NOOB in CLI so please forgive the stupid question.

    I need your expert advice for the very large environment and will award points.

    I have a working script that alerts to our logout ESXi hosts, maintenance and NotResponidng mode

    His job well, but need to send a mail to all three of our VCenters

    Current script only works for a VC at a time. How do I ForEach and always the hose of the same body CSV and HTML

    It would be nice to have an HTML and CSV output that looks like this (assuming that there are currently disconnected etc.)

    I have a set of credentials, that work on all 3 of my VC

    VC1

    Host1 disconnected

    Host2 NotResponding

    VC2

    Host3 disconnected

    Host4 NotResponding

    VC3

    No disconnected/maintemance/notresponding hosts for VC3

    Here is my current code, etc. of the hidden passwords >

    # Clear old sessions
    Disconnect VIServer VC01-confirm: $false

    # VC01 VC check for disconnection and Maintenance mode and does not
    SE connect-VIServer-Server VC01 - FakeUSer username-password FakePassword

    $Report = get-VMhost-State disconnected, maintenance, NotResponding | SELECT name, connectionstate

    # scan info to be html and give him a date stamp

    $ReportHtml = $report | ConvertTo-Html | Out-string

    # Write CSV file and give it a character of data

    $filePath = "C:\PS\Output".
    $filename = "VC01disconnectedHosts".
    $CurrentDate = get-Date
    $CurrentDate = $CurrentDate.ToString ('MM-dd-yyyy_hh-mm-ss')

    $Report | Export-Csv "C:\PS\Output\VC_$Currentdate.csv".

    # Send the info by Mail

    Send-MailMessage-to [email protected] - subject VMwareMorningcheckVC01$ CurrentDate '
    SmtpServer - mail.sanlam.co.za - from [email protected] '
    -BodyAsHtml-body $reportHtml - accessories 'C:\PS\Output\VC_$CurrentDate.csv '.

    Thank you in advance for help.

    You could use a ForEach loop through all vCenters and combine the results in a $1 report.

    Something like that

    $vCenters = "VC01","VC02","VC03"
    
    # Clear old sessionsDisconnect-VIServer $vCenters -Confirm:$false
    
    $report = @()# Check VC VC01 for Disconnects and Maintenance mode and Not Respondingforeach($vc in $vCenters){  Connect-VIServer -Server $vc -User FakeUSer -Password FakePassword
    
      $Report += (Get-VMhost -State Disconnected,Maintenance,NotResponding | Select @{N="VC";E={$vc}},name ,connectionstate)  Disconnect-VIServer $vc -Confirm:$false}
    
    # parse info to be html ,and give it date stamp
    
    $ReportHtml = ($report | ConvertTo-Html | out-String)
    
    # Write out CSV file and give it a Data Stamp
    
    $CurrentDate = Get-Date -Format 'MM-dd-yyyy_hh-mm-ss'$filename = "C:\PS\Output\DisconnectedHosts-$($CurrentDate).csv"
    
    $Report | Export-Csv -Path $filename -NoTypeInformation -UseCulture
    
    # Send info with Mail
    
    Send-MailMessage -To [email protected] -Subject VMwareMorningcheck$CurrentDate `-SmtpServer mail.sanlam.co.za -From [email protected] `-BodyAsHtml -Body $reportHtml -Attachments "C:\PS\Output\DisconnectedHosts-$($CurrentDate).csv"
    

    I added the property vCenter for each line in the report

Maybe you are looking for

  • I have a hp a420n and a viewsonic vx2235wm monitor

    I have win xp on a HP a420n with a VIA / graphics S3G Unichrome IGP, after upgrading the BIOS, card Grpahics and installation of the screen of the software, Viewsonic VX2235wm, I still can't put the resolution to the optimal values, 1680 x 1050 Hz @6

  • FN keys not working not not on Satellite A100

    I posted a question in February with little success in a solution.The fn on my laptop keys do not work, the only time where that work is while the computer starts up. Once my screen arrives mysteriously stop working. I was told to download all sorts

  • Get a LV tree ctrl sequence structure

    Hi, I'm an editor to customize certain parameters of the sequence (for example "run mode). I would like to import into a tree LV throughout the test sequence control now the structure of the original. I mean, every step is a part of the tree (A Test,

  • Wireless network controller driver not...

    I miss the network both driver and tried to install it several times but still no luck. I have a HP Pavilion DV7 - 2110sa laptop running Windows Vista. Here are my credentials: Network controller: PCI\VEN_168C & DEV_002B & SUBSYS_3040103C & REV_01 PC

  • Start from the Port of FCoE storage

    If I directly attach an array of NetApp fabric using new storage interconnection FCoE ports, the blades allows SAN boot in this scenario?