Drag and drop to create a custom step

Hi,
I have a custom insertion palette in my custom user-interface. I want to allow the user to drag the step from the custom insertion palette into the sequence designer, like the original insertion palette. The custom insertion palette is in WPF.
The data format for the drag and drop object is
e.Data.GetFormats()
  {string[1]}
    [0]: "SeqEditor New Step Binary"
The data is actually a MemoryStream:
e.Data.GetData(e.Data.GetFormats()[0])
  {System.IO.MemoryStream}
    base {System.IO.Stream}: {System.IO.MemoryStream}
    CanRead: true
    CanSeek: true
    CanWrite: true
    Capacity: 6936
    Length: 6936
    Position: 0
So it's actually some Unicode text if I read it with StreamReader:
new StreamReader((Stream)e.Data.GetData(e.Data.GetFormats()[0]),Encoding.Unicode).ReadToEnd()
"E@=3@JKZ100h\\L]JDYcLO7e9@FLU:h9iM]>5Uf16W>Hii091DHkYGJKJHMd[<...
What's the proper way for me to implement the drag and drop feature for my custom insertion palette? I'm thinking to create a similar MemoryStream but I can't understand the format of the data.
Thanks.
Solved!
Go to Solution.

Please note that the clipboard format is not something we intend for users to create directly, and it might change in a future version of TestStand. So, if you do this, keep in mind it's possible it might not work in a future version of TestStand (i.e. we do not support creating clipboard items directly).
That said, it might be possible to get it to work in current versions of TestStand as follows (I haven't tried to do exactly what you are doing, but here is how our format is currently generated):
PropertyObject[] stepPropObjects = new PropertyObject[1];
Step newStep = templateOfStep.AsPropertyObject().Clone("", PropertyOptions.PropOption_CopyAllFlags | PropertyOptions.PropOption_DoNotShareProperties) as Step;
newStep.CreateNewUniqueStepId();
stepPropObjects[0] = newStep as PropertyObject;
DataObject dataObject = new DataObject();
DataFormats.Format stepFormat = DataFormats.GetFormat("SeqEditor New Step Binary");
string serializedPropertyObject = this.Engine.SerializeObjects(stepPropObjects, SerializationOptions.SerializationOption_UseBinary);
serializedPropertyObject += "F"; // False for isEditCut (thus unique ID's will be created on paste).
System.Text.UnicodeEncoding encodingForStrConv = new System.Text.UnicodeEncoding();
byte[] buffer = encodingForStrConv.GetBytes(serializedPropertyObject);
MemoryStream vvClipData = new MemoryStream(buffer);
dataObject.SetData(stepFormat.Name, false, vvClipData);
Hope this helps,
-Doug

Similar Messages

  • Acrobat 9 no longer lets me drag and drop to create pdf

    acrobat 9 no longer lets me drag and drop to create a pdf

    What kind of files? If DOC files, is PDF Maker active in WORD? We need more info to help. The applications (and versions) as well as OS would help.

  • Can drag and drop interactions created in Captivate 6.1 be exported to HTML5?

    I need to convert some Flash drag and drop interactions to HTML5 and I'm looking at Captivate and Storyline.
    Can drag and drop interactions created in Captivate 6.1 be exported to HTML5?
    (I tried Captivate 6 with the drag and drop widget and that didn't work, and I can't find a trial version of 6.1).
    Many thanks,
    Sonya

    Many thanks Lilybiri
    I've just chatted to Adobe support and they have told me there is no educational discount for subscription I coudn't find the info on the website, so if anyone is interested, subscription is $29.99/month or $19.99/month if you sign up for a year.
    Cheers,
    Sonya

  • Drag and drop to create a new requisition item

    Hello,
    In ME51N, we use a "Document Overview on" to select a requisition and drag and drop it to the basket.
    When we do this, all the items are are copied from old to the new requisition.
    We have some custom fields in "Customer data" tab, and these values are copied too.
    The problem is: I would like to clear one of this custom fields, when the item is created via drag and drop. I know the EXIT_SAPLMEREQ_007 is called for each item and my question is: there is a when in this EXIT (or anohter one) to know if this item is created via drag and drop? So that, I can clear the field.
    Thanks a lot!

    Please, any ideas?

  • Can't resize firefox so i can drag and drop to create a shortcut

    I can't make my Firefox page smaller so I can drag and drop a web site to create a shortcut. I am using windows 7. I have no grippe when i point in the lower right corner. When I use zoom the page itself re sizes but not the window. I just need to see a little of my desktop so I can create a shortcut.

    Could it be, you are in full-screen mode? Press F11 to check it: if you are indeed in the fulöl-screen mode, the FX window will resize and you should be able to grp the lower right corner for resizing.
    Let us know if it helped.

  • I am unable drag and drop icons on to customized toolbar... they simply will not drag How do I resolve this? Do I need to download something?

    I click to customize toolbar and add a new one. Then I try to drag an icon from the panel onto the new toolbar. Nothing. I am unable to do so. None of the icons are grabbable, despite the fact that the fat hand appears when I hover over them, indicating that they are ready for drag and drop (or at least that is what I am programmed to think)

    See:
    * http://kb.mozillazine.org/Corrupt_localstore.rdf
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Drag and drop STILL sketchy in Struts Page Flow

    Struts Page Flow has been a major problem area in JDev since it was introduced, and I am still having some useability issues with it.
    I CANNOT drag an application module method out, onto a data action; if the data action isn't one of the newest actions on the page. If the action has more than one target, (multiple "forwards") or just isn't one of the "newest" actions on the page, the GUI shows me dragging a the method from an app mod out onto the action, but no work is done once I drop it. I must delete the data action, and re-create it. This, in the mean time, will overwrite any data action class I had defined originally.
    This needs to be fixed very soon, as it has been in every build of 10g that I have dealt with.

    Ok. To reproduce the bad drag and drop behavior:
    Create a Misc Data page, name it "Home"
    Drag a data page out, name it "A", and put stuff on it. (Doesn't need to be complex).
    Drag an action out, name it "B".
    Drag another action out, name it "C"
    Connect a forward from "A" to "B", connect a forward from "B" to "C". Connect a forward from "C" to "Home".
    Connect a "fail" forward back, from "B" to "A".
    Try to drag a method off of an applicaiton module to Action "B". It should not work.

  • Possible Bug with Drag-and-Drop Being Published via HTML5 - Getting "Undefined" Error When Dragging Object

    Hello,
    I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities.  Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
    My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format.  Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
    To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction.  I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
    Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
    Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
    It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
    Drag the Yellow (or variable drag box) to the drag target.
    Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
    Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
    Move both draggable boxes to the drag target and use the undo and reset buttons...
    Anyhow, I know you all are sharp and will run the demo through its paces.
    I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
    I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request -  save the darn "undefined" message that comes up!
    Many thanks in advance for any help and/or direction that you all may be able to provide,
    Paul

    Hello,
    I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
    I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
    I did go ahead and submit this to Adobe as a possible bug today.
    Thanks again for any help related to this issue.  If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks! 
    Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
    ~ Paul

  • Can't drag and drop MP3 files into GB since Snow Leopard upgrade

    Not sure if this is a known issue but ever since I have upgraded to Snow Leopard (10.6), I have only been able to import (drag & drop) some MP3's into a podcast project. For example, some files I was able to import before, no longer can be dragged and dropped to create a new track.
    I've tried creating a new podcast project but thats not working either. Any help would be GREATLY appreciated!
    -Ben

    I just read another from another website - http://www.bulletsandbones.com/GB/FAQPages/OddBallProbs.html
    that if you choose delete the prefernce files .plist/.cs and use "SAVE AS" vs "SAVE" the files I referred to above get saved when attempting to open th project again. I tried it and it seems to work for me now. I hope this helps others with the GB *"File Not Found"* dilemma in Leopard and Garageband V5.1
    Message was edited by: Mikeatcaz

  • Setting up playlists in iTunes, will not let me drag and drop

    I have transferred all my music to a different computer, but now will not let me drag and drop to create playlists

    drewtxnc wrote:
    I have transferred all my music to a different computer, but now will not let me drag and drop to create playlists
    Drew,
    Are you sure that those are regular playlists (music note symbol) and not smart playlists (gear symbol)?  Smart playlists populate themselves according to their rules, and you cannot drag songs into them.

  • TS1363 my itunes will not let me drag and drop any music into my library

    i have reinstalled my itunes and and restarted my computer and nothing is working

    drewtxnc wrote:
    I have transferred all my music to a different computer, but now will not let me drag and drop to create playlists
    Drew,
    Are you sure that those are regular playlists (music note symbol) and not smart playlists (gear symbol)?  Smart playlists populate themselves according to their rules, and you cannot drag songs into them.

  • Drag and drop custom object

    Hello,
    I am trying to create a GUI where the user will be able to drag an object (which I have created) from a toolbar button onto a JPanel. I have tried the sun tutorials to no avail. I am unsure exactly what code I should be writing to enable this functionality. I have written a dragmouseadapter which enables drag and drop from the button. I have also written a TransferHandler and Transferable for the object, but again I'm not sure how I should be using these. Can anyone advise me? Hopefully in a sort of step-by-step instruction for setting this up. Thank you.

    You wanted to drag and drop a custom component and you said its done using dragmouseadapter!
    TransferHandler and Transferable are used to transfer the data between the swing components.
    Now, what you want to do? So, we can help!

  • Can you use a custom cursor with drag and drop?

    Hi there! I'm a newbie flash user and working on a simulation for a graduate course in instructional design. I'm using Flash Professional CC on Mac. Here's what I'm trying to do. I have several draggable sprites on the stage and three target sprites. I have specified the original x,y locations of the sprites and have set the end x,y locations as those of each of the three targets. Items must be dragged to one of the three targets.
    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite? I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    Thanks!
    I'm pasting my code from the actions panel below so you can see what's going on:
    stop();
    /* Custom Mouse Cursor
    Replaces the default mouse cursor with the specified symbol instance.
    stage.addChild(customcursor);
    customcursor.mouseEnabled = false;
    customcursor.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    function fl_CustomMouseCursor(event:Event)
      customcursor.x = stage.mouseX;
      customcursor.y = stage.mouseY;
    Mouse.hide();
    //To restore the default mouse pointer, uncomment the following lines:
    customcursor.removeEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
    stage.removeChild(customcursor);
    Mouse.show();
    //set up variables and objects for dragging
    var offset:int = 10;
    var appleStartX:int = 243;
    var appleStartY:int = 156;
    var appleEndX:int = 522;
    var appleEndY:int = 22;
    apple.buttonMode = true;
    apple.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    apple.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var cupStartX:int = 39;
    var cupStartY:int = 266;
    var cupEndX:int = 520;
    var cupEndY:int = 175;
    cup.buttonMode = true;
    cup.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    cup.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var barStartX:int = 178;
    var barStartY:int = 234;
    var barEndX:int = 522;
    var barEndY:int = 22;
    bar.buttonMode = true;
    bar.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bar.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var orangeStartX:int = 284;
    var orangeStartY:int = 102;
    var orangeEndX:int = 522;
    var orangeEndY:int = 22;
    orange.buttonMode = true;
    orange.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    orange.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bottleStartX:int = 172;
    var bottleStartY:int = 303;
    var bottleEndX:int = 520;
    var bottleEndY:int = 175;
    bottle.buttonMode = true;
    bottle.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    bottle.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var bananaStartX:int = 113;
    var bananaStartY:int = 123;
    var bananaEndX:int = 522;
    var bananaEndY:int = 22;
    banana.buttonMode = true;
    banana.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    banana.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var napkinStartX:int = 248;
    var napkinStartY:int = 271;
    var napkinEndX:int = 520;
    var napkinEndY:int = 175;
    napkin.buttonMode = true;
    napkin.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    napkin.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var yogurtStartX:int = 27;
    var yogurtStartY:int = 136;
    var yogurtEndX:int = 518;
    var yogurtEndY:int = 329;
    yogurt.buttonMode = true;
    yogurt.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    yogurt.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var strawberryStartX:int = 120;
    var strawberryStartY:int = 285;
    var strawberryEndX:int = 522;
    var strawberryEndY:int = 22;
    strawberry.buttonMode = true;
    strawberry.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    strawberry.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var sandwichStartX:int = 7;
    var sandwichStartY:int = 364;
    var sandwichEndX:int = 522;
    var sandwichEndY:int = 22;
    sandwich.buttonMode = true;
    sandwich.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    sandwich.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var juiceStartX:int = 88;
    var juiceStartY:int = 347;
    var juiceEndX:int = 518;
    var juiceEndY:int = 329;
    juice.buttonMode = true;
    juice.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    juice.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var foilStartX:int = 39;
    var foilStartY:int = 416;
    var foilEndX:int = 520;
    var foilEndY:int = 175;
    foil.buttonMode = true;
    foil.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    foil.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    var waxbagStartX:int = 235;
    var waxbagStartY:int = 342;
    var waxbagEndX:int = 522;
    var waxbagEndY:int = 22;
    waxbag.buttonMode = true;
    waxbag.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
    waxbag.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
    function startDragging (e:MouseEvent) {
      e.currentTarget.startDrag();
    function stopDragging (e:MouseEvent) {
      e.currentTarget.stopDrag();
      switch (e.currentTarget) {
      case apple:
      if (apple.x < appleEndX - offset || apple.x > appleEndX + offset || apple.y < appleEndY - offset || apple.y > appleEndY + offset) {
      apple.x = appleStartX;
      apple.y = appleStartY;
      else {
      apple.x = appleEndX;
      apple.y = appleEndY;
      //checkGame();
      break;
      case sandwich:
    if (sandwich.x < sandwichEndX - offset || sandwich.x > sandwichEndX + offset || sandwich.y < sandwichEndY - offset || sandwich.y > sandwichEndY + offset) {
      sandwich.x = sandwichStartX;
      sandwich.y = sandwichStartY;
      else {
      sandwich.x = sandwichEndX;
      sandwich.y = sandwichEndY;
      //checkGame();
      break;
      case orange:
    if (orange.x < orangeEndX - offset || orange.x > orangeEndX + offset || orange.y < orangeEndY - offset || orange.y > orangeEndY + offset) {
      orange.x = orangeStartX;
      orange.y = orangeStartY;
      else {
      orange.x = orangeEndX;
      orange.y = orangeEndY;
      //checkGame();
      break;
      case strawberry:
    if (strawberry.x < strawberryEndX - offset || strawberry.x > strawberryEndX + offset || strawberry.y < strawberryEndY - offset || strawberry.y > strawberryEndY + offset) {
      strawberry.x = strawberryStartX;
      strawberry.y = strawberryStartY;
      else {
      strawberry.x = strawberryEndX;
      strawberry.y = strawberryEndY;
      //checkGame();
      break;
      case napkin:
    if (napkin.x < napkinEndX - offset || napkin.x > napkinEndX + offset || napkin.y < napkinEndY - offset || napkin.y > napkinEndY + offset) {
      napkin.x = napkinStartX;
      napkin.y = napkinStartY;
      else {
      napkin.x = napkinEndX;
      napkin.y = napkinEndY;
      //checkGame();
      break;
      case bar:
    if (bar.x < barEndX - offset || bar.x > barEndX + offset || bar.y < barEndY - offset || bar.y > barEndY + offset) {
      bar.x = barStartX;
      bar.y = barStartY;
      else {
      bar.x = barEndX;
      bar.y = barEndY;
      //checkGame();
      break;
      case juice:
    if (juice.x < juiceEndX - offset || juice.x > juiceEndX + offset || juice.y < juiceEndY - offset || juice.y > juiceEndY + offset) {
      juice.x = juiceStartX;
      juice.y = juiceStartY;
      else {
      juice.x = juiceEndX;
      juice.y = juiceEndY;
      //checkGame();
      break;
      case foil:
    if (foil.x < foilEndX - offset || foil.x > foilEndX + offset || foil.y < foilEndY - offset || foil.y > foilEndY + offset) {
      foil.x = foilStartX;
      foil.y = foilStartY;
      else {
      foil.x = foilEndX;
      foil.y = foilEndY;
      //checkGame();
      break;
      case banana:
    if (banana.x < bananaEndX - offset || banana.x > bananaEndX + offset || banana.y < bananaEndY - offset || banana.y > bananaEndY + offset) {
      banana.x = bananaStartX;
      banana.y = bananaStartY;
      else {
      banana.x = bananaEndX;
      banana.y = bananaEndY;
      //checkGame();
      break;
      case bottle:
    if (bottle.x < bottleEndX - offset || bottle.x > bottleEndX + offset || bottle.y < bottleEndY - offset || bottle.y > bottleEndY + offset) {
      bottle.x = bottleStartX;
      bottle.y = bottleStartY;
      else {
      bottle.x = bottleEndX;
      bottle.y = bottleEndY;
      //checkGame();
      break;
      case waxbag:
    if (waxbag.x < waxbagEndX - offset || waxbag.x > waxbagEndX + offset || waxbag.y < waxbagEndY - offset || waxbag.y > waxbagEndY + offset) {
      waxbag.x = waxbagStartX;
      waxbag.y = waxbagStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();
      break;
      case cup:
    if (cup.x < cupEndX - offset || cup.x > cupEndX + offset || cup.y < cupEndY - offset || cup.y > cupEndY + offset) {
      cup.x = cupStartX;
      cup.y = cupStartY;
      else {
      cup.x = cupEndX;
      cup.y = cupEndY;
      //checkGame();
      break;
      case yogurt:
    if (yogurt.x < yogurtEndX - offset || yogurt.x > yogurtEndX + offset || yogurt.y < yogurtEndY - offset || yogurt.y > yogurtEndY + offset) {
      yogurt.x = yogurtStartX;
      yogurt.y = yogurtStartY;
      else {
      waxbag.x = waxbagEndX;
      waxbag.y = waxbagEndY;
      //checkGame();

    Some questions:
    1. Can I specify more than one End x,y location for a draggable sprite?
    yes, use an if-else statement
    I'm creating a lesson to teach kindergartners how to sort lunchroom waste. If they have a napkin, for example, it could either go into the compost OR into the recycling. In cases like this where an item could really be placed into more than one bin, I want them to get it right if they do either of those things, rather than forcing them to choose which one.
    2. To make my project more "fun" for kids, I wanted to customize the cursor with a graphic of  hand. When I tried this in the flash file it works perfectly until I add the drag and drop functionality for the wasted items. Then the cursor will more around  but not pick up any items. Once I revert back to the standard pointer, the correct drag and drop functionality is restored.
    assign your cursor's mouseEnabled property to false:
    yourcursor.mouseEnabled=false;
    3. I have it set to snap back to the original location if learner attempts to drop the item on the wrong target. I want to be able to play a sound file when that happens, as well as play a sound file when it lands on the correct target, as well as shrink the item and change its opacity so that it appears invisible. I want to give the illusion of it being placed into the bin. I have no idea as to the proper way to code these events so that they happen.
    use the sound class to create a sound:
    // initialize your correct sound once with
    var correctSound:Sound=new CorrectSound();  // add an mp3 sound to your library and assign it class = CorrectSound
    // apply the play() method everytime you want your sound to play:
    correctSound.play();
    // change an object's opacity:
    someobject.alpha = .3;  // partially visible
    someobject.alpha = 1;  // fully visible
    someobject.visible=false;  // not visible, at all.
    // change an object's scale
    someobject.scaleX=someobject.scaleY=.5;  // shink width and height by 2
    someobject.scaleX=someobject.scaleY=1;  // resize to original
    4. I've watched dozens of hours of youtube tutorials before coming here. I'm a quick study, but am very new to action script. In one of the videos the developer showed referencing an external action script file which I don't think is an option in CC. The coding method he used seemed much more streamlined and "clean" than the chunks I'm working with now. Is there an easy way for me to code information about these objects  than the way I've got it here now? I hate starting new things with bad habits. The perils of self-teaching.
    you could google: 
    actionscript 3 class coding
    actionscript 3 object oriented programming
    p.s.  you can simplify and streamline your coding by learning about arrays and using hitTestObject.

  • Drag and Drop custom objects

    Hi guys.
    I just finished reading the Java tutorial on Drag and Drop at http://download.oracle.com/javase/tutorial/uiswing/dnd/index.html.
    Unfortunately, there is no note about how to drag and drop a custon object. There is something said on DataFlavor, but not enough to help me.
    So I would appreciate it if anyone could tell me the steps to follow when dragging and droping a custom object.
    Best regards.
    Edmond

    I think we can help you, but please post some example/code of what you are trying to achieve.
    I made D&D with custom objects, custom icons, etc. and is not so hard ... like I said, post some code ...
    RGV

  • Drag and drop custom component

    I have a custom component that is a JPanel with a JTextField and a JButton. The component is a display and chooser for an address. I want to be able to copy the address from one to another with drag and drop.
    Here's what I have so far. The drag starts, but it won't allow to drop on another instance of the same class. MyTransferHandler is a simple subclass of TransferHandler that logs everything so I can watch what is happening. The canImport() method of TransferHandler is never getting called. Any ideas?
    transferHandler = new MyTransferHandler("address");
    setTransferHandler(transferHandler);
    dragListener = new MouseMotionListener() {
    public void mouseDragged(MouseEvent a_evt) {
    if (address != null) {
    TransferHandler l_h = getTransferHandler();
    l_h.exportAsDrag(PanelAddress.this, a_evt, TransferHandler.COPY);
    public void mouseMoved(MouseEvent e) {
    addMouseMotionListener(dragListener);
    txtAddress.addMouseMotionListener(dragListener);

    Figured it out while creating the SSCCE. Needed to set the TransferHandler on the text field and button because they were "hiding" the panel.
    {noformat} MyTransferHandler l_transfer_handler = new MyTransferHandler("address");{noformat}{noformat} setTransferHandler(l_transfer_handler);{noformat}{noformat} txtAddress.setTransferHandler(l_transfer_handler);{noformat}{noformat} btnChoose.setTransferHandler(l_transfer_handler);{noformat}{noformat}{noformat}

Maybe you are looking for

  • Yoga 2 Pro don't work with external monitor (picture attached)

    I'm trying to connect my Y2P to my Dell 2407wfpp, 24" 1920x1200, (http://www.dell.com/downloads/emea/products/snp/2407wfp_monitor.pdf) and everything turns to a green-blue colour..  I'm connecting using a Mini HDMI to HDMI cable + a HDMI to DVI adapt

  • Why is it, again, that I can't drag-timestretch clips and make them and snap to rulers? (in MT)

    How come while 1'm holding control and dragging the edge of a clip to timestretch it, I can't make it snap to the rules, If I want to say bring it from 6 bars back to 5 bars why can't the timestretched clip snap to the ruler while I'm stretching it?

  • Query SQ01

    Hello SAP Gurus Can anyone provide me with SQ01 documentation or any links regarding SAP query concept like how to create and copy things.... Thanks for your help Kishore

  • Assigning search help (F4 functionality ) for recipient field in IW32

    Hi, my requirement is to assign search help (F4 functionality) for recipient field in components tab of IW32. anybody help me to assign search help for it. same way i need to assign that in MIGO, MB21, MB1A goods recipient field.

  • How to Transport a Screen Exit

    Hi All, I have created a Project in CMOD which has a Funciton exit and Screen exit. Now i have saved all the thins including Project, Funciton Exit in Dev. Class under a Request. But i am not able to save the Screen exit in Dev.Class. it is getting s