Long loops

Hi, I'm trying to export a MC to JPG format using PHP. The
procedure calls for a nested loop which reads each pixel and
catenates its color value in an array in order to be sent to PHP.
After the loop runs for a few seconds, I get the "Flash
running slow" message .How can I avoid this and make sure Flash
doesn't think I've entered a neverending loop?
Furthermore, I have a ProgressBar component which measures
the amount of data analyzed. Unfortunately, the ProgressBar doesn't
appear until AFTER the loop has finished running.
I'm used to programming in VB6 where a functions called
DoEvents placed inside a loop allows the language engine to execute
all background procedures and not think I've entered an endless
loop. This also allows for screen and progress refreshes. Is there
something similar in Flash?
Here is my code:

Yeah that doesn't work in Flash. If you could go to AS3 you
could use the byteArray class which would be much faster.
Also I think there are already some AS2 classes out there
that allow you to do this so you might want to search for those
instead of reinventing the wheel so to speak.
If you do need to do this yourself, I would look at breaking
this up into chunks. Have a setInterval that calls your function
and maybe do 5 rows of your image at a time.
Then whent he function is over you update your progress bar
and the timer restarts on the "flash running slow" message.
Also I'm not sure that pushing a bunch of strings onto an
array is the best way to do this. There may be better ways, but I
would experiment a bit to be sure.
Final note, sometimes running a loop backward is faster so
you might want to make your loops like:
for(var a=w-1;a>=0;a--)
It might help. Good luck!

