Looping and Stopping...

Im trying to make a little multimedia application. Obviously
I dont want my homepage to just go to the next script, i went it to
loop so that it repeats the script untill the user clicks to go
onto another link.
At the moment i have created a new behaviour and my event is
"Exit Frame" and my action is "Go to marker" which is the start of
the homepage. However for some reason, the marker just seems to
pause at the beginning of the marker therefore it does not play
some of the animations i have put in.
Does anyone know how to correctly put in some type of loop
that will play all my animations and just go back to the marker or
frame i have chose?
Thanks

Hi Badderman,
As Rob alluded to in his reply, your message is not clear in
what you actually
want to do. I suspect this is because you're still at the
early stages of learning
Director so you're not familiar with the various terminology,
and as such, you are
misusing those terms in your message.
I'm going to try guess what you're doing.
You have an animation from say frame 1 to 30, which you want
to loop. This is your
homepage section. To get the animation to loop, you can
insert a behavior (a type
of script) into frame 30 that says:
on exitFrame
go to "homepageStart"
end
homepageStart - is the name of the marker at frame 1.
Now, if you don't need to loop an animation, but you want to
just loop in the
frame, you'd put the behavior bellow into frame number 30 of
the Scripting
channel.
on exitFrame
go the frame
end
This plays the same frame (frame 30) over and over until
Director is told to jump
somewhere else. Maybe that's what you mean by "it repeats the
script until the
user clicks to go onto another link."
To create a link to another marker, a behavior may be added
to a sprite as
follows:
on mouseUp
go to "someOtherMarker"
end
You could get into trouble if you drag a frame behavior onto
a sprite. So, if you
had a graphic sprite with the behavior
on exitFrame
go to "homepageStart"
end
then, you'd experience the problem of the movie appearing to
always pause at the
"homepageStart".
So, look through all your sprites and see if you have
attached that behavior to
any of them.
regards
Dean
Director Lecturer / Consultant / Director Enthusiast
http://www.deansdirectortutorials.com/
http://www.multimediacreative.com.au
email: [email protected]

