Looping Problems with GetURL

I'm pretty much a newbie and due to my limited skills I've
hit a
roadblock.
Having problems with the "get url" function in the flash
movie I've
created. After the movie has run through, I want it to go to
a new "url" and I'm using
the "geturl" action. However the movie just loops.
Here's the Action Script Window
//Movieclip GotoAndStop Behavior
this.gotoAndStop("150");
getURL("
http://www.freddyvmusic.com/live");
//End Behavior
I'm getting this error message
"1180: Call to a possibly undefined method getURL. "

it 'seems' like you are using a AS3 file here - due to the
error message syntax. under AS3 the getURL method no longer is
used. also, you should most likely just be using a stop(); method
on the last frame rather than the gotoAndStop(150); call. under AS3
- we use the navigateToURL method, as in the following:
navigateToURL(new URLRequest('
http://www.freddyvmusic.com/live'));

Similar Messages

  • WHERE clause in a SMARTFORM loop, problems with parenthesis

    Hi all gurus,
    a simple question: I'm coding a LOOP in the form builder for a smartform ... this simple loop should bind text elements to every position of a purchase order. The WHERE clause should be as follows:
    WHERE GUID = WA_ITEM-GUID
    AND ( TDID EQ 'ZDES' OR TDID EQ 'ZDST' ).
    Anyway, in the Form Builder I didn't find a way to add parenthesis; I workarounded the problem with the following query:
    (conditions in lines are in AND conjunction)
    GUID EQ     WA_ITEM-GUID
    TDID      EQ   'ZDES'
    OR
    GUID EQ     WA_ITEM-GUID                                                                               
    TDID      EQ 'ZDST'.
    It's quite a 'bad' way, but it works. I wonder if there's a way to express "complex" WHERE clauses (with addiction of parenthesis) in Form Builder.
    Thanks in advance

    In this case, your solution is the one that works. However in more complex cases with more variables, this can proove difficult to make or mantain.
    What I usually do is use the first part of the condition in the where and then add a condition to the printing area with the rest of the formula. Just remember to document this so that you'll find it easy and it's way more amintainable.
    In this case the loop would contain WHERE GUID = WA_ITEM-GUID and the inside condition TDID EQ 'ZDES' OR TDID EQ 'ZDST. This creates the and between the two blocks.

  • Looping Problem with External Files

    This is what I'm trying to build: A swf file (called main)
    that loads 4 external swf files (called intro, one, two, and
    three). At the start, main.swf loads the intro.swf, and it plays
    once. When intro is done, main loads and plays one.swf. This will
    loop until the user hits one of the buttons, and then two or three
    starts playing.
    What I have done already: Coded buttons. Code works.
    What I am having a problem: I want intro.swf to play just
    once, but it keeps looping. It's supposed to play once, and then
    one.swf is supposed to start looping. Is there anyway to tell intro
    to loop just once? (What I've tried already: a stop() function at
    the end of intro.swf clip, publishing intro.swf with 'no loops'
    setting.)
    (Talk slowly; I have almost no idea how to code in
    flash.)

    Edit: Really? No problem? Weird.. I find that all of the
    imported swf files loop infinitely, unless a stop() or
    unloadmovie() function is called, but then I need another button.
    Anyway, I found a workaround, that seems really obvious (in
    hindsight): I just copied the Introduction file into a new scene in
    the Main file. (Algorithm: Preloader, skip to Introduction scene,
    skip back to main scene. External swf files load, depending on what
    button the user clicks on.)
    Even though it's sorted already, I'd still hear what code you
    use. (It might be simplier than what I did.)

  • Restore loop problems with OS 3.1.1 upgrade failure

    Hi all,
    A possible solution to anyone with a 1G iPod Touch who has found that after upgrading to 3.1.1 it fails then gets stuck in a restore loop displaying the graphic "Connect to iTunes" and the dialogue box in iTunes prompting to restore iPod.
    So this is what happened:
    I was running iTunes 8.2.1.6 and was prompted to download and update my iPod Touch to 3.1.1 - so I downloaded it and later decided to apply the OS 3.1.1 upgrade as 3.0 was sluggish.
    Part way through it failed - I think the error was id 6 but I sent the report off to Apple in the hope it would prompt a fix. Looking through the logs around the time I found:
    2009-09-12 20:01:36.003 iTunes.exe[5500:13c0]: device returned AMR error 6
    2009-09-12 20:01:40.916 iTunes.exe[5500:1578]: iTunes: Restore error 6
    Now I was stuck in a restore loop with the graphic on the iPod saying "connect to iTunes" and iTunes saying I needed to restore! Very frustrating!!! I rebooted my PC, upgraded to iTunes 9 but still the same problem on each attempt.
    I tried various (non-software download) options to get the iPod out of this mode as found on Youtube but no joy so I decided to give in for the night.
    Then today I decided to have one more go - it failed but I then thought of disabling "Zonealarm" firewall and retried the restore (be careful if you do this as your PC will not be protected - please do not do this outside of a trusted network)! This time it looked like it had failed again as the Connect to iTunes came back after the restore but a few seconds later the iPod bleeped twice and I was out of the restore loop! I then decided to restore the previous backup and it appears to be OK again!!!
    As it recovered the apps I did see a few errors "The iPod 'my ipod' cannot be synced. The required file cannot be found" and the app icons would not work but a restart and another sync seems to have resolved the issue. I am now syncing all my music/video... lets hope this doesn't break it!
    I really hope this helps anyone else in the same situation - Apple have really messed up on this one especially for any iPhone customers who perhaps cannot make phone calls! Apple should put some thorough checks in to these upgrades to avoid such errors or at least acknowledge the problem quickly and offer a workaround on the front-page of apple.com and on this forum.
    Best regards
    Ian

    THANK YOU - I was pulling my hair out trying to get this to restore.

  • Is there a phone number to call Adobe.  I go around an endless loop pressing their contact info tabs?  Maybe someone at this sight can help. I am new to digital photo - I have been a B&W film photographer for many years. I have a problem with a Macbook Ai

    Is there a phone number to call Adobe.  I go around an endless loop pressing their contact info tabs?  Maybe someone at this sight can help. I am new to digital photo - I have been a B&W film photographer for many years. I have a problem with a Macbook Air.  It was working fine - I was using LR and a message came on the screen that said something like the memory was dangerously low.  I stopped and tried to delete LR files.  I couldn't do it.  I closed the program and tried reopening and got the message that there is not enough memory available to open LR.  I contacted Apple.  They spent a half hour on the phone with me and eventually told me they didn't know how to help. The tech said that LR had gobbled up all the memory and said I should contact Adobe and ask where and how my photo files are stored and to delete them.  I have several back-ups.  Thanks - Arthur

    This sort of error message only comes up for Lightroom when your hard disk is full. Indeed this has nothing to do with internal memory as that will be intelligently be dealt with. If you have a mac Book Air that is not so surprising as the cheapest versions come with very small hard disks and if you shoot raw with any recent camera, you'll fill up your hard disk very quickly and you can probably only store a few months of pictures if you are a typical photographer. So the bottom line is that you need to create some room on your hard disk. You should move some of your originals to an external hard disk. You can also delete some of your backup copies of your catalog file that Lightroom automatically generates every few days and that quickly gobble up hard disk space. So first figure out how full your hard disk is. To see that, go to the apple menu, hit -> About this Mac -> More info->Storage. You should see your internal hard disk on top and you'll find that it is almost entirely full with photos. Now find your Lightroom catalog file using Finder. It is usually in a folder in the Pictures folder in your home directory. You should see a Lightroom 5 Catalog.lrcat file, a previews file and a folder called backups. Inside the backups folder, you'll find a lot of subfolders. They have names that show the dates the backups were created. If you have backups of your entire hard disk, you can delete these backups when they are older than a few months. I usually only keep the last 4 around. Just drag the folders into the trash can on the dock on the bottom of your screen and empty the trash. This will probably free up enough space that Lightroom will already run again. Now start thinking about where you will want to store older images. If you have a good USB3 or Thunderbolt hard disk that is probably the best option. There is a video here by Adobe that has some instructions on how to do this: Is Your Hard Drive Full? Here’s How to Move Images to Another Drive in Lightroom. « Julieanne Kost's Blog If that doesn't work because you don't have enough hard drive space to run Lightroom yet, here is another set of instructions to move your files using the finder to the other hard disk: How do I move only my photos to another hard drive, leaving the catalog where it is? - The Lightroom Queen. If you follow that, as soon as you confirm all your images are on the new hard disk, you can delete them from your internal one. She is not so clear about that part but if you don't delete the originals that you moved off you don't free up space. You should move the folder structure over to the new hard disk and then reconnect the folders in Lightroom. That should make it refind all your images.
    That said, if you are uncomfortable with the computer in itself, your best bet is to find a local photography club. There is invariably a Lightroom savvy person in there that could help you move your files. That might be your best bet if you are uncomfortable moving these yourself. A general mac savvy person like you would find at an Apple store or so generally will not be able to help you with this except when they are photographers themselves and know Lightroom. You might get lucky with that.

  • Problem with java swing button and loop

    Problem with java swing button and loop
    I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
    I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
    When I click on start button it must do next:
    Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
    And when I click on stop button it must do next:
    Start button must set enabled and selected and Stop button must set disenabled.
    Field status is set to 0.
    This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
    There is java code, so you can get better picture:
    /** start button */
    public void gStart_ActionEvents() {
    try {
    ivjGStart.setEnabled(false);
    ivjGStop.setEnabled(true);
    ivjGStop.setSelected(true);
    getJTextPane1().setText("Program is running ...");
    Status = 1;
    } catch (Exception e) {}
    /** stop button */
    public void gStop_ActionEvents() {
    try {
    ivjGStart.setEnabled(true);
    ivjGStart.setSelected(true);
    ivjGStop.setEnabled(false);
    getJTextPane1().setText("Program is NOT running ...");
    Status = 0;
    } catch (Exception e) {
    /** procedure IzvajajNeprekinjeno() */
    public void IzvajajNeprekinjeno() {  //RunLoop
    try {
    int zamik = 2000; //delay
    do {
    Thread.sleep(zamik);
    PreberiDat(); //procedure
    } while (Status == 1);
    } catch (Exception e) {
    So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
    Any help will be appreciated.
    Best regards,
    Tomi

    This is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
    Since java is task-based this will happen if you do like this:
    1. Button "Start" is pressed. Thread running: GUI_Thread
    2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
    3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
    4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
    5. Call PreberiDat(). Thread running: GUI_Thread
    6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
    Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
    What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    This tutorial explains how to build a multi threaded gui.
    /Lime

  • Problem with ResultSet in a loop

    hi,
    i have a probleme with ResultSet when, my code is bellow
    ResultSet rs = stmt.executeQuery(sql);
    sql="SELECT NAME FROM prestationtemp";
    rs = stmt.executeQuery(sql);
    String sqlDel="";
    while (rs.next())
    sqlDel="Delete from prestation where NAME="+rs.getString("NAME");
    stmt.executeQuery(sqlDel);
    the problem is that the loop iterate just once like if there is just one record, and if I remove stmt.executeQuery(sqlDel); from the loop it iterate normaly.
    thanks in advance.

    you will need to use 2 Statments e.g.
    Statement stmt1 = connection.createStatement();
    Statement stmt2 = connection.createStatement();
    ResultSet rs = stmt.executeQuery(sql);
    sql="SELECT NAME FROM prestationtemp";
    rs = stmt1.executeQuery(sql);
    String sqlDel="";
    while (rs.next())
    sqlDel="Delete from prestation where NAME="+rs.getString("NAME");
    stmt2.executeQuery(sqlDel);
    } When you reuse a Statement, any resultsets previously created are automatically closed.
    Looking at your code, it seems that you only need 1 SQL call:
    Delete from prestation where NAME in (SELECT NAME FROM prestationtemp)
    Much more efficient!

  • Problem with non-stop looping

    This file has been supposedly changed from As2 to As3. It seems as if it used to stop when I first got it. But the links didn't work. When I followed troubleshooting protocols, it started looping non-stop.
    Please help. I can't seem to attach the flv and the action script files. All I get from the output window is "Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts."
    Please help. I paid a coder to switch the file from as2 to as3 and this is what he gave me...

    contact that coder and let them know the problem.  if it's a problem with their code, they should fix it without charge.

  • Qsm pc, problem with stop loop

    Hello,
    i tested queue producer/consument with event case, but i have problem with stop the both loop, can you help me with attachment ?
    Attachments:
    queue_mereni_1.zip ‏46 KB
    Global_queue.zip ‏3 KB

    thanks for your answer,
    i had problem with upload *.vi (some mistake), so when a upload *.zip it was ok, but i do not know why..
    please, when i put time out constatn, so when i push "stop" then both loops end - it is ok BUT:
    when i push "stop 2" button (for the second loop) so there is error (in attachment), please do you know why?
    i am sorry for a lot of questions but i try understand it..
    thank you
    Attachments:
    qsm.jpg ‏31 KB

  • Problem with looping logic

    Hello all,
    Ok reposted using code tags, sorry about that.
    I'm trying to write some code to take in a 2D int array, loop through the array to identify where certain blocks of numbers begin and record that location so that I an jump straight to it at a later time. The number blocks go up iteratively from a point from 0 to 9 and are surrounded by nodata values(-9999).
    The problem is that when I print out the numbers they are only being recognised up to 6 (7th number) and when I check the locations against the original text file they dont match. I think it's just a problem with my logic but I'm not sure why.
    The text file is converted to ints and placed in an array from a buffered file reader in a seperate class. I can put this up if needed.
    Any help would be much appreciated.
    Thanks.
    Duncan
    *  Class imports text file which contains a collection of values, either nodata(-9999) or a location
    *  represented by numbers moving away from a point; 0 closest then 1, then 2 etc.
    *  records the first location of each number to avoid having to loop through the whole file each time.
    *  i.e. can later jump straight to the first recorded location of each number.
    *  In current text file there are 10 numbers(0 - 9) but for some reason it stops finding them after
    *  6(seventh no.) and having checked the location values against the original text file these are wrong
    *  by a fair way as well.
    import java.io.*;
    //import java.awt.*;
    //import java.awt.event.*;
    public class Hydrograph {
         int width = 0;
         int height = 0;
         int dZeroC, dZeroD = 0;
         int dOneC, dOneD = 0;
         int dTwoC, dTwoD = 0;
         int dThreeC, dThreeD = 0;
         int dFourC, dFourD = 0;
         int dFiveC, dFiveD = 0;
         int dSixC, dSixD = 0;
         int dSevenC, dSevenD = 0;
         int dEightC, dEightD = 0;
         int dNineC, dNineD = 0;
         public Hydrograph() {
              /* Ignore this bit it's being used for something else
              //File file = new File("c:/Users/Duncan/Documents/MODULES/MSc Dissertation/Code/A1.txt");
              //File file = new File("M:/java/code/A1.txt");
              ArrayRead ar = null;
              ar = new ArrayRead(file);
              int rows = ar.getRows();
              int columns = ar.getColumns();
              int steps = ar.getSteps();
              int[][][] threeDIntArray = ar.getThreeDIntArray();
              // Creates a new instance of delay class which takes in a text file and converts
              // it to int form, placing it into a 2D int array.
              Delay dLay = null;
              dLay = new Delay();
              width = dLay.getWidth();
              height = dLay.getHeight();
              int[][] twoDDelayFile = dLay.getTwoDintArray();
              int delayCount = 0;
              // Loops through 2D int array to identify when number first equals 0, then passes
              // the height and width values to storeDelayPos method below. Then finds for 1, 2
              // 3, 4,...etc by adding 1 to delayCount.
              System.out.println(" ");
              for (int a=0; a<width; a++) {
                   for (int b=0; b<height; b++) {
                        if (twoDDelayFile[a] == delayCount) {
                             int c, d = 0;
                             c = a;
                             d = b;
                             storeDelayPos(c, d, delayCount);
                             System.out.println(delayCount);
                             delayCount++;
                             break;
                   //System.out.println(" ");
              System.out.println(" ");
              System.out.print(dZeroC + " " + dZeroD);
              System.out.println(" ");
              System.out.print(dOneC + " " + dOneD);
              System.out.println(" ");
              System.out.print(dTwoC + " " + dTwoD);
              System.out.println(" ");
              System.out.print(dThreeC + " " + dThreeD);
              System.out.println(" ");
              System.out.print(dFourC + " " + dFourD);
              System.out.println(" ");
              System.out.print(dFiveC + " " + dFiveD);
              System.out.println(" ");
              System.out.print(dSixC + " " + dSixD);
              System.out.println(" ");
              System.out.print(dSevenC + " " + dSevenD);
         // Takes in width, height and delayCount value and sets variables according to
         // the value of delayCount.
         void storeDelayPos (int setC, int setD, int setDCount) {
              int dCount = 0;
              dCount = setDCount;
              switch(dCount) {
                   case 0:
                        dZeroC = setC;
                        dZeroD = setD;
                        break;
                   case 1:
                        dOneC = setC;
                        dOneD = setD;
                        break;
                   case 2:
                        dTwoC = setC;
                        dTwoD = setD;
                        break;
                   case 3:
                        dThreeC = setC;
                        dThreeD = setD;
                        break;
                   case 4:
                        dFourC = setC;
                        dFourD = setD;
                        break;
                   case 5:
                        dFiveC = setC;
                        dFiveD = setD;
                        break;
                   case 6:
                        dSixC = setC;
                        dSixD = setD;
                        break;
                   case 7:
                        dSevenC = setC;
                        dSevenD = setD;
                        break;
                   case 8:
                        dEightC = setC;
                        dEightD = setD;
                        break;
                   case 9:
                        dNineC = setC;
                        dNineD = setD;
                        break;
                   default:
                        System.out.println("OUT OF BOUNDS");
                        break;
         public static void main (String args[]) {
         new Hydrograph();

    Hi,
    I am working on a hydrograph program in java as well... I am trying to represent rainfall data. Do you think that you could share some of the code that you came up with, so that I don't have to go through the whole process.
    thank you so much,
    Kevin

  • Basic Snow Leopard install with special customization:  setup assistant infinite loop problem.

    Hi, all,
    Based on this post: https://discussions.apple.com/thread/1395118?start=0&tstart=0, I'm assuming there's a problem with setup assistant running after a customization install reboot.  But I could be wrong.
    Here are the details:
    MacBook Pro
    Clean OS X Snow Leopard install (I was "told" by IT I had to wipe the disk and re-install OS X after backing up personal files).
    Installed extras I need/want (in particular, XCode, though I went ahead with the other optional software as well).
    Installed the IT supplied "Supplemental CompanyName Installation Disc" (also referred to as "CompanyName Supplemental Installation Disc" ), which is supposed to create a customized, IT supported, setup.
    When the supplemental install is done, the system is rebooted.
    There is then a "Welcome" screen (starscape, with almost endless bombardment of the word welcome in various languages), finally followed by:
    a) select language; b) select keyboard; c) select timezone; d) Don't forget to register your Mac, with a "done" button.
    Clicking the "done" button goes to a blank grey screen. and then loops back to redo the "Welcome/language/keyboard/done" sequence, ad nauseum (that is, infinitely repeated).
    Per the above mentioned post, I have rebooted to the Install DVD and run disk utility, repairing permissions.  No difference on reboot.
    Boot to safe mode goes to the same setup assistant sequence, not a login screen.
    Another Mac user here suggested checking for /var/db/.applesetupdone, since missing it, or if it's correupt, could cause this problem.
    So I booted to single user and checked for this file.  It is not there.  On the off chance the file is a simple flag and the content doesn't matter,
    I did fsck/remount and touch /var/db/.applesetupdone but this did not change anything either.
    Presumably, the file must be present and must contain some data.  If this is true, can it be created manually and put in place via single user mode?
    Or are there other, better solutions someone could suggest?
    Many thanks.
    Bob

    Ah, it seems I finally found something useful, at http://hintsforums.macworld.com/showthread.php?t=84825
    One of the responders supplied the content of their .applesetupdone file.
    I was able to get this onto my Mac, in /var/db, as .applesetupdone (just to be safe, I linked that name to .AppleSetupDone, the name as mentioned on the above site).  Note that both names begin with a dot (hidden, in UNIX parlance).
    On reboot I was presented with the CompanyName specific login screen.  It took a little bit more mucking around with passwords, but I was eventually able to login without any problem.
    Bob

  • Problem with SWF export and audio looping

    When I export from Keynote into SWF, I get an odd audio looping problem when playing the SWF files. Here's the workflow:
    Create Keynote presentation (includes transitions typically, but also happens with presentations that don't).
    Record audio using Audacity, convert using iTunes to MP3 in order to be able to export from Keynote to Flash (Keynote can't export WAV files).
    Drop in MP3s onto slides. Sync up my transitions with audio.
    Export Keynote file to SWF, including the audio.
    Play SWF file either directly using Safari or when posted using Firefox. Audio plays, but a certain length into the audio the audio file seems to re-initiate and play over itself.
    Anybody seen this? Anyone know how to solve it?
    This is pretty critical for us (work related). We are using Keynote to create educational content SWF files, and we only discovered this problem after release.
    Thanks for your help!
    Michael

    The helper class using IText:
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import com.lowagie.text.Document;
    import com.lowagie.text.DocumentException;
    import com.lowagie.text.pdf.PdfContentByte;
    import com.lowagie.text.pdf.PdfImportedPage;
    import com.lowagie.text.pdf.PdfReader;
    import com.lowagie.text.pdf.PdfWriter;
    public class PDFHealer
       public static InputStream heal(InputStream in) throws DocumentException, IOException
          try
             ByteArrayOutputStream out = new ByteArrayOutputStream();
             PdfReader reader = new PdfReader(in);
             // we retrieve the total number of pages
             int n = reader.getNumberOfPages();
             // step 1: creation of a document-object
             Document document = new Document();
             // step 2: we create a writer that listens to the document
             PdfWriter writer = PdfWriter.getInstance(document, out);
             // step 3: we open the document
             document.open();
             // step 4: we add content
             PdfContentByte cb = writer.getDirectContent();
             int i = 0;
             while( i < n )
                document.newPage();
                i++;
                PdfImportedPage page1 = writer.getImportedPage(reader, i);
                cb.addTemplate(page1, 0, 0);
             // step 5: we close the document
             document.close();
             ByteArrayInputStream ret = new ByteArrayInputStream(out.toByteArray());
             out.close();
             return ret;
          finally
             in.close();

  • Problem with two parallel While loops

    I have a serious problem with controlling two parallel While Loop. Here is the deal:
    I have written a VI to send a series of commands called Cycle through Serial Port to a custom hardware. One of these commands is setting motor pressure by sending it's command and changing it's voltage. After setting desired pressure I have to read and control motor pressure, again through serial port in a parallel loop. There is a Pressure Sensor in system and I can obtain current's motor pressure by sending a command and receiving pressure value. In the first While loop I send some commands to hardware including Pressure Setting Command trough a state machine. In the second While Loop I read pressure value and then decide to increase motor voltage or decrease  it. Now the problem is in communicating these two loops. In cycle after "Init" state when state reaches "Pressure 2 Bar" motor voltage will increase. Meanwhile I have to control this voltage in parallel While Loop. As you can see I used Local Variable to communicate between these two loops. The problem is that loops are not synchronized. Specially when I switch to "Pressure 3.8 Bar" state during cycle running control loop (second while) is still working based on "Pressure 2 Bar" state not 3.8 bar. Because of this motor pressure goes to 3.8 bar for a sec (becuase of  "Pressure 3.8 Bar" state) and comes back to 2 bar (because the second while still has not gotten that new state,most probably cause of all the delays in the loop)  and after couple seconds it goes back to 3.8 bar.
    I really don’t know what to do. Is there a way to fix this? Or I should consider a better way to do this?
    I went through Occurrence Palette but couldnt figure out how to embed that in the VI. 
    Sorry for my poor English. I attached VI and it's subVIs as a LLB file. I can explain more details if somebody wants. 
    Attachments:
    QuickStartCycle.llb ‏197 KB

    I make it a point to NEVER have a WAIT function inside a state machine.
    It sort of defeats the purpose, which I define as "Examine current state; decide whether you've met the conditions to advance to another state, then get out".
    For example, I have a single state machine VI controlling four identical instruments, via TCP connections.
    For some functions, that means issuing a command, waiting 60 seconds, then reading results.
    If I waited INSIDE the state machine, then it's tied up waiting on one device and cannot handle any others.
    Not a good plan.
    To handle this, I have a loop which calls the state machine.  After issuing the command, the state goes to "Waiting on Response", and there is a target time of 60 seconds from now.
    It's called over and over in that state, and each time merely compares NOW to the target time.  If NOW is past the target, then we read the results.
    the state machine can tell the caller when to call back; that's how I distinguish between an urgent need and nothing-to-do.
    By having the CALLER do the waiting, instead of the state machine itself, the state machine is free to handle another device, or do something else on the same device.
    You should be calling the state machine over and over and over anyway.  So, have the state machine "control the pressure" on every call, and THEN examine whatever state it's in.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Geturl problem with ie

    hi,
    i'm facing a problem with the geturl function when
    downloading a doc or ppt file in a new window using the script
    getURL("www.mysite.com/test.doc","_blank"). This prompts to open a
    new browser but displays an error
    Action canceled nternet Explorer was unable to link to the Web
    page you requested. The page might be temporarily unavailable.
    but when i refresh this page the file loads properly.
    can anyone help me in this issue, as this is very critical
    for my project and i don't want my delivery to get postponed due to
    this simple issue.
    Thanks,
    Shajahan

    hi,
    there are two alrternatives for this. the first one is use
    javascript to open a new window,
    eg :
    getURL ("javascript:NewWindow=window.open('
    http://www.ignitemediahosting.com/csp/Document/ConvenienceChannelOTPOverview.ppt','newWin' ,'left=0,top=0,toolbar=yes,location=yes,scrollbars=No,status=No');
    NewWindow.focus();void(0);");
    but agan dynamically passing the values to the javascript
    function is the one i'm yet to try.
    The second option is to use loadvars . It worked successfully
    for me. I stored the url value in the loadVar property and send it
    to a php file which loads the page without any problem. I hope this
    solves your problem

  • Problems with looping mp3s without gaps

    I am building an 8 track Flash audio mixer where the sounds for each track are selected by the user from a list component and then loaded into a Sound variable at runtime.  This can be done while the mixer is playing or stopped, and of course, it adds a lot of flexibility for making music.  All actionscript is in external .as files and sounds are looped using the SOUND_COMPLETE event.
    So far, all loading/playing functions work perfect, but I`m having problems with gaps at the beginning/end of my mp3 files.  I was told this was an inherent problem with mp3 files, so I tried using MPTrim to clean the silence up.  I also tried starting the loop a bit late - sound.play(80, 1) - but the results are usually inaccurate and unpredictable.
    When I import a wav file into the library and then export it as an mp3 file embedded in the .swf file, it sitll has a short gap.  When I built a previous mixer in Flash MX (actionscript 1) there was no gap and all sounds looped perfectly!  Of course, in this later case, all sounds were embedded inside movie clips on the stage and scripting was done on the timeline, so maybe that made a difference.
    What is going on with AS3?  I have spent long nights trying to find a solution to this, but to no avail!
    I read a blog where the writer went through all the steps I have and just gave up, but I know there is a solution.  I have seen this sort of thing done on Flash mixer sites before (even sites with full-on audio sequencers) so I know it can be done!
    Is there anything I can do to get around this problem?
    Thanks in advance,
    Matt

    mp3 files can have header info at the start, in addition to dead space at the start and end.  if you're certain you've removed all dead space then you should be able to compensate (reliably) for header info by using the offset parameter in the play() method (after you sound's onLoad() method executes.  but you wouldn't use 80:  that first parameter is in seconds, not milliseconds.

Maybe you are looking for