Similar Messages

  • How do I create a 4 second long loop that is repeated for say a minute long on garage band, I'm sure it can done, please help

    How do I create a 4 second long loop that is repeated for say a minute long on garage band, I'm sure it can done, please help, I now own a new mac book.

    Rachel Dalby wrote:
    How do I create a 4 second long loop that is repeated for say a minute long
    drag the top right corner of the region for as long as you want it

  • Menu video no longer loops in DVDSP 4.03?

    I have a demo (last opened 11/29/02 with DVDSP v4.0.2) that has a song as the primary focal point of the main (1st) menu. Song is 2:32:12. The two drop zone video files – one is 11:11 long, the other is 37:08 long – used to loop and start over when they reached their end in the last DVDSP v4.0.2. When the song repeated after it reached its end, the two drop zone video files would reset to their beginning and the cycle would repeat.
    Now, since the 4.0.3 upgrade, the two drop zone video files play only once, then just sit on their last – black – end frame. They do not repeat anymore.
    I checked in the inspector for the menu itself, and it is set to “At End – Loop,” which, of course means that the song will loop when it gets to its end.
    I looked in the prefs to see if there was a new option designation for this situation that used to work fine in 4.0.2, but no longer works in 4.0.3. There was none.
    I reset the asset of the shorter file Contents 2 window to none, then re-drug (re-dragged) the file into the drop zone to see if that would fix the problem. It did not.
    I would hate to have to shorten the menu loop repeat length to the shorter of the two drop zone videos – music repeating from the begging every 11:11 seconds would be extremely annoying.
    Has anyone else seen this or something similar since the 4.0.3 upgrade? Any ideas/suggestions would be greatly appreciated.
    Tone

    It is possible that there is a problem with the file that stores the "Saved Form" data.<br />
    Rename or delete formhistory.sqlite (plus formhistory.sqlite-journal and formhistory.sqlite.corrupt and formhistory.dat, if they exist) in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case there is a problem with the file that stores the "Saved Form" data.<br />
    This will remove all saved form data, so you may want to rename formhistory.sqlite to formhistory.sqlite.sav or move the file to another folder in case you need to recover some saved data.
    You may also need to delete search.sqlite and search.json in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder]

  • Problem in BPM with long loop

    Hi,
    I have "Integration Process" which reads data items from DB table and sends it to webserive.
    Webservice accepts only 1 item of data, so I have loop in bpm interating through every data item and calling webservice.
    The process works fine with no errors, but if number of loop iterations exceeds some number (like 100 or somthing close to that) the process cannot go to "completed" status. It goes through all iterations, sends all data and just hanging in system with status=started. When i'm trying to delete it with SWWL transaction i got dump. I also see same dump from user WF-BATCH occuered exactly the same time the process excpected to go to completed state.
    Error analysis
        Short text of the error message:
        "Exception CX_SY_NO_HANDLER triggered by CL_SWF_XI_INSTANCE============CP in
         line 1 with text: An exception with the type CX_SY_OPEN_SQL_DB occurred, but
         was neither handled locally, nor declared in a RAISING clause"
    Any ideas how to resolve this problem?
    Regards,
    Ilya.
    Edited by: Ilya Karnauhov on Oct 1, 2009 9:29 AM

    hi,
    >>an error code with 99
    check cache refesh and tell me if it gives any error!?
    regards,
    Felix

  • What happens to the while loop iteration counter if it runs unchecked?

    I want to use the iteration counter to initialise a value on the first loop of a while statement. ie i = 0, x = 100. Fine. The application I am building will be left to run for weeks or months on end without stopping (hopefully :¬)). What happens to the iteration counter in this situation? Does it reset to 0 or what? I don't want it reinitialising any values while the loop is running other than when it starts.
    I set up a while loop to try to figure out what happens and the iteration counter stops at 2147483648 which is 2^31 - 1.
    Any help would be appreciated,
    Thanks,
    Niel.

    It might be something you already looked at, but perhaps it's an option to perform the initialization outside (before) the while loop. That way it will be initialized correctly only once, no matter what the iteration counter does.
    Of course if you need the counter for other purposes than initialization you might have the same problem...
    Note that a lot of the timer functions also overflow after a certain time (I believe 24 or 48 days?) so be careful running very long loops (but you already knew that probably).

  • What are the "Add to Loop Library" requirements for creating automatically conforming loops?

    I am trying to create my own loops that conform to the tempo and key of a song. I have made several loops in this way by selecting a region that is exactly 4 bars, for example, and then selecting "Add to Loop Library". If the sample is cut correctly, the "Type:" field is enabled which allows you to make it a Loop and therefore have it automatically conform to the song tempo.
    In the past I have made loops that were very long, up to 128 beats, for the purpose of making mashups using instrumental tracks that I want to conform to the song. I now can't seem to create a large loop but I am not sure why. I know it is possible, but I don't know the steps I took to get there.
    What are the exact requirements that allow a loop to be added to the loop library while also conforming to song key and tempo?

    In the past I have made loops that were very long, up to 128 beats
    The longest loop I managed to save as "Loop" had 55 measures (220 beats, 203 bpm). Longer loops could only be saved as "One shot". And the loop had to be cut at the end, not simply be trimmed by dragging the end of the region. The tempo matters; for a slow song the loop can only have fewer measures.

  • IDVD Burning Freezes When Adding Long Music To Menus?

    Hi, I am having problems burning a DVD - iDVD freezes a few hours into the encoding process and then I have to Force Quit and start again.
    I have previously burned a DVD of my movie successfully, but I then made some changes to the DVD menus etc and tried to reburn without success.
    The only thing I can think of which might have caused an error is changing the Music associated with the menus.
    I now have 2 or 3 minute pieces of music associated with my menus, and the loop times available seem to have been increased to match the length of the music. iDVD seems to accept this on the preview etc.
    Does anyone knnow if there are any issues with this, or any thoughts on what could be causing my problem?
    As I say, I don't get any error messages or anything, the app just seems to freeze (spinning disc stops spinning) and then I have to quit out!
    It's SO frustrating to have to wait around 4 hours each time to get the same issue!
    Thanks
    David

    Hi again guys,
    Still no good news unfortunately, although I ruled out a couple of things.
    It WAS to the disk space on the DVD and not the hard drive the error msg was referring to.
    After messing around with the menu soundtrack with no luck, I finally deleted one of my photo slideshows, and afte that the Burn command ran again.
    It would seem that iDVD in this case has not represented the free DVD space correctly, as although it said 2.6/4.2 GB was taken, it still would throw up the error. Reducing the project size ion my case to about 1.6GB then worked.
    However, the DVD STILL did not burn successfully. I got the dreaded 'freeze' again when encoding the soundtrack. SO it would appear that converting the files to .aiff did not work this time.
    Could it be to do with the length of the music I wanted to include? Does anyone know if there is a limit to how long you should have your menu music playing. Why do commercial DVDs all have short loop music? Is it just because they want to maximise the space for the movie, or is it some kind of physical contrainst that you shouldn't have long loop times for menus?
    And finally, is there any easy way to split my .aiff music files to say just take the first 30 seconds of the track for my DVD? I really don't have any other music suitable for my menus and what comes with iDVD is well, just, awful! Apart from my iTunes collection I have the 5 demo Garageband songs or the default music which comes with the Travel theme (that awful clarinette stuff, I;m sure you know what I mean!).
    Thanks for all the help so far, I am determined to burn my DVD with music other than the awful default stuff!!
    david

  • Wait and loop cycles in Workflow

    We have some order management workflows that have built in wait and loop cycles where the wait time is extremely low. 2 minutes. We have noticed that this (possibly) is causing WF BG process to run extremely long, looping through the same items multiple times in a request. We think that we need to extend those wait times and have the following questions.
    -What are the downsides of using small wait times in WF.
    -What are some recommendations on how small the wait times can be in "polling" logic using workflows.
    Thanks.

    Small wait times are greedy and can kill your performance. I am not sure why you need to check whether the hold on the order is released every 2 mins when the WBG itself runs for more than that amount time (as an example). In fact you run the Validate workflow program (by pressing in the Transaction Type setup in OM, it will tell you the same thing).
    An hour is good enough. You can run one instance of WBG on emergency basis (in the month end or as needed).
    Also you can schedule multiple WBG runs with different parameter combinations.
    Say one only checks the deferred workflows and the other one checks only timedout ones and they run independent and you make the program incompatible to itself so that they will not clash.
    Also a lot depends on you volume of orders that are being processed by your WBG.
    Also it increases your database tables volume as the history tables keep getting populated for every check.
    Thanks
    Nagamohan

  • Updating numerics from a loop

    I have a simple application that runs in a loop some number of times. Inside the loop data needs to be updated to numeric indicators. I can't get the indicators to change. The code that is calling the SetCtrlVal functions is inside a while loop. I'm calling ProccessDrawEvents having a vague memory that it is related.
    Solved!
    Go to Solution.

    I'm seeing a similar issue. A callback function is running a long loop that is sending file data on a serial port. I'm updating a numeric slider (progress indicator) within the loop, and calling ProcessDrawEvents right after the control is updated. In my case, however, adding the call to ProcessDrawEvents did not solve the problem.
    The issue goes away if I run the code from within the LabWindows IDE - everything works fine. However, if I simply launch the executable outside the IDE, the slider updates correctly for maybe 15 or 20 seconds, then the cursor changes to the busy indication, and the control does not update again until all of the data has been sent.
    Any thoughts?

  • Loop swf 3 times and stop

    I was sure that something would be posted here on writing
    action script to make a flash banner loop only 3 times since this
    is a fairly common standard for web banner advertising. I've been
    unable to find this help or to make it work on my own.
    My fla file has 85 frames. I tried adding this action script
    to the 85th frame, but it doesn't seem like the var increases just
    upon reaching frame 85. It's increasing multiple times in it's
    first run from frame 0 to 85. I thought it wouldn't increase until
    it went back to 1 and reached 85 again.
    Cannot seem to get ATTACH CODE to go between paragraphs. This
    is my last paragraph to read after code:
    There must be an easier was to achieve this, but having spent
    2 hours on it and searching online, I cannot figure it out. Do you
    know? Oh, I should probably mention that I started out with this
    Action Script at Frame 1 and that didn't seem to work either.
    Thanks in advance,
    Kristi

    windowswarrior,
    > Working in Flash CS2 so I'm pretty sure it's AS3.
    However,
    > your suggestion doesn't work. It just keeps looping.
    Flash CS3 is the first in the Flash family to include a "CS"
    in the
    name, so you're either working with Flash CS3 (the first to
    support
    ActionScript 3.0) or ... maybe Flash 8? If the letter, then
    you'll have to
    use ActionScript 2.0 or lower. But now that I'm looking at
    this code again,
    the ActionScript 2.0 and 3.0 versions are so similar, it
    really doesn't
    matter in this case.
    Let's assume ActionScript 3.0, and we'll take it step by
    step.
    Bear with me and start a new FLA file, because if we start
    from scratch,
    it's a lot more likely we'll catch what's going wrong where.
    1) Select File > New and choose Flash File (ActionScript
    3.0).
    2) Select frame 1 of the main timeline, open your Actions
    panel, and type
    this:
    var loop:int = 0;
    So far, we're doing nothing more than creating a variable
    (happens to be
    an integer) in frame 1 and setting it to 0. (Previous code
    showed :Number
    instead of :int, and honestly, either one will do. Because
    this number is
    only going to be an integer, :int is technically the better
    choice.)
    3) Add a keyframe to frame 10. Enter the following
    ActionScript in frame
    10:
    loop = loop + 1;
    trace(loop);
    if (loop < 3) {
    this.gotoAndPlay(2);
    } else {
    this.stop();
    At this point, the variable, loop, is incremented by 1. The
    first time
    this happens, its value becomes 1 (because 0 + 1 is, of
    course, 1). Next, a
    trace() function traces the value of loop to the Output
    panel. You'll see
    "1", without quotes, appear in the Output panel when the
    playhead enters
    this frame.
    Next, an if() statement compares the value of loop (which is
    currently
    1) to the number 3. If it's less than 3 -- at this point, it
    is -- the
    playhead is sent back to frame 2. Otherwise, it stops.
    4) Test your movie. In short order, you should see the
    numbers 1, 2, and 3
    appear in the Output panel. After that, nothing else --
    because the
    playhead has stopped at frame 10 and no longer loops.
    Let me know if that happens for you.
    David Stiller
    Contributor, How to Cheat in Adobe Flash CS3
    http://tinyurl.com/2cp6na
    "Luck is the residue of good design."

  • IPod Touch 5th Gen. NECK loop?

    Anybody know if there are any neck loops(or a longer loop/not just for the wrist)being sold/going to be sold for the new touch?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • Slideshow loop after ios8

    After installing ios8 on my ipad2 my slideshow will no longer loop.  Shuffle seems to work.  I tried setting it to not loop and back and also tried changing the transition style with no change to the looping.  The pics I have on the pad show one time through and then goes back to the home screen (not a lock screen).  I'm not running any music with my pics. 
    Is this a known issue?  Can the app be reset without resetting the whole pad?  Any help would be appreciated since slide shows for trade shows is mainly what I use it for.
    Thanks,
    Duane

    You aren't running a Classic operating system.  See where to post here:
    http://discussions.apple.com/docs/DOC-2463

  • Looping a 15 second animation on a DVD

    Hi there,
    Can anyone tell me where the setting is in DVD Studio Pro to request that when it reaches the end of the chapter..it should go back to the beginning and play again. I saw this yesterday..and now I can't find it...aaaaaaaaaaaargh.
    Hope you can help.
    Carol Ann

    Put the footage in the sequence multiple times before outputing and encoding. If you put the 15secs on the timeline loads of times the laser wont have to re-focus all the time. It will appear to loop every 15secs to the user but will actually be a longer loop,
    -Jake

  • Sudden stop possible when a continuos loop running ?

    all
    I have a main VI and display results/graphs using references from a subvi. I have a STOP button on my main vi, which when pressed must immedietly stop the subvi. The subvi however contains a DAQ acquire VI which acquires like 32667 every loop. Currently my stop button works only before/after the acquisition is completed. Also there is some data processing after data is acquired which again goes into a long loop.
    Is it possible for my stop button to override everything and close these VIs and acquisition immedietly ?
    Kudos always welcome for helpful posts

    I agree with Anthony's statement that the "Abort VI" method is a brute-force approach - I use it only when necessary. I was just providing an example of one way to do it. It really all depends on what you're trying to accomplish. Your original statement was that you wanted to stop the subVI immediately, and the "Abort VI" method does this. Whether or not that's the right way for your application... only you can answer that.
    With respect to intensity graphs it also works. Not sure what you may be doing that's causing the problem. Take a look at the attached example and compare to what you're doing. Hope you don't mind psychedelic-looking graphs.
    Attachments:
    ReferenceExample2.zip ‏41 KB

  • Music Store Payment loop

    Hello,
    For some unknown reason for the last 2 days the music store thinks my credit card zip code is worng, after it got over that it claims my credit card number is wrong, even though they are both correct the music store will not accept it.
    After attempting to buy something over 16 times my bank called to ask why iTunes was sending so many requests that they had to approve, which they did.
    So I gave up on that and tried the pay pal option, that is just a long loop, after you hit return to merchant, you've purchased notthing, it says no card on file, so you hit pay pal, which it makes you go through the steps again, then repeat, you can't ever get it to remeber pay pal is your active payment method.
    I've asked CS about this, I was told, sorry try a music card. anyone else have a more helpfull suggestion?

    also, found that IE must be used to make the pay pal option work.
    now if I could just figure out why it won't take my CC info

Maybe you are looking for

  • H8-1287 Beats Audio controls do not work in Windows 8.1

    I've upgraded to Windows 8.1 and installed the IDT High-Definition audio driver from HP's website.  The surround sounds seems to be working but the controls do not work to modify the EQ etc.  I've seen the problem has been resolved for Envy laptops b

  • Category names are not coming in Gantt chart

    Hi all I have a Gantt chart where I am displaying customer name in category axis. But instead of coming those names I am getting category1,category2.. in category axis.Please help. Regards Sunit

  • Sync software?

    Hello all can anyone recommend some form of sync software for mac. I have dropbox but I am not so fussed about online syncing just the ability to sync folders from two macs onto an external drive. I have tried cronosync and sync standard and the pair

  • Wrong invoice, no support

    Hi all I am quite disappointed about apple's support. I received an invoice by email three days ago for an app which I have never bought at the iTunes store. Therefore, I immediately tried to contact Apple by phone but if you choose the iTunes option

  • Trouble deleting phones off the bluetooth menu

    I added a few peoples phones to my bluetooth on my laptop but now im trying to delete them, but apparently i can ONLY delete my own phone... When i click on other peoples phones the DELETE button greys out... how do i delete the other phone?? When i