Similar Messages

  • Start and stop a loop automatica​lly subtractin​g at each iteration

    Hi there,
    I know that there are some topics about it, but I could not find any solution, especially because I use the version 7.1 and cannot open new version files.
    My problem is as follows:
    I need to charge a tank from 6 to 10 in the morning, every day during 3 days. The process must start and stop automatically, which means, no bottoms to start or stop. The start and stop conditions come from the hour.
    I start with a big loop of 72 iterations, which corresponds to 72 hours.
    The tank must start at level 6 every time it starts.
    After the start, 1 unit must be subtracted in each iteration. Which means, that at 6 am the tank has level 10, at 7 am level 9 and so on. In the end, at 10 am the tank level is equal to 2.
    In the next day, the process must start again and the tank must start at level 6.
    Any suggestions? Thanks in advance.
    Solved!
    Go to Solution.

    While this may work it can be improved significantly. This really isn't a state machine. This is basically the same as your flat sequence with the exception of using a While loop with a Case statement to implement each frame.
    You should define what your actions are and create a typedefed ENUM naming them. State names of 1 through 24 are meaningless. Not to mention in your code many of the cases are duplicates of others. That would mean that all of those can be one state with logic to determine what action/state comes next. A properly defined state machine would not need the outside For loop. Without knowing your specific needs some examples of reason state names would be the following: Start, Stop, Exit, Error, Initialize, Get Tank Level, Fill Tank, Drain Tank, Idle, etc. Can you see how these are easier to understand than 1 through 24.
    There are lots of examples of state machines here. Try a search and take a look at some of them.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • My daq 6008 wil not drop the 5V after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside

    my daq 6008 wil not drop the 5V on a digital output after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside, but i can t seemto get it to work

    i attached the block diagram so you can have a look
    Attachments:
    PID Temp control.docx ‏120 KB

  • Embedded Looping Video and stop();

    HI
    I have embedded a looped video into a flash slideshow where i
    use a next and previous button to navigate from one slide to the
    next.
    My question is can you insert a stop(); command in the frame
    where the looping video is placed so i can hold the slideshow on
    that slide (until i hit the next button) without stopping the
    video?
    Any help would be greatly appreciated.

    create a new fla with something on its timeline so you can see if it loops and attach:
    stop();
    to its last frame.  does it loop?  if yes, zip your fla and attach it.

  • How to pause and stop two "for loops" in an event

    Hi
    The main menu runs first and then goes to reading menu. After "Start Reading" button is pressed, the reading process will take readings.
    1) During reading process, if the "Pause Reading" button is pressed, I want that the two "for loops" are stopped and the two "for loop" counters do not reset. After the "Start Reading" button is pressed, the two "for loops" will continue to run.
    2) During reading process, if the "Stop Reading" button is pressed, I want that the two "for loops" are stopped and the two "for loop" counters are reset. After the "Start Reading" button is pressed, the two "for loops" will run again.
    The attached two VIs are simplified my real application. Any help will be appreciated.
    Thanks
    Steve
    Attachments:
    Main Menu Test.vi ‏9 KB
    Reading Menu Test.vi ‏23 KB

    You can't have those loops inside of the event structure.  Currently, when you press the start button, the reading has to finish before the event case finishes.  This will prevent the stop can cancel buttons from being processed by the event structure.
    You need another loop that can recieve commands from the event loop.  Look up the Queued Message Handler.  That should get you a good start on the command process.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to start and stop looping

    I'm very new to Flash / action script, so I just need to know where to put both the start loop, and the end loop code (below) in my Flash file to make the waving effect on this flag (link below) start and stop when I need it to, because I'm adding a small amount of flash both before and after it. thanks.....
    loopI = setInterval(loopF,40);
    to start the waving and use:
    clearInterval(loopI);
    to stop the waving.
    function loopF(){
        // move the matrix by speed along x to shift the noise
        shift.translate(speed, 0);
        // drawing in the perlin movie clip,
        // create a rectangle with the perlin noise
        // drawn in it with an offset supplied by the
        // shift matrix
        with (displace_mc.perlin){
            clear();
            beginBitmapFill(noiseBitmap, shift);
            moveTo(0,0);
            lineTo(ramp._width, 0);
            lineTo(ramp._width, ramp._height);
            lineTo(0, ramp._height);
            lineTo(0, 0);
            endFill();
        // draw the displacement movie clip in the
        // displaceBitmap (used in displaceFilter)
        displaceBitmap.draw(displace_mc);
        // apply displaceFilter to the flag
        flag_mc.filters = [displaceFilter];
    updateAfterEvent();
    http://www.senocular.com/flash/source.php?id=0.188

    i told you and it's in your message:
    use:
    loopI = setInterval(loopF,40);
    to start the waving.
    use:
    clearInterval(loopI);
    to stop the waving.
    // do not edit the below code:
    function loopF(){
        // move the matrix by speed along x to shift the noise
        shift.translate(speed, 0);
        // drawing in the perlin movie clip,
        // create a rectangle with the perlin noise
        // drawn in it with an offset supplied by the
        // shift matrix
        with (displace_mc.perlin){
            clear();
            beginBitmapFill(noiseBitmap, shift);
            moveTo(0,0);
            lineTo(ramp._width, 0);
            lineTo(ramp._width, ramp._height);
            lineTo(0, ramp._height);
            lineTo(0, 0);
            endFill();
        // draw the displacement movie clip in the
        // displaceBitmap (used in displaceFilter)
        displaceBitmap.draw(displace_mc);
        // apply displaceFilter to the flag
        flag_mc.filters = [displaceFilter];
    updateAfterEvent();
    http://www.senocular.com/flash/source.php?id=0.188

  • Starting and stopping a loop

    I am importing a list of 10,000 emails into memory and then
    comparing them to a database which holds over 400,000 records. It
    doesnt take long for the <cfquery> to time out. I know there
    must be a way to loop thru 20 or so, then stop, then loop thru the
    next 20, etc. I cannot lengthen the timeout so I need to figure out
    a way to process the data in chunks. Thanks.
    <cfhttp method="Get"
    url="
    http://192.168.14.51/matt/email.CSV"
    columns="Email"
    name="importCSV"
    delimiter="#chr(10)##chr(13)#"
    textqualifier="">
    <cfset counter = 0>
    <cfloop index="element" list = "#CFHTTP.FileContent#"
    delimiters="#chr(10)##chr(13)#">
    <cfset counter = counter +1>
    </cfloop>
    <cfset start = 1>
    <cfset end = 20>
    <cfset lastRow = #counter#>
    <cfloop from="#start#" to="#end#" index="loop">
    <cfset ThisEmail =
    listGetAt(cfhttp.filecontent,loop,"#chr(10)##chr(13)#")>
    <CFQUERY NAME = "CheckEmail" DATASOURCE="t">
    SELECT Email
    FROM Subscriber_Info_New
    WHERE Email = '#ThisEmail#'
    </CFQUERY>
    <CFIF CheckEmail.RecordCount EQ 0>
    <CFQUERY NAME="Insert" datasource="t">
    INSERT INTO Subscriber_Info_New
    (Email)
    VALUES (<cfqueryparam cfsqltype="CF_SQL_VARCHAR"
    value="#Trim(ThisEmail)#">)
    </CFQUERY>
    </CFIF>
    </cfloop>

    quote:
    Originally posted by:
    Newsgroup User
    I cannot lengthen the timeout so I need to figure out a way
    to process
    the data in chunks. Thanks.
    Are you sure you can not lengthen the timeout. The
    <cfapplication ...>
    tag allows one to define a specific timeout for a given page,
    as long as
    that is less then the maximum timeout defined in the
    administrator.
    If this is not sufficient for your needs you will need to
    break up your
    process over multiple requests. Just starting and stopping
    the loop in
    a singe request does nothing for reducing the timeout
    threshold of the
    page. You can do this with scheduled tasks, web services,
    and|or the
    <cflocation ...> tag. You will need to pass through
    relevant data about
    what iterations to process, and use some kind of extra
    request storage
    for the results, such as server|application|session scopes,
    databases or
    files.
    Hope that gives you some help.
    Ian
    Sounds like more than I know how to do. I cant change the
    timeout because its set that way on purpose. I think Ill leave this
    alone for now. Thanks.

  • How can I start and stop two parallel loops?

    Hello,
    I want to control two parallel loops with different timing in a vi . That means to start loop 1, then loop 2, stop loop 1 or 2 restart loop 1 ...
    But if loop 1 is running I cannot start loop two and reverse.
    Can someone help me and show whats wrong in my example?
    Thanks,
    Christian
    Solved!
    Go to Solution.
    Attachments:
    Parallel loops Test.vi ‏46 KB

    Hello Christian,
    The reason why you can't do what you want is in fact quite simple.
    You have an external loop that is "over" the two inner loops.
    So when you stop one of the inner loops, the outer loop will still be in the same iteration until the other inner loop ends - stop the other inner loop.
    You can see it very easily if you probe the iteration counter of the outer loop - only when both the inner loops stop, it will incerment.
    So, to do what you want, you need to make them independent - you need two outer loops.
    Check my attachtment, see if that's what you need.
    Hope this helps,
    Paulo
    Attachments:
    Parallel loops Test2.vi ‏48 KB

  • RI started downloading a tv show and it is stuck at around 450MB in a continual loop and no way to cancel it.  How do I stop it?

    i started downloading a tv show and it is stuck at around 450MB in a continual loop and no way to cancel it.  How do I stop it?

    Ldme-
    Can you get to the Home screen?  If so, double-click the Home button.  A row of recent Apps will line up along the bottom of the screen.  Scroll across and look for the App that is stuck.  Press on its icon until it starts to wiggle.  A red minus sign should appear on each icon.  Press the minus sign to remove the App from the list, which will also stop it from running.
    Click the Home button to stop the wiggling, and again to return to the Home screen.
    If that does not help, try resetting (rebooting) the iPad.  Hold both the Home and Sleep buttons for several seconds until the Apple logo appears.  Ignore the "Slide to power off" arrow.  The iPad will restart after a couple of minutes.  Resetting this way will not hurt anything, and sometimes clears up mysterious problems.
    Fred

  • My iphone 4 is stuck in a reboot loop and won't stop. Any ideas?

    It froze during a message. I went to restart it and it didn't finish restarting, tried again and got a white screen. Now it's stuck in a reboot loop and I can't get it to stop.

    First, plug your iPhone into your cpmputer. Then, press and hold the Home+Power buttons for around 10 seconds, then release the power button but continue holding the Home button, until you see a pop up in iTunes. Then, restore your iPhone.

  • Start and Stop Trigger using PXI-6120 and DigitalSta​rtAndStopT​rigger.vi not working :-(

    Hello,
    I've been trying for a while now to get my PXI unit to capture a waveform between a Start and Stop (Reference) Trigger using the NI example DigitalStartAndStopTrigger.vi downloaded from the NI website. However, whilst the start trigger and stop trigger seem to be working i.e. the VI runs and stops at  the correct times there is never any data read from my DAQmx compatible PXI-6120 card. So I can see the VI is running around the aquisition loop but the Property Node AvailSampPerChan is always returning zero... this has me slightly puzzled. I thought this might just be a driver issue so I've updated my box to the following software versions (see below) and installed the latest drivers e.g. DCDNov07.exe (also from the NI site) but nothing has changed.
    my software as of now.
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.3.0.49152
    DAQmx 8.6.0f12
    Trad DAQ 7.4.4f7
    before I updated I had the same problem but with the following versions:
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.2.1.3001
    DAQmx 8.5.0f5
    Trad DAQ 6.9.3f4
    So to cut a long story short I still have the same problem with the triggers... does anybody have any ideas what is going wrong?
    To add insult to injury it the traditional DAQ example ai_start-stop_d-trig.vi was almost working correctly before I did the upgrade. It had the strange behaviour of capturing the AI0 channel but on the wrong edges (e.g. if I set Start on Rise and Stop on Fall it would do the opposite, Start on Fall and Stop on Rise).
    I'm going to leave my box doing a mass compile over night but i'd really like it if someone could suggest a solution or point me in the right direction.
    Many thanks,
    Mike

    Hi Graham
    I'm out of the lab today but I'll try and answer your questions as best I can...
    1) What are the values you have set for Buffer size, Rate, samples per read and post trigger Samples?
    At the moment I have all the values (e.g. sample rate, buffer size etc) unchanged apart from the ones I mentioned in my previous post (see above). I have in the past played around with changing the buffer sizes and rates in the example VI but as this appeared to have no effect on the behaviour I now have them setup as in the download.
    2) Does the program end after the stop trigger is implemented?
    Yep, if I toggle the trigger line high then low I see the program exits the read loop and the VI stops running as expected.
    3) Lastly can you give me the details of triggering method. Are you
    using a digital train of users set digital pulses? how long is the
    program running.I'm using the WriteDigChan.vi to manually toggle the first digital line of the PXI-6733 card which is wired directly to PFI0 of the PXI-6120 card. Generally, I just start the VI running  and then toggle the line high, wait a couple of seconds and then toggle it low.
    To me it all looks like it should be acquiring samples but as I said yesterday it just refuses to fill the buffer with any data (and hence no samples are read).
    Any ideas? and thanks for you help,
    Mike

  • How to stop execution in while loop without stopping execution of other loops in the same vi

    HI
    I am quite a novice in Labview.
    I have a problem in my project. I used a while loop inside my vi to build an array of ten values along with other loops. Then I used a stop button to stop manually the while loop. But it seems like the loop doesn't stop in the middle of the array building and so other loops in the vi doesn't work until the while loop finishes building the array and as soon as while loop execution is over, the complete vi stops. But all that I wanted was to build the array using the shift register along with the control to stop building array anytime. And not to stop execution of other structures when the while loop finishes.
    Can anyone help me?
    Rahul

    Hi Rahul,
    Modified ur Vi to work with single button.
    But the subtract case is not in any loop.
    So, once both the loops stop, the subtract case will execute only once. Depending on state of subtaract boolean at that time, corresponding case will be executed and the Vi will stop.
    so think of a logic where u can put this also in a new loop.
    Or you can also incorporate it in one of the two loops and pass the other loop's data to it.
    Let us know how you will proceed in this regard
    I am posting your VI as well a VI with my modifications VI in Labview 7.0 so that Thomas can give his suggestions too
    Plus, always keep a time delay in your while loops.
    Oh sorry, the "arrayinouttestnewfinal.vi" is the modified vi
    Regards
    Dev
    Message Edited by devchander on 01-10-2006 06:15 AM
    Message Edited by devchander on 01-10-2006 06:19 AM
    Attachments:
    arrayinouttestnewfinalnew4.vi ‏59 KB
    arrayinouttestnewfinal.vi ‏63 KB

  • I have a problem with a vi that crash and stops the signal generation​.

    I want to control several pumps and valve at the same time. Three of them are comanded by a board installed in other computer, so that I have to comunicate with them by a TCP/IP comunication. The others one are controled by signals sent by a PCI-6024 E board which is installed in my computer. The problem is that I want to create a vi that controls every equipment at the same time. I did a Vi that is in attach, but the problem is that when I run the vi it works during a certain time, but after 10 minutes (more or less) it stops to send the signals to the pumps. Could someone help me?
    Attachments:
    controlo_bombas_caudais.vi ‏98 KB
    valvula.vi ‏53 KB

    You did not include your subVIs so not much can be inferred. Several points of poor programming jump out
    1. Use time delays in your loops to keep them from racing
    2. Put the Open Application Ref and Open VI Ref before the start of the loop and the Close Ref after the loop

  • How can I animate my sprite to run on scroll and stop when scrolling stops?

    I appreciate everyones help so far.
    I want my illustration of a man to "walk" through my composition as the user scrolls through it.
    I have a sprite created and have made it loop. What sort of code do I need to write to get it to move only on scroll and stop off scroll?
    Thank you guys so much!
    Johnathan

    Hi,
    Thank you for your post.
    Please check the following tutorials for scrolling effects in edge animate.
    http://www.heathrowe.com/adobe-edge-animate-simple-scrollbar-symbols/
    http://www.adobe.com/inspire/2014/01/parallax-edge-animate.html
    Regards,
    Devendra

  • How do I move data from a DAQ into and out of loops and structures?

    I have a set of RTD probes set up to read data into LabView through a DAQ. This block of code is in a while loop
    that executes alongside of several other loops simultaneously. I need to use the data from the RTD probes in other
    loops and case structures specifically for logic tests.
    The problem is that I can't seem to bring the dynamic data out of the DAQ containing while loop or into the other structures.
    Any ideas?
    I have had some success with using multiple DAQs and stopping all others while I need the data inside of a case structure.
    Is there a way to reference data from a DAQ or to run multiple DAQs that read the same data from the same channels without getting a "Task in use error"?
    Thanks,
    -David

    Search the forums for Prodcuer/consumer architecture.
    This uses queues to pass data from the producer loop (such as your data acquisition loop) to other "consumer" loops.  These are the other loops where you want to use the data.
    You won't be able to use multiple DAQ Read functions at the same time.  As you've seen you get error -50103 about the resources already being in use.

Maybe you are looking for

  • What's the difference between Generators and Image Units?

    Hi What's the difference (in layman terms) between the Generators and Image Units in the Library?

  • My mac went black and now its asking for a guest password?

    hello, I was trying to save all my information in my mac laptop and asked for a password I did type my admin password then laptop froze and went black! now its asking me for a guest password, I dont remember to have one! I tried all the passwords tha

  • Set decimal places in Grid

    Hi. I have a calculation field in my SQL statement that populates the Grid column and it only shows two decimals.  How do I set it to calculate more than two.  I tried it in the SQL Statement....Convert(decimal(18,3),dbo.RDR1.OpenQty * dbo.OITM.SWeig

  • Allow others to order iPhoto calendar via Apple Photos Services (or other)

    I thought I saw this option somewhere, but I have an iPhoto calendar that I've printed through Apple Photo Services for myself. I now want to make that cal available for others to print without having to be involved in placing the order for them. Is

  • Proper namespace in root application tag Flashbuilder 4

    In my Upgrade application to FB 4.   if I want to just support the existing halo mx namespace in my components what do I need to do? If I use the following <mx:Application xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:local="*"                 layo