Programati​cally detecting a wave from a noisy Wave.

Dear folks,
I have a wave which i have acquired and need to figure out by means of a code what kind of wave is it. Is it a sine wave, Square Wave, Triangular wave... I did make a small program which takes the fft of the acquired wave and deconvolutes it against the fft of a standerd wave. This works fine with a pure wave and is very predictable. I then tried using the same with a realworld signal, but the noise in the wave upsetted all the value ranges. Can someone sugggest a better meathod??
Ankur
Attachments:
Corelate.vi ‏386 KB

antea06,
Tried that. the problem is that incase my acquired wave is essentially a square wave, the edge is distorted on filltering  and the fft of the data after deconvolution is then very close to a sine wave. So i tried the commmunities. I tried digitizing the wave and removing the lsb values of the wave. It resulted in the sine and triangular wave having very simmilar charecteristics. Thaught i could use a lock in amplifier to extract the vave, but all it gives us is a single point value in intensity of the reference wave.
Thanking You
Ankur Kumar

Similar Messages

  • Is there a way to programati​cally switch a control from the default style to the system style

    I was wondering if there was any way to conditionally make a control look like either the default control style or the system control style. The front panel that contained the control would not be running. I'm running Labview 8.0. One possisble way I'm thinking of is changing the type descriptor but I'm not sure how to write to it (I can read it from the 7.x flatten to string function). Another way I'm thinking is maybe changing or applying a typedef but I'm not sure if that's possible either.
    CLD (2014)

    " ... If the user wants to pursue this method then it will work, but be prepared to deal with more work than you'd expect."...
    My sentiments, exactly. There may come a day when I need to spend an afternoon making one really cool control ... but I don't see it happening anytime soon.
    Message Edited by PaulG. on 05-17-2007 05:04 PM
    PaulG.
    "I enjoy talking to you. Your mind appeals to me. It resembles my own mind except that you happen to be insane." -- George Orwell

  • Auto-Detect Form Fields from Word 2007

    LiveCycle 8.x fails to detect form fields from form documents I've created in Word 2007. I also notice that Word 2007 documents saved as Word 2003 documents do not convert the text fields either (text fields static).
    Is LiveCycle 8.x compatible with Office 2007 or does it depend on the conversion from 2007 (.docx format) to 2003 (.doc format) before creating the PDF then detecting and placing the fields?

    I could tell it not to run in Acrobat 9 but can’t figure out how to do that in version 11. When I use the Create Form command, I get a series of windows that guide me through the process of creating the form. Unlike Acrobat 9, none of those windows includes an option for not running auto detect. At the end of the process, the form is created with fields. The only solution seems to be to let Acrobat create the fields, and then delete them all and manually create the fields I want. Thanks for your feedback.

  • My mac is not detecting external microphone from headphone

    my mac is not detecting external microphone from headphone

    If your headphone doesn't work on your mac then I suggest you try this:
    1.  Is it plugged in properly?  Don't try pushing it in hard. Thatis likely to break something
    2.  Call up Systems => Sounds then select the Output tab.  Do you see your headphones as an output option?  You should see "Headphones"   Headphone Output".  If you don't see it then you either have a software or a hardware problem.  Don't panic yet
    3.  Leave the headphone plugged in.  Close all your apps and shutdown the mac.  Press the power button to restart.  Hold down the following 4 keys:  ALT CMD P R   this could also be OPTION COMMAND P R
    The mac screen should go blank and should restart again.  When you've logged in, call up SYSTEMS => SOUNDS again.  Check if you can see the headphone source this time.  If you can't, now is the time to panic.  You've reset your PRAM and it hasn't made a difference, so you probably have got a hardware problem.

  • Detect CD drive from Flex-AIR desktop application???

    Can we detect CD drive from  Flex-AIR destop application even though there is no CD or Blank CD inside the drive?

    AIR 2.0 supports native code integration.
    http://labs.adobe.com/technologies/air2/
    This may be useful in hooking into native CD/DVD writing capabilities.

  • How do I get VI name and path where mouse is programati​cally from another VI

    Hi, this is my first question here.
    I am trying to create a permanent running, ObtainInfo.vi, in LV 7.1 that automatically gets ínfo from other running VI:s. I would like to obtain info from the other VI:s when the mouse is being clicked over there. Information could be the other VI:s name and/or reference. I have tried different methods without any results.
    Solved!
    Go to Solution.

    I gave it a try myself. The screenshot is attached. The problems unsolved are some errors I get when I used all VIs, the execution state property is the workaround for this. You certainly also want to have it for VIs that are Running (not top-level).
    Felix 
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    Attachments:
    MouseDown.PNG ‏43 KB

  • How can I programati​cally control the names of files output from Labview into .pdf format (ie with Adobe PDF Writer or Distiller)​?

    I would like to save some data forms for a standard test controlled with labview in a pdf format. Due to the large number of forms and test reports, I would like to have Labview automatically assign the .pdf file name based on test number already contained in the labview code. How can I do this.
    Note: This question is very similar to:
    "Labview and Adobe Acrobat output" posted by John Balone on 1/26/2000. The reponses offered good suggestions but it is not clear to me how to implement them.

    This information is essential if you plan to use the Acrobat Distiller printer driver and any of the examples listed here:
    http://zone.ni.com/devzone/devzone.nsf/webcategori​es/EADE78F29101E8DB862567AC0058596B?opendocument&n​ode=DZ52095_US
    -Graeme, rayodyne.com
    Attachments:
    1_-_Printer_Configuration_with_Acrobat_Distiller.jpg ‏64 KB
    2_-_Printer_Configuration_with_Acrobat_Distiller.jpg ‏33 KB

  • Iphone 4 not detecting jabra wave bt headset

    I have a new jabra wave+ bluetooth headset. it is not detected and paired by iphone 4 and tried so many times
    and getting frustrated.  the ios version s 6.1 . can anyone help me how to sort out this issue pls  tks
    gopi

    I dont have your headset but I would do this;
    1. delete (reset) all former connected devices that had been done. Check manual how-to-do
    2. after reset, hold the connecting button when searching for devices such as the fruit phone...
    Good luck
    Nokia 808 again (delight Belle), Nokia E7 and X7 ( again, all on Delight Belle...after some time on Nokia Lumia 925 (retired), 1020 (not that great)and Lumia 820 (Replaced my router at home, great for internet sharing).., N9 The best device ever (use it as much as Lumia 1020), Nokia 700 (Sport Phone/My Love :-) ) Nokia 701, Nokia E6 (Should have a follow-up from Nokia among with larger screen, NFC, Autofocus), Lumia 800 (Retired After 6 weeks), -Sports Tracker-Nokia Internet Radio-Handy Safe-Skype-Bambuser-Screenshot app pro-fMobi-ComingNext-Manual TaskSwitcher-jagiTimer-Easy StopWatch-Boldbeast-Equalizer-Financial Calculator-WiMP Music-YTasks-Davi-Thumbnail Folders-BizCalendar-Tiny7-Situations-nn reeder-Sport Timer-CameraLover-CameraPro-GrabRadio-LiveScore-Poddi-Gravity-SkyFilesPro

  • Programati​cally Assigning Step Type Properties

    I have developed several COM instrument drivers in Visual Basic 6.0 which I can call from TestStand using the ActiveX/COM adapter. However, I would like to be able to create a custom step type for each of these ActiveX servers. Each server provides several creatable classes and a number of interfaces. Ideally I'd like to create a custom step type that references the GUID of my server but have the ability to programatically assign the step properties such as Interface ID and CoClass ID to use the classes and interfaces of my server that I want need to access.
    I have noticed that it is possible to create a step type (IEngine.NewStepType method) and set the Automation Adpater. Then I can programatically access its hidden properties (e.g.TS.SData.Call.CoClass). However, I am unsure of how to save and/or access this newly created step type. Where is it stored and how can I insert steps using of the new step type?
    I have attached a sequence I've been working on. This has dependencies on a Station global and a server unique to my system but illustrates what I've been trying to do. Do you have any advice of what I need to do next or have any examples available where this sort of thing has been done in the past.
    Thanks.

    Hi David,
    Here is some steps for saving your Step types.
    You will need to create a type palette Ini file to hold your step types.
    Get a PropertyObjectFile reference by calling Engine.NewPropertyObjectFile(FileType_TypePaletteF​ile).
    Set the path of the ini file with PropertyObjectFile(Path).
    Get a TypeUserList reference by calling PropertyObjectFile.TypeUsageList().
    Get a count of the number of Types in the TypeUsageList by calling TypeUsageList.NumTypes().
    This point create your Step types (as you have done). You will need a PropertyObject reference to your steptypes for use with the TypeUsageList.InsertType().
    Using each steptype PorpertyObject reference.
    Insert the Type into the TypeUsageList by calling TypeUsageList.InsertType(step type propertyobject ref, index (which will be your count), typeCategoryParam = TypeCategory_StepType)
    Call the PropertyObjectFile.IncChangeCount() to indicate file changed.
    Increment the count and repeat Insert for each of your step types.
    save the ini file PropertyObjectFile.SaveFileIfModified(prompt = TRUE).
    Tidy up by releasing references etc.
    I know this works for TestStand 2.0.1f1 and hopefully it will work for 3.1. Unfortunately I haven't got 3.x installed on a PC to try it.
    Hope this gets you started.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Programati​cally delete a DAQ device

    I have created a system with hardware (a USB DAQ) and software that is to be installed on multiple computers overseas. I want to make the set-up as easy as possible because I don't think the people doing the setup will be very well trained, and I won't be there to fix any problems.  I have created an installer that includes all the hardware as well as software setup, but there is one issue left, and I'm not sure what the best way to solve it.  If the installer is run before the DAQ is connected, then the installer creates a virtual device. If the DAQ is then connected, it is named Dev1, which doesn't work with any of my tasks, of course. I have some code that runs, and verifies the hardware set-up each time the system is started, so I can see if the device with the proper name is virtual, and if so, I can rename the actual and virtual DAQ device to the right names, so my tasks operate properly. However, I now have a virtual device hanging out on my system doing nothing, which I would like to avoid, because there is an outside chance that I will end up on the phone trying to explain to people how to straighten out a system when it goes bad, and I want to keep it as simple as possible.  I have two questions:
    Is there some way to delete the virtual device programatically?
    Is there some better approach to accomplish what I am trying to do? I thought about not allowing the installer to proceed if there is no DAQ device plugged in, but I don't know if that is possible.

    Jeff·Þ·Bohrer wrote:
    Hmmmm...... There has got to be a way to script up the "Toss Tasks to MAX" and "include .nce" as part of a "Deploy" process. Wirebird, Jack?  any opinions on that?
    I would tend to agree with John_P1's quote below:
    John_P1 wrote:
    I honestly just build up my tasks programmatically.... You can do just about anything that you could do in MAX programmatically via the System Configuration API.
     And I would tend to shy away from:
    Jo-Jo wrote:
    ...I just find [that using MAX] really speed development, and help with maintanence because you can test out all of your tasks in MAX outside of any LabVIEW code. And debug and toubleshoot hardware without using any of your own software, so you know any problems are not software bugs.
     once going into production. MAX tends to be a good tool for getting your feet wet after unboxing the hardware, but something you gradually migrate away from after the prototyping phase -- yet occasionally return to, as you mention, if you need to back up to square one for new prototyping or as a sanity check.
    It's possible to deploy NCE hardware behavior configurations, but not necessarily desirable. For the same reason it's possible to deploy any arbitrary configuration (INI, XML, ....), yet it's likely more desirable to build this configuration programmatically -- perhaps persisting it to disk if it's a user-modify-able configuration, or if it's desirable to persist user settings between subsequent deployments -- else it might be most desirable to keep the "configuration" hard-coded as essential business logic (as DAQ tasks might tend to be).
    Though, it sounds like you have a solution, and that's far more valuable than more work! Keep a tally on whether the current deployment strategy keeps you and your end users happy, and if so, keep it! Else, consider John_P1's advice, which is more likely to scale with your application if things get hairy.
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

  • "Detecting" a variable from an externally-loaded SWF via SWFLoader

    I load an external SWF file from a click event.  Then, when the interactions has reached the end of the presentation, we'd like it to unload itself, and go into another state.
    Is that possible?  ( actually transformed the SWF into a component using Flash Builder 4 hoping that would be easier to detect variables and events)
    Thanks,
    Doug

    It is possible, but you'll have to wire up the communications between the
    SWFs

  • How to detect concurrent updates from MS Access database

    Hi...
    I would like to know how can LV detect the MS Access database if there is any updates data from others application such as VB6 through the same database.. I do not want the LV to check from the database so oftenly. It will only do the checking / refreshing of data when there is a new data updated by other software (like VB) into the same database. THANKS!!......

    222,
    It sounds like you want MS Access to send an event or callback to your Labview program whenever it receives an update.  I'm definitely no Access expert, and I'm not sure if the program can generate events like that (I've done some searches at Microsoft.com, with no luck so far).  I would suggest going to Microsoft's website to either contact technical support with the question, or post to their forums.  The first step would be figuring out if it's possible to generate such an event, and if so, we can go from there.  If not, the polling method might be the only option.  Here are some links that will help get you started:
    Microsoft Access Home
    Microsoft Office Access 2003 Help and Support
    -Justin

  • ANSWER: HOW TO DETECT Java Plugin from JavaScript

    I created a new topic because the questions about
    how to detect Java Plugin in browsers are scattered
    thoughout this forum.
    Basically you need to employ two approaches for IE and NS.
    In IE you need to try to instantiate a small applet
    (not your production applet) in order to see if browser
    can do it. if the browser can do it, you can make a
    call applet from JavaScript in order to find version of
    JRE (as well as a host of other things).
    In NS you can write a simple JavaScript which will
    interrogate the browser for all plugins installed. Then
    ypu can make a desicion whether to pass execution to
    the next(or generated) page which hosts your applet,
    or ask the user to download/install a plugin.
    I ecourage everybody to host a plugin on your site
    rather leave default link to it which is generated by
    html converter.
    In order to run sample,
    Prerequisites:
    Java Plugin 1.3.
    If you have a different version of plugin,
    substitute hardcoded plugin version in JavaScript for
    value that you have.
    1. compile java file
    2. put class file in the same directory with html file
    3. load html file into the browser.
    4. press "Check Java Plugin.." button
    5. see it work
    6. examine code
    7. uninstall plugin
    8. repeat steps 1 - 4
    9. see it work
    10. install plugin.
    Sample code follows:
    **********************HTML FILE BEGIN***********
    <HTML>
    <HEAD>
    <!-- Generated by Kawa IDE -->
    <TITLE>Detect Java Runtime</TITLE>
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    var browsername;
    function doNetscape()
    for (i=0; i < navigator.plugins.length; i++)
    for (j = 0; j < navigator.plugins.length; j++)
    if(navigator.plugins[i][j].type == "application/x-java-applet;version=1.3")
    alert("You are running Netscape with Java Plugin 1.3.0 - OK");
    return;
    alert("You are running Netscape\nPlease, install Java Runtime Environment 1.3.0");
    function doMicrosoft()
    var applet = document.myApplet;
    if(applet == null)
    alert("You are running Microsoft Browser.\nPlease, install Java Runtime Environment 1.3.0");
    return;
    var version = applet.getJavaVersion();
    if(version == "1.3.0")
    alert("You are running IE, Java Plugin 1.3.0 installed - OK");
    else
    alert("You are running IE, other plugin installed - mybe OK if later that 1.3.0\nYour version: " + version);
    function getJava()
    var applet = document.myApplet;
    if(applet == null)
    alert("Please, install Java Runtime Environment");
    return;
         alert("JRE Version: " + document.myApplet.getJavaVersion());
    function checkJavaPlugin()
         browsername = navigator.appName;
         if(browsername.indexOf("Netscape")!= -1)
              browsername="NS";
              doNetscape();
         else
              if(browsername.indexOf("Microsoft")!=-1)
                   browsername="MSIE";
                   doMicrosoft();
              else
                   browsername="N/A";
                   alert("Unknown browser: " + browsername);
    </SCRIPT>
    <body>
    <Strong>Check Java Plugin</strong>
    <OBJECT id="myApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
         WIDTH = 1
         HEIGHT = 1 >
         <PARAM NAME = CODE VALUE = "DetectPluginApplet.class" >
         <PARAM NAME="scriptable" VALUE="true" >
         <embed type="application/x-java-applet;version=1.3"
              code = DetectPluginApplet width = 2 height = 2 MAYSCRIPT = "true" >
         </embed>
         </EMBED>
    </object>
    <FORM>
         <INPUT TYPE="button" value="Get Plugin Version in IE" onClick="getJava()">
         <INPUT TYPE="button" value="Check Java Plugin in NS and IE" onClick="javascript:checkJavaPlugin()">
    </FORM>
    </BODY>
    </HTML>
    **********************HTML FILE END***********
    ***************APPLET FILE BEGIN***********
    import java.awt.*;
    public class DetectPluginApplet extends java.applet.Applet
         public void init()
              add(new Label("DetectPluginApplet"));
    public String getJavaVersion()
    return System.getProperty("java.version");
    **************APPLLET FILE END************

    Try following java script, it works on new browsers (NS 4+, IE5+). For IE you have to enable 'ActiveX objects creation' in security options.
    var agt=navigator.userAgent.toLowerCase();
    var is_major = parseInt(navigator.appVersion);
    var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
    && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
    && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1));
    var is_ie5up = (is_ie && (is_major == 4)
    && ( (agt.indexOf("msie 5.0")!=-1)
    || (agt.indexOf("msie 5.5")!=-1)
    || (agt.indexOf("msie 6.0")!=-1) ) );
    var pluginDetected = false;
    var activeXDisabled = false;
    // we can check for plugin existence only when browser is 'is_ie5up' or 'is_nav4up'
    if(is_nav4up) {
    // Refresh 'navigator.plugins' to get newly installed plugins.
    // Use 'navigator.plugins.refresh(false)' to refresh plugins
    // without refreshing open documents (browser windows)
    if(navigator.plugins) {
    navigator.plugins.refresh(false);
    // check for Java plugin in installed plugins
    if(navigator.mimeTypes) {
    for (i=0; i < navigator.mimeTypes.length; i++) {
    if( (navigator.mimeTypes[ i].type != null)
    && (navigator.mimeTypes[ i].type.indexOf(
    "application/x-java-applet;jpi-version=1.3") != -1) ) {
    pluginDetected = true;
    break;
    } else if (is_ie5up) {
    var javaVersion;
    var shell;
    try {
    // Create WSH(WindowsScriptHost) shell, available on Windows only
    shell = new ActiveXObject("WScript.Shell");
    if (shell != null) {
    // Read JRE version from Window Registry
    try {
    javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
    } catch(e) {
    // handle exceptions raised by 'shell.regRead(...)' here
    // so that the outer try-catch block would receive only
    // exceptions raised by 'shell = new ActiveXObject(...)'
    } catch(e) {
    // Creating ActiveX controls thru script is disabled
    // in InternetExplorer security options
    // To enable it:
    // a. Go to the 'Tools --> Internet Options' menu
    // b. Select the 'Security' tab
    // c. Select zone (Internet/Intranet)
    // d. Click the 'Custom Level..' button which will display the
    // 'Security Settings' window.
    // e. Enable the option 'Initialize and script ActiveX controls
    // not marked as safe'
    activeXDisabled = true;
    // Check whether we got required (1.3+) Java Plugin
    if ( (javaVersion != null) && (javaVersion.indexOf("1.3") != -1) ) {
    pluginDetected = true;
    if (pluginDetected) {
    // show applet page
    } else if (confirm("Java Plugin 1.3+ not found, Do you want to download it?")) {
    // show install page
    } else {
    // show error page
    }

  • Detecting character encoding from BLOB stream... (PLSQL)

    I'am looking for a procedure/function which can return me the character encoding of a "text/xml/csv/slk" file stored in BLOB..
    For example...
    I have 4 files in different encodings (UTF8, Utf8BOM, ISO8859_2, Windows1252)...
    With java I'can simply detect the character encoding with JuniversalCharDet (http://code.google.com/p/juniversalchardet/)...
    thank you

    Solved...
    On my local PC I have installed Java 1.5.0_00 (because on DB is 1.5.0_10)...
    With Jdeveloper I have recompiled source code from:
    http://juniversalchardet.googlecode.com/svn/trunk/src/org/mozilla/universalchardet
    http://code.google.com/p/juniversalchardet/
    After that I have made a JAR file and uploaded it with loadjava to my database...
    C:\>loadjava -grant r_inis_prod -force -schema insurance2 -verbose -thin -user username/password@ip:port:sid chardet.jarAfter that I have done a java procedure and PLSQL wrapper example below:
       public static String verifyEncoding(BLOB p_blob) {
           if (p_blob == null) return "-1";
           try
            InputStream is = new BufferedInputStream(p_blob.getBinaryStream());
            UniversalDetector detector = new UniversalDetector(null);
            byte[] buf = new byte[p_blob.getChunkSize()];
            int nread;
            while ((nread = is.read(buf)) > 0 && !detector.isDone()) {
                detector.handleData(buf, 0, nread);
            detector.dataEnd();
            is.close();
           return detector.getDetectedCharset();
           catch(Exception ex) {
               return "-2";
       }as you can see I used -2 for exception and -1 if input blob is null.
    then i have made a PLSQL procedure:
    function f_preveri_encoding(p_blob in blob) return varchar2 is
    language Java name 'Zip.Zip.verifyEncoding(oracle.sql.BLOB) return java.lang.String';After that I have uploaded 2 different txt files in my blob field.. (first one is encoded with UTF-8, second one with WINDOWS-1252)..
    example how to call:
    declare
       l_blob blob;
       l_encoding varchar2(100);
    begin
    select vsebina into l_blob from dok_vsebina_dokumenta_blob where id = 401587359 ;
    l_encoding := zip_util.f_preveri_encoding(l_blob);
    if l_encoding = 'UTF-8' then
       dbms_output.put_line('file is encoded with UTF-8');
    elsif l_encoding = 'WINDOWS-1252' then
       dbms_output.put_line('file is encoded with WINDOWS-1252');
    else
        dbms_output.put_line('other enc...');
    end if;
    end;Now I can get encoding from blob and convert it to database encoding and store datas in CLOB field..
    Here you have a chardet.jar file if you need this functionality..
    https://docs.google.com/open?id=0B6Z9wNTXyUEeVEk3VGh2cDRYTzg
    Edited by: peterv6i.blogspot.com on Nov 29, 2012 1:34 PM
    Edited by: peterv6i.blogspot.com on Nov 29, 2012 1:34 PM
    Edited by: peterv6i.blogspot.com on Nov 29, 2012 1:38 PM

  • Drag and Drop - detecting drop away from a component

    Flex 4, AIR 2.0 app
    I have a drag and drop detecting a Button drag away from a Group1 into Group2.
    When the user drops into a Group2, the Button is added to it, which obviously removes it from Group1.
    I would like it that if the user drags away from Group2 and drops it randomly on the screen, the Button will be added back into Group1.
    Does anyone have any ideas as to how I might go about detecting the end of a drag when not over a component, so I can add the button back into Group1 again?
    Hope that makes sense!!!

    Thanks Ronnie,
    I'll have a look at gthis as it looks a bit more efficient than the solution I have come up with.
    The only thing I'm not sure about is at what point my Button gets put back into Group1.  In my current movie, I have a function which handles the dragDrop event.  But if I drop outside a component, I don't have an event from which I call the handleDrop(dragEvent) function.
    I'll have a look.
    In the meantime, what I'm doing is Making my drag item a custom component, passing a reference to it's default container (Group1) and its Default X and Y co-ordinates.
    Then, I have a dragComplete handler which is called whenever the drag item is released - I then check the action property of the event and if it is "none" I know it has been dropped outside a recognised target and I can add it back into its default group and set its default x and y coordinates.  This seems to work quite nicely at the moment.
    so, my code in the Drag Button looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        mouseDown="mouseDownHandler(event)"
        dragComplete="dragCompleteHandler(event)">
    <fx:Script>
      <![CDATA[  
       import mx.core.DragSource;
       import mx.core.IUIComponent;
       import mx.events.DragEvent;
       import mx.managers.DragManager;
       public var _defaultParent:Object;
       public var _defaultX:Number;
       public var _defaultY:Number;
       protected function mouseDownHandler(event:MouseEvent):void
        // the drag initiator is the object being dragged (target of the mouse event)
        var dragInitiator:IUIComponent = event.currentTarget as IUIComponent;
        // the drag source contains data about what's being dragged
        var dragSource:DragSource = new DragSource();
        // ask the DragManger to begin the drag
        DragManager.doDrag( dragInitiator, dragSource, event, null );
       protected function dragCompleteHandler(event:DragEvent):void
        // TODO Auto-generated method stub
        //trace("Drag complete!");
        //trace("target = " + event.target);
        //trace("action = " + event.action);
        if (event.action != "none"){
         trace("woo!");
        }else{
         trace("put the drag label back into its original position");
         if (event.target.parent != _defaultParent){
          trace("put it back, you monster!");
          _defaultParent.addElement(event.target);
          event.target.x = _defaultX;
          event.target.y = _defaultY;
         }else{
          trace("ah... it's already in the right place... actually!");
      ]]>
    </fx:Script>
    </s:Button>

Maybe you are looking for

  • Chart Legend order

    Hi All, I have created a chart ( line chart ) that shows trends. The egend shows up in alphabetical order which is fine but it does not match with the order of lines in chart which is confusing. Can someone please help me if there is any workaround t

  • Command Link problem

    Hi all, Our team is developing project on JSF. I have weird problem on IE explorer. When I click on any command link many times, but nothing is happened. If I refresh the page and then click then it will work properly. So every time I have to press r

  • Use of filter in my pivot table

    Hi!! I am using jdeveloper 11.1.1.5 I had created a read only ViewAdfVO. Here s the querry select glal_plant "glgh_parent_group", gacl_acct_type||glal_plant  "glgh_group", DECODE(gacl_acct_type,'A','ASSETS','L','LIABILITIES','Q','EQUITY', 'R','REVENU

  • Select Apps to appear in 'Open In'

    It appears that iPad limits only 10 apps to appear in the 'Open In' menus (e.g., the menu in the mail client). Is there any way of selecting which apps will appear here? E.g., I used to be able to see GoodReader as one of the options, but now it is g

  • SD reports, AS-IS TO-BEmodel

    Hi can i know about SD reports and AS-IS TO-BE model plz' thanks in advance