[HTML5/Flash CC] Example code to add/run sound programmatically?

Anyone have a code snippet to do this? I managed to make a really stupid work-around for the moment. Created a movieclip in it with nothing but the sound, gave it an instance name and now I can do mcBeep.gotoAndPlay('start') to play it, but for obvious reasons, I'd like to be able to do this without having to leave an empty movieclip lying around on stage...
Thanks in advance!

JLudwig wrote:
Any reason why you call getSourceDataLine() twice? ..Oh wait, I know this one (..snaps fingers. yes) it is because I am a mor0n, and forgot the class level (static) attribute declared earlier in the source when I (re)declared the local attribute and called getSourceDatLine (which was redundant, given the next line, which as you point out also called getSourceDataLine).
There are (at least) two ways to correct this problem.
1) Remove the class level attribute and the second call.
2) Remove the local attribute as well as the first call (all on the same code line).
Method 1 makes more sense, unless you intend to refactor the code to only instantiate a single SDL for however many times the user presses (what was it? Oh yeah..) 'Generate Tone'.
My 'excuse' for my odd programming is that this was 'hacked down' from a longer program to form an SSCCE. I should have paid more attention to the fine details (and perhaps run a lint checker on it).
Thanks for pointing that out. I guess from the fact you spotted it, that you have already corrected the problem. That you thought to report it, gives me confidence that you 'will go far (and be well thought of, besides)' in the open source community.
..This is quite handy, thank you.You're welcome. Thanks for letting us know about the error (OK - the pointless redundancy). Thanks to your report, other people who see this code later, will not have to wonder what (the heck) I was thinking when I did that.
Another thing I noted, now I run the source on a 400MHz laptop (it's hard times, here) is that the logic could be improved. At the speeds that my laptop can feed data into the SDL, the sound that comes out the speakers approximates the sound of flatulence (with embedded static, as a free bonus!).
Edit 1: Changed one descriptive word so that it might get by the net-nanny.
Edited by: AndrewThompson64 on Mar 27, 2008 11:09 PM

Similar Messages

  • Error 1092 happened while running the executalbe file from an example code of Simulation Interface Toolkit

    With Simulation Interface Toolkit 3.0.1 and LabVIEW 8.0, I built the example code Sine Wave.vi to be an executable file. I made no modification to the code except setting Real-Time Target to be localhost in SIT Connection Manager. Everything was OK during the building process. But when I run it, error 1092 was reported. Here is the error message.
    Error 1092 occurred at Invoke Node in sit Traverse.vi->sit Traverse for References.vi->sit Find Object By Label.vi->sit Get RPS-Control-Indicator Refs.vi->sit Init Model.vi->Sine Wave.vi (Traverse Initialization Failed)
    I cannot find out any helpful information about this error code. Can anybody help me? Thanks a lot!
    帖子被zhuang在09-13-2006 08:01 AM时编辑过了

    To my knowledge, building an EXE out of a SIT host VI is not supported.  The SIT host VI utilizes functionality in LabVIEW that is not exposed in the LabVIEW Runtime Engine (i.e., with built EXEs and DLLs).
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Error while executing BBP_UPDATE_PORG Tr Code with ADD Option

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

    Hi All,
    I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
    We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data  with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
    Example Scenario:
    step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
    and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
    step 2: I run the BBPUPDVD in SRM System.
    Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
    Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
    Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
    Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
    For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
    Runtime Error          DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/15/2008 10:56:58
    ShrtText
         Screen output without connection to user.
    What happened?
         Error in ABAP application program.
         The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
          one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    Information on where terminated
        The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in      "BBP_PORG_INSERT".
        The main program was "RSM13000 ".
        The termination occurred in line 59 of the source code of the (Include)      program "LBBP_PARTNER_MAINTU11"
        of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor      590).
        The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
       56
       57 * update database
       58   IF NOT LT_FRG0060_NEW[] IS INITIAL.
    >>>>>     INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
       60   ENDIF.
       61
       62   IF NOT LT_FRG0061_NEW[] IS INITIAL.
       63     INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
       64   ENDIF.
    Kindly guide me or provide solution.
    We are in SRM 4.0 and ECC 5.0.
    Thanks a lot in advance.
    Regards,
    Sudarsan
    Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
    Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM

  • How is the code compiled and run?

    Hi,
    im wondering how this code is interpretet/run by flash as3.
    Lets say i have a for loop:
    for ( var i:Number = 0; i < 12; i++)
    runStep1();
    runStep2();
    runStep3();
    Does the as-code run top to bottom and every method runStep1,
    runStep2, runStep3 is run in a sequence or does the for-loop just
    rush through the methods and doesnt bother if the methods are
    totally executed?
    //Criss

    Hi --
    I agree with you on the way Actionscript behaves -- it
    definitly doesn't
    execute in a way you would expect. One way to work around
    this issue (if
    possible) is to call one function from the end of another,
    for example:
    for ( var i:Number = 0; i < 12; i++)
    runStep1();
    function runStep1() {
    runStep2();
    function runStep2() {
    runStep3();
    This appraoch won't always work if you don't always want step
    2 to run after
    step 1, etc. but it is one approach to this issue.
    Rich
    "Surferboy_SWE" <[email protected]> wrote in
    message
    news:ggegg7$21i$[email protected]..
    >
    Yes im an oldie but new hehe. I was told flash would
    run
    > straight thorough each for loop without bothering if
    each of the functions
    > (runStep1, runStep2...) were executed ready. Lets say
    runStep1() is
    > calculating somthing that takes 2 second and runStep2
    and runStep3 are
    > dependent of what runStep1 has calculated you would end
    up with som
    > strange
    > hard to debug error.
    > I know there are other ways of adressing this problem
    but I never heard
    > of
    > this kind of execution order in other programming
    languages.
    >

  • How to drag and drop an email from Outlook Express (with example code)

    Hi,
    It is possible to drag a mail from Outlook Express and drop it on the desktop, and the file created is a .eml, which is a text file.
    If I drop it into a Java application, no DataFlavor is provided to make the data transfer possible.
    As the data to transfer is a text, it should be possible to drop it.
    How to make a DataFlavor available and recover the text as a stream of characters?
    Example code
    The small application below shows the MIME type of the data that is about to be dropped. If you drag an icon from the desktop, a type will be displayed; if you drag an Outlook Express mail, no type will be displayed.
    Thanks.
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.dnd.DropTarget;
    import java.awt.dnd.DropTargetDragEvent;
    import java.awt.dnd.DropTargetDropEvent;
    import java.awt.dnd.DropTargetEvent;
    import java.awt.dnd.DropTargetListener;
    import java.util.List;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    public class TestSDN extends JFrame {
        void run () {
            JLabel lab = new JLabel();
            lab.setPreferredSize (new Dimension (100, 100));
            lab.setOpaque(true);
            lab.setBackground(Color.RED);   
            getContentPane().add (lab);
            new DropTarget(lab, new DropTargetListener(){
                public void dragEnter(DropTargetDragEvent dtde) {
                    System.out.println("dragEnter DataFlavors="+dtde.getCurrentDataFlavors().length);
                    for (DataFlavor df: dtde.getCurrentDataFlavors())
                        System.out.println("DataFlavor MIME type="+df.getMimeType());
                public void dragExit(DropTargetEvent arg0) {
                public void dragOver(DropTargetDragEvent arg0) {
                public void drop(DropTargetDropEvent arg0) {
                public void dropActionChanged(DropTargetDragEvent arg0) {
            pack();
            setVisible (true);
        public static void main(String[] args) {
            new TestSDN().run();
    }Edited by: JavaGame on Jan 29, 2009 9:56 AM
    Edited by: JavaGame on Jan 29, 2009 9:57 AM

    It might just be Microsoft not using standards? I remember having a similar situation - I had an application that could have a zip entry fron 7-zip drag-and-dropped into it (came over as plain text, or maybe an InputStream, can't remember), but when you drill into a zip file with Windows (Vista at least), and try to drag-and-drop a zip entry from Windows Explorer, Java shows no dataflavors available. I just assumed Microsoft wasn't exporting the zip entry in any standard format (such as plain text).
    Sorry, I know that wasn't very helpful, just thought I'd share a similar experience. :)

  • Simple Server/Client Applet example code ???

    Hi to all.
    I would like to ask if possible to someone to tell me some example code to do this simple thing:
    I want an applet showing only a TextField and a button. When the user writes something on the textfield and press the button, it should send the text in the textfield to the "server", and then it should save it in a variable.
    I think there should be 2 different classes at least (server and client), but no idea in how could I make this on Java.
    So I am asking if possible for some sample code for make this.
    Thank you for the information
    John

    hello!
    Here is a console based Server which will recieve the string and disply on the DOS screen.
    /////////////////////////////////// Server /////////////////
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class ChatServer extends Thread
    ServerSocket ssSocket;
    Socket sSocket;
    public BufferedReader in;
    public PrintWriter out;
    public ChatServer()
         try
         ssSocket = new ServerSocket (4000);
         catch(IOException e)
         System.out.println (e);
    public void run()
    try
         sSocket = ssSocket.accept();
         if(sSocket != null)
              in = new BufferedReader(new InputStreamReader(sSocket.getInputStream()));
              out = new PrintWriter(sSocket.getOutputStream(), true);
    String str = in.readLine();
         System.out.println (str);
         catch(IOException e)
              System.out.println (e);
    public static void main (String []args)
              Thread th = (Thread) new ChatServer();
              th.start();     
    ///////////////////////// Client //////////////////////
    public class Client extends Applet implements ActionListener
    public Socket sClient;
    public BufferedReader in;
    public PrintWriter out ;
    String str;
    private TextField txt = new TextField();
    private Button btn = new Button ("OK");
    public void init()
         try
         sClient = new Socket ("localhost" , 4000);
         in = new BufferedReader(new InputStreamReader(sClient.getInputStream()));
         out = new PrintWriter(sClient.getOutputStream(), true);
         catch (UnknownHostException uhe)
         catch (IOException ioe)
         System.out.println (" I/O Exception : " + ioe);
         setLayout(new FlowLayout());
         txt.setColumns (20);
         add(txt);
         add(btn);
         btn.addActionListener(this);
    public void actionPerformed(ActionEvent AE)
         if(AE.getSource() == btn)
         str = txt.getText();
         out.println(str);
    now u should try it and improve it according to ur need...
    Ahmad Jamal.

  • IDLJ - HelloWorld example code problem

    Hello,
    i have a problem to get the CORBA HelloWorld example code
    running.
    compiling worked well, but as i started the HelloServer class
    the java.lang.UnsupportedClassVersionError Exception is thrown
    with Unsupported major.minor version 50.0.
    i've compiled the code with jdk 1.6.0,
    classpath is set to
    /usr/local/jdk1.6.0/jre/lib/:.
    any help would be great,
    thx in advance,

    i think i did as i set the classpath to
    /usr/local/jdk1.6.0/jre/lib/:.
    i did also try to set it directly to the rt.jar in the subdirectory /jre but
    it didn't work .
    could you please add more detail?
    there's no /usr/local/jre1.6.0 in /usr/local so i thought
    the jre must be the one in the jdk directory.
    Thx

  • Acrobat 7.0 ActiveX Object example code in Lookout

    Help folks!
    I'm trying to set up the Adobe Acrobat 7.0 Browser Document ActiveX Object under Lookout 6.0 but it doesn't work. My goal is to display a pdf document by lookout.
    What should I set by Property Browser...?
    What should I set by Property Pages...?
    What should I set by Value Property:?
    What means the term "Property" in this kind of objects?
    Is there an example code I can get?
    Any suggestion will be appreciated.
    Thanx.

    I don't know of a FREE ActiveX control for MS Word.  However, if you have MS Word installed on the same computer, you can use MS Internet Explorer ActiveX Control to view Word documents. 
    But before we do that, we have to make sure that MS Word is set to open documents in the "same window."  This basically opens a DOC file in Internet Explorer itself rather than launching a new MS Word window and then opening the DOC file in it.  To set this (if it isn't already):
    1. Launch Windows Explorer. 
    2. From the Tools menu, select "Folder Options"
    3. Click the "File Types" tab. 
    4. From the listing of "Registered File Types," select "Microsoft Word Document," (you can get to it fast by typing "DOC"); click Advanced. 
    5. Click the "Browse in same window" check box -- this toggles whether a Word document is launched outside of Internet Explorer. 
    6. Click OK to close the dialog boxes. 
    NOTE:  if the DOC still opens in a new MS Word window (and not IE), go back and toggle the check-box. 
    In Lookout, use the Lookout Webbrowser control (which is nothing but MS IE Control).  Specify the file path to the DOC file as the URL.  I am attaching a process file which does this using a TextEntry object. 
    Hope this helps.
    -Khalid
    PS:  not sure when this changed but we can't directly attach .L4P files to a post.. what a pain!  Please take a minute to add your weight to this request: 
    http://forums.ni.com/ni/board/message?board.id=130​&message.id=2142
    Message Edited by Khalid on 12-28-2005 02:55 PM
    Attachments:
    doc_process.zip ‏4 KB

  • Problem when using IRoomInfoReader/IRopomUsers in SDN example code

    Hi I am working on EP 6.0 SP2 P31, KMC 6.0 SP2 P31 and making Room development with NW Developer Studio. From https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/knowledge management and collaboration developers guide.html  I got the room extension example in com.sap.netweaver.kmc.roomextension.zip. I just add a ON_AFTER_CREATE_ROOM and code for handling this event before adding
    IRoomInfoReader roomInfo = (IRoomInfoReader)context.getValue(RoomExtensionParameter.ROOM_INFO);
    or
    IRoomUsers roomUsers = (IRoomUsers)context.getValue(RoomExtensionParameter.ROOM_INFO);
    (in order to retrieve the newly created room’s owner's id)
    The example code is working, the extensions are visible, they can be added to our room template and room can be created successfully with this template.
    After adding one of these two commands program stops just before this command line and there is no error message recorded in the log file.
    Does this KMC release version support using these two interfaces? Thanks for help.
    Best regards.
    Wang

    Hi Wang,
    as a lucky guy working on SP2, you have all logs at hand - did you check both \usr\sap\<id>\j2ee\j2ee_00\cluster\server\managers\console_logs\...error.log as well as \usr\sap\<id>\j2ee\j2ee_00\cluster\server\managers\log\portal\logs\knowledgemanagement.x.log ?!
    Did you try to log extensively? try/catch every Exception?
    Both interfaces do exist on SP2 P31.
    Did you check which class context.getValue(RoomExtensionParameter.ROOM_INFO) in fact produces?! (If not null, ask for .getClass().getName().)
    Hope it helps
    Detlev

  • Flash Builder Burrito - Enabled Geolocation in running device?

    Hi, I am developing a simple app that will show user's geolocation in the map.
    I use code like this:
    protected function view1_creationCompleteHandler(event:FlexEvent):void
         if( Geolocation.isSupported )
               g = new Geolocation();
               g.setRequestedUpdateInterval(100);
               if( g.muted )
                   // Don't do anything if device's sensor is muted.
                    return;
               g.addEventListener(GeolocationEvent.UPDATE,geoLocation_UpdateHandler,false,0,true);
    Then I modified application.xml in project like this (following Ryan Strewart's video in Adobe TV):
    <android>
        <manifestAdditions><![CDATA[
        <manifest android:installLocation="auto">
            <!-- See the Adobe AIR documentation for more information about setting Google Android permissions -->
            <uses-permission android:name="android.permission.INTERNET"/>
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
            <uses-configuration android:reqFiveWayNav="true"/>
            <supports-screens android:normalScreens="true"/>
            <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
        </manifest>
    ]]></manifestAdditions>
      </android>
    Then I use Flash Builder Burrito to install and run application into device. The Geolocation object is muted. Even I turn on all geolocation setting. An interesting thing is, Geolocation is work in Flex de tour Mobile application.
    I use Samsung Galaxy S with Froyo 2.2

    I was able to test the Geolocation object successfully on a Motorola Droid using the following code:
    GeoTest1.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:MobileApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.GeoTest1Home">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
    </s:MobileApplication>
    GeoTest1Home.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Home"
            creationComplete="view1_creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import flash.sensors.Geolocation;
                import mx.events.FlexEvent;
                private var g:Geolocation;
                protected function view1_creationCompleteHandler(event:FlexEvent):void
                    if( Geolocation.isSupported )
                        g = new Geolocation();
                        g.setRequestedUpdateInterval(100);
                        if( g.muted )
                            // Don't do anything if device's sensor is muted.
                            msg.text = "geo muted";
                            return;
                        msg.text = "geo active";
                        g.addEventListener(GeolocationEvent.UPDATE,geoLocation_UpdateHandler, false,0,true);
                protected function geoLocation_UpdateHandler(event:Event):void
                    msg.text += "\ngeolocation updated";
            ]]>
        </fx:Script>
        <s:Label id="msg" text="foo"/>
    </s:View>
    GeoTest1-app.xml
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/2.6">
         <id>GeoTest1</id>
         <filename>GeoTest1</filename>
         <name>GeoTest1</name>
         <versionNumber>1.0.0</versionNumber>
         <initialWindow>
              <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
         </initialWindow>
         <android>
              <manifestAdditions>
              <![CDATA[
                   <manifest android:installLocation="auto">
                        <uses-permission android:name="android.permission.INTERNET"/>
                        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
                        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
                        <uses-configuration android:reqFiveWayNav="true"/>
                        <supports-screens android:normalScreens="true"/>
                        <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
                        <application android:enabled="true">
                             <activity android:excludeFromRecents="false">
                                  <intent-filter>
                                       <action android:name="android.intent.action.MAIN"/>
                                       <category android:name="android.intent.category.LAUNCHER"/>
                                  </intent-filter>
                             </activity>
                        </application>
                   </manifest>
              ]]>
              </manifestAdditions>
         </android>
    </application>
    Please try the above and see if it works.
    -- Tom
    Flex SDK engineer

  • Example CODE to show information on URLs

    import java.awt.Dimension;
    import javax.swing.JOptionPane;
    import javax.swing.JEditorPane;
    import javax.swing.JScrollPane;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.Date;
    import java.util.Iterator;
    /** Accepts an URL and dumps information relevant to it.
    Does not attempt to display the actual content.
    Note the response codes carefully.
    E.G. If an URL's has a response code of '403 Forbidden',
    this means the URL is not allowed, either for general
    browsing, or more specifically, to connections that
    identify themselves as 'bot'.
    For more information on response codes, see
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    @version 1.0 2006/12/06 */
    public class ShowHeaders {
      public static void main(String[] args) {
        String address = null;
        if (args.length==0) {
          address = JOptionPane.showInputDialog(
            null,
            "Show information for which URL?");
        } else {
          address = args[0];
        JEditorPane jep =  new JEditorPane();
        try {
          URL url = new URL(address);
          URLConnection urlc = url.openConnection();
          urlc.setRequestProperty("user-agent", "bot");
          StringBuffer sb = new StringBuffer();
          // show the URL/address
          sb.append( "URL: \t" + url  );
          /** Show the reported content-type.
          Some common content types..
          HTML - text/html
          JNLP - application/x-java-jnlp-file
          ZIP  - application/zip */
          sb.append( "\n\ncontent-type: \t" +
            urlc.getContentType()  );
          // display dates..
          sb.append( "\n\nDate: \t" +
            new Date(urlc.getDate())  );
          sb.append( "\nExpires: \t" +
            new Date(urlc.getExpiration())  );
          // display user interaction params.
          sb.append( "\n\nAllow User Interaction: \t" +
            urlc.getAllowUserInteraction()  );
          sb.append( "\nDefault Allow Interaction: \t" +
            urlc.getDefaultAllowUserInteraction()  );
          /** add the encoding and length
          (often not available) */
          sb.append( "\n\nEncoding: \t" +
            urlc.getContentEncoding()  );
          sb.append( "\nLength: \t" +
            urlc.getContentLength()  );
          // dump the header fields
          sb.append( "\n\nHeader Fields:" );
          Iterator it = urlc.getHeaderFields().
            values().iterator();
          while ( it.hasNext() ) {
            sb.append("\n" + it.next());
          jep.setText( sb.toString() );
        } catch(Exception e) {
          // tell the user what went wrong
          jep.setText( "URL: \t'" + address + "'\n\n" +
            e.toString() );
        JScrollPane jsp = new JScrollPane(jep);
        jsp.setPreferredSize(new Dimension(500,300));
        JOptionPane.showMessageDialog(
          null,
          jsp,
          "Information on the URL",
          JOptionPane.INFORMATION_MESSAGE);
    }Example useage;C:\showheader>javac ShowHeaders.java
    C:\showheader>java ShowHeaders http://www.physci.org/pc/jtest.jnlp
    C:\showheader>java ShowHeaders http://java.sun.com/
    C:\showheader>rem: prompt user for an URL
    C:\showheader>java ShowHeadersHTH (anybody)

    Yes. My apologies for forgetting to mention, it
    is just example code that others may find useful.
    I like to have 'copies' of any handy little utils,
    'stewn about the place' as well, in case I need
    them while away from my PC.
    ..Or to link to them for the benefit of others.
    "check the content type with the code shown here.."
    This is one way to get a (pretty!) version of it.. ;-)

  • Validator isn't fired when using example code from chapter 40: Validating Data

    When following example code, mentioned in the Flex Developer
    Guide on page 1282 is copied into an mxml example application and I
    run the application, validation is never fired.
    When I have a look at other example code, which is using the
    listener- and trigger-property on the validator everything works
    fine.
    Could you explain why the example code from the Dev-guide
    doesn't work as mentioned in the guide?

    Nathalie,
    I believe you need to specify the "trigger" and "listener"
    properties as well. For more information, see the last example on
    this page:
    http://livedocs.adobe.com/flex/201/html/validators_093_04.html

  • VISA or IVI drivers, example code?

    Hello,
    I have an Agilent DSO-X-2004A oscilloscope and I've downloaded two different set's of drivers that work. Here are the links to the drivers.
    http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=9E84674573AF6AB8E0440021287E6A...
    http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=A661BD7B892F06B2E0440021287E6A...
    The first one is the Agilent 2000 3000 4000 X-Series drivers, that require only NI VISA-4.6
    The second is the Agilent agx2k3k Oscilloscope drivers, that require NI VISA-4.6 or IVI Compliance 4.3
    The second one has example codes, which are VERY helpful for me since I am new to LabVIEW. The first one does not have examples, but seems to have more thorough driver library with more scope options to set. Without the examples though, I will have a tough time. Can I find examples for those drivers somewhere?
    When mixing blocks from different drivers, I get broken wires with the message "source is IVI session of class, sink is VISA session of class". Maybe if I could resolve that, I could mix the driver blocks.
    Thanks
    John

    The answer is that both driver sets have example code in their .zip files. The first one (Agilent 2000 3000 X-Series) just didn't have the examples show up in the Instrument I/O palet, and the other one (agx2k3k) did. You can add the examples to the palet by following the instructions here:
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/merging_vis_on_palette/
    The question of which set to use is still open. The Agilent 2000 3000 X-Series drivers are "Certified LabVIEW Plug and Play (project-style) Instrument Drivers", and the agx2k3k dirvers are "Certified Multi-Enviornment IVI Instrument Drivers"
    For a new user like myself, it's very hard to know the differences and how they may effect me down the road. Hopefully someone with more experience can chime in. 
    - John

  • Error 200428 in linux example code

    Hi All;
    I'm trying to use the mx daq-base on a redhat 9.0 system. I have a 6031E installed(pci). I've installed the hardware, then the software and compiled the example code. When I try to run the writeDigPort example I get;
    Device indentifier is invalid.
    DAQmxBase Error: -200428
    lsdaq reports:
    NI 603E: "Dev2" (PXIO::16::0)
    Nay ideas?
    Pat

    After further looking into the problem I'm getting an error -200220
    here is the suspect code
    char chan[] = "dev1/port0:1";
    error1= DAQmxBaseCreateDOChan(taskHandle,chan,"",DAQmx_Val​_ChanForAllLines);
    DAQmxBaseGetExtendedErrorInfo (errBuff, 2048);
    printf("\nDAQmxBaseCreateDOChan returned %d %s",error1,errBuff);
    This gives the following output
    DAQmxBaseCreateTask returned 0
    DAQmxBaseCreateDOChan returned -200220 Device identifier is invalid.
    Data to write: 0x55
    DAQmxBaseGetExtendedErrorInfo returned -200428 Value passed to the Task/Channels In control is invalid.
    Anyone have any idea?
    Pat

  • Help with NI-DAQ Example Code

    Hi. I've just started working with the NI ISB-6211. This is the first ACD i've ever used, so i'm farily new to this. I have quite a bit of knowledge in programming. After searching through the installation files I found some example C Code that runs in the command prompt. I've modified one quite a bit to get it to do what I want. My question is...
    Now, i'm having some issues. I'm trying to get it to print a voltage reading into the command prompt. I've hooked it all up and i've used labview to make sure everything is working as it should (Which it does!). When I compile the C program and run it, instead of returning a voltage it just aquires points, and I really have no idea what these "points" are.
    Here is the main part of the example code:
    DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,1.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));
    // DAQmx Start Code
    DAQmxErrChk (DAQmxStartTask(taskHandle));
    // DAQmx Read Code
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,1000,10.0,DAQmx_Val_GroupByChannel,data,1000,&read,NULL));
    printf("Acquired %d points\n",read);
    Error:
     And then it just moves down to the exit clause. Is there any documentation anywhere which tells me which DAQ command I need to use to print a continuously updating voltage read out? (Just as a decimal, like 5.21V for example).
    Thank you all
    John
    Solved!
    Go to Solution.

    John,
    The data acquired by DAQmx is written into the array called 'data'.  The number of points DAQmx wrote into this array is stored in the variable 'read' which was passed in by reference.  To print the values returned, you'd need to loop over the 'data' array, and print each value.  See this help topic for an explanation of DAQmxReadAnalogF64.
    Dan

Maybe you are looking for

  • Mac Mini Mid 2011 General system slowdown when transferring files?

    Hi i have a stock mac mini mid 2011, 2.5ghz i5, 4gb ram, 500gb HDD os 10.7.1 and i've noticed a general system slowdown when transferring files on 10.7 and the last 10.7.1 update ( from usb to hdd, another computer on my local network to the mini, ex

  • Email/print in status "Not processed" when RFQ is published

    Hello, We are running SRM 5.0. We have set up the event schema for BUS2200 (RFQ) to react on events: PUBLISHED, PUBLISHED_AGAIN etc. And assigned the event schema to RFQ's transaction types, eg BID. However, when an RFQ is published, the email is not

  • HS link from Oracle 9.2 to MySQL under Solaris 8

    Solaris 8 ( 64 bit ) Recent versions of MySQL are dynamically linked ( i think) and as such the Shared Object / driver mentioned in the HS installation details isn't there after you've installed MySQL onto your machine. So how then do you get libodbc

  • Reversal Process For Imported Procure to Pay Cycle

    Dear Friends, Whats the procedure to reverse imported purchase process with custom duty involvement.I am facing issues while reversing part-1 of excise register Regards Vivek Edited by: Supergene on Dec 29, 2009 2:58 PM

  • How to Transport Workflow Development to another client in the same system

    Hi , I have created a Workflow in DEV 010 Client. But I have all the test data in DEV 020 Client. Please let me know how to transport this workflow development from DEV 010 to DEV 020. Immediate response will be highly appreciated. Thank you, Best Re