Need to loop to certain point on mouse-click

Hello,
for work I am trying to create a visual for a simple electric circuit. What I want is that when the circuit opening is clicked, it closes and the light bulb comes on. When it is clicked again, it opens and the light bulb turns off.
I have it working fine when I try to play it one time through. However, I do not know how to send it back to the beginning and run through the entire timeline again.
On frame 1 I have this actionscript:
stop();
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);
function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void
gotoAndPlay(2);
This plays till frame 11, which has the script:
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame);
function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):void
gotoAndPlay(13);
stop();
It then plays till the end (frame 24), where I put in the script:
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayAtFrame);
function fl_ClickToGoToAndPlayAtFrame(event:MouseEvent):void
gotoAndPlay(2);
Everything works great, even when it is sent back to frame 2. The problem is that when it reaches 11 again, clicking the mouse always sends it back to 2 instead of on to 13.
I hope this makes sense, I don't really know any better ways to explain it. It's probably a simple fix, but I'm new to actionscript and this has been driving me crazy. Any help would be appreciated.
Thanks,
Emily

use:
On frame 1 I have this actionscript:
stop();
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_3);
function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void
gotoAndPlay(2);
This plays till frame 11, which has the script:
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame);
function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):void
gotoAndPlay(13);
stop();
It then plays till the end (frame 24), where I put in the script:
movieClip_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayAtFrame24);
function fl_ClickToGoToAndPlayAtFrame24(event:MouseEvent):void
gotoAndPlay(2);
Everything works great, even when it is sent back to frame 2. The problem is that when it reaches 11 again, clicking the mouse always sends it back to 2 instead of on to 13.
I hope this makes sense, I don't really know any better ways to explain it. It's probably a simple fix, but I'm new to actionscript and this has been driving me crazy. Any help would be appreciated.
Thanks,
Emily

Similar Messages

  • Tool changes to pointer on mouse click

    Help! All of a sudden when I use a tool in Photoshop CS4 the brush size or selection tool changes to the arrow on mouse click. I see the brush tip or eraser tip, but when I hold the mouse down it changes to an arrow.

    I had this happening too under CS4 with Snow Leopard.
    I went to preferences / cursors, and changed the cursors options, then changed them back, and it fixed it.

  • Gain control freezes after a certain point (cannot get highlights to 100) with colorwheel mode

    I just purchased Adobe CC, (Switching from FCP 7, did not want to upgrade to FCP X).  Really loving SpeedGrade (was an Apple color user)
    I am using a standard iMAC keyboard and magic mouse (iMAC 27")
    In colorwheel mode:  After setting the blacks to 0 with the offset wheel, I try to move the gain wheel to the right, to get my highlights to 100.  Even when holding shift, I have to click and drag several times to move the pointer.  I cannot move it in one motion.  Even then, the pointer will literally stop or "freeze" at about the 3 o'clock position.  In order to get my highlights to 100, I have to switch to the Editbox mode and scroll the numbers up manually.  I cannont do it with the colorwheel mode.
    Very frustrating.  Any advice?

    Thank you so much for your prompt response.  After I posted my question, I looked online and found some users had the exact same issue and found the solution.  It is in the way you move the mouse:
    When clicking on the indicator for a color wheel, my impulse was to move the mouse in a downward circular motion, to mimic the round path of the wheel.  This appears to not work and makes the indicator "freeze" after a certain point.
    When clicking on the indicator and then moving the mouse laterally, directly to the left or right on a mouse pad (or desk), it moves the color wheel indicator all the way down to either end.  When moving the mouse this way, it seems to work.  I hope I’m explaining this clearly.
    To answer your question, yes the issue was with the Offset and Gamma wheels as well.  But since the particular adjustment for these was not as much, I didn't realize it.  But the gain adjustment I was doing was more severe, which is why I thought it was just the gain wheel adjustment.
    So it appears it was the way you move the mouse to adjust the color wheel - which should be left and right.
    I really am enjoying Speedgrade much more than Color.  I was a huge Color fan as well and very upset when Apple discontinued it.  I am very happy I found SpeedGrade and look forward to learning it more in depth.  My next challenge is to find out how to use the SG color wheel controls to mimic curve adjustments.

  • Problems with mighty mouse clicking

    Hi everybody, happy New Year first of all!
    Then my problem: I bought an Intel iMac about 1 year ago, and have been using the supplied wired mighty mouse since then. I set it up with left+right top buttons.
    I didn't have a single problem until a few weeks ago.
    First, the "typycal dirty scrolling ball" which seems to be solved by rubbing the ball on a piece of papere with the mouse up side down.
    Second, and most annoying, *the click functions seems to perform worse than before*. I mean, it looks like *I need more pressure now to have the mouse click* (either left or right) on links, icons, etc.
    Result: about half of the times, clicking the mouse (using the pressure I was used to) has no effort, I need to re-click with more intensity.
    Did anybody of you experience the same problem? I cannot understand if it is kind of software problem (say, something that can be solved by some restore function) or a physical one (dirt? But the mighty mouse cannot be unassembled...).
    TIA to all,
    Giopad65

    Hello and Welcome to Apple Discussions ...
    Fist, here are the instructions to clean a Might Mouse: http://support.apple.com/kb/HT1537
    and here: http://www.macosxhints.com/article.php?story=20060210115417864&lsrc=osxh
    Second, go to System Preferences/Keyboard&Mouse/Mouse and make sure your Tracking/Scrolling and Double Clicking is set to your liking. (The System Preferences panel is located in your Applications folder)
    Carolyn
    Message was edited by: Carolyn Samit

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • Validate ascii value above a certain point javascript

    Hi guys,
    I'm wondering if it is possible to create a javascript function to validate within form items ascii values which are above a certain point, I would need to loop through the user input, through each character to check its ascii value but im unsure as to how to do this??
    T.I.A
    Stefan

    Hi,
    Something like
    function LoopStr(pStr){
    var a;
    var c=160;
    for(i=0;i<=pStr.length;i++){
      a=pStr.charCodeAt(i);
      if(a>c){j=i+1;alert('String '+j+' character '+String.fromCharCode(a)+' is not allowed');return false;}
    }Br,Jari

  • My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem.

    My macbook seems to be going crazy. At certain points (and for hours) I get the oh snap page on chrome, safari doesnt work, macbook wont let me create any files or for example upload music to itunes. I restored my mac so im sure its not a malware problem. The only thing that solves it is switching off and on , but sometimes I have to do that for 6-7 times before its ok or wait for a few hours. Some help please

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • Cannot install Creative Cloud desktop app. It just freezes at a certain point.

    I have a brand new machine running Windows 8.1. I don't know much about specs, so if you need more information on my setup, please tell me where to find it.
    I cannot install the Creative Cloud desktop app. It just freezes at a certain point. I had this problem many months ago. I had a chat with someone from Adobe, and they had no clue what it was. I then called in and the phone was basically passed around from person to person trying to figure out what the issue was. They took over my screen, they tried all of the stuff that I read in the forums. Eventually I asked for the highest up person in the office and that person found a workaround that has been working for all these months.
    However, now that I tried to update the Creative Cloud desktop app, the update froze around 40-50% each time, so I uninstalled the Creative Cloud desktop app, then tried to reinstall it. Now I have the same problem that I had many months ago where when I double click on CreativeCloudSet-Up, and it says it's downloading, it freezes very early on and just sits there. No error message, just sits there forever until I kill the process. I can't even cancel it properly.
    I have very slow internet. I don't know if that has anything to do with it, but I've been downloading all the CC apps directly from the internet, but since I'm paying nearly $60 a month, I'd really like to have the CC desktop app. I'm sick of downloading each update manually off of websites.
    I have read every thread, empty or packed full of replies, and none of the suggestions seem to help me. Maybe I don't know what I'm doing, but I really don't think that paying $60 a month should require me to fiddle with a bunch of files and cleaners, etc. I can't believe this problem has not been solved yet.
    Could it have something to do with my computer? Or is my internet provider blocking something from Adobe? I have no idea and I'm honestly so frustrated. I come home from work everyday and spend the rest of the night trying to fix this issue, and I'm sick of it. I won't call in again, since it was a disaster last time. I was on the line for over 4 hours, and they still didn't properly solve the problem.
    I am 100% desperate and tired of this.

    Nothing? Is there no solution to my problem? Do I have no other option other than to cancel my subscription? Pirating Adobe's software would cause me a lot less hassle than this, and that's not the way it should be.

  • Jdev 11g - ADF Faces - Restrict dragging panelSpiltter to certain point

    Hi all,
    I have 2 issues,
    1) How can i have vertical separator between components like ( Vertical line b/w praveen and Logged In As)
    Label praveen *|* Logged In As praveeng *|* Log out.
    2) Can i restrict dragging panel Splitter to a certain point, i.e i should not able to drag beyond that point.
    Is their any property like max Height in case of Vertical Splitter.
    Regards
    Praveen

    Hi
    Sometimes you have to explain to the powers that be that
    a) The requirement cannot be done with the tool
    b) It can be done but will be expensive time wise
    c) That the requirement is a "nice to have" and not a "must have"
    IMHO Sometimes we need to explain that a particular requirement doesn't make sense.
    In this case if the user drags the splitter too far they can simply drag it back again.
    Good Luck
    Paul

  • I'm having problems creating a slideshow that I can burn to a DVD. I can see all of the pictures but it goes black at a certain point every time. I'm using iPhoto. I've tried copying it but the same thing happens. Ideas?

    I've loaded about 100 photos into a slideshow that I would like to burn into a DVD to share with friends at a 50th birthday celebration. It keeps going black at a certain point but I can see the pictures in the cue. Any ideas on how to correct this and how to burn it to disc easily? Thanks! This is my first time trying to do this.

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    how are you trying to export the slideshow?
    Here's how I recommend one get a slideshnow to iDVD: export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best quality video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • Getting line index at a certain point

    Hi,
    I'm trying to get access to a line index in a paragraph at a certain point, for example mouse position. However, I only seem to be able to find methods to fetch line index at a text character position...
    Also, I'm struggling to be able to hold of the text (the actual characters!) on a line!
    Any ideas?
    -Timo

    See this earlier post: http://forums.adobe.com/thread/461475 for mapping mouse locations to positions.
    The text of a particular TextFlowLine can be found something like this:
    var para:ParagraphElement = textFlowLine.paragrah;
    var paraRelativeStart:int = textFlowLine.absoluteStart - para.absoluteStart;
    var paraText:String = para.getText().substr(paraRelativeStart,textFlowLine.textLength);
    Hope that helps,
    RIchard

  • Safari web history only goes back to a certain point.

    Safari web history only goes back to a certain point.
    Hello.
    My Safari web history only goes back in time to a certain point. Everything beyond that (quite a substantial history) is at the same date and time.
    I need to ascertain the time stamped browsing history on a date - before this.
    Any fixes?
    Many thanks.

    Hi.
    I have OS X version 10.10.1 and Safari version 8.0.2.
    When I look at the Metadata/Safari/History, the 'Date Created' and 'Date Modified', etc., starts from Today (now) and goes back to 26 November 2014 14:13.  Any previous web history has this date as well.

  • Memory requirement is continiously increased when i am running my application program in an infinite loop,after certain time it shows an error called low virtual memory

    memory requirement is continiously increased when i am running my application program in an infinite loop,after certain time it shows an error called low virtual memory

    What are you doing with your program. Lots of improper programming techniques can cause this - building arrays, concantanating strings, opening but not closing refrences, etc. Need more details or post your VI. Also, have you looked at "LabVIEW Performance and Memory Management"? It's part of the shipping documentation and available from Help>Search the LabVIEW Bookshelf.

  • Apple Mail stops downloading emails at a certain point

    Hello,
    I have just recently started to use Apple Mail (3.6) and set up two accounts: one POP for hotmail and one IMAP for gmail. While sending mails works fine with both accounts, the hotmail one stops downloading mails from the server at a certain point.
    From the approximately 15000 mails on the server, Mail downloads about 3000 (the oldest ones, which I neither need nor want on my computer anyway) and then stops. When I click on receive new mails, it will show the connecting sign as usual. The bar on the left, which indicates how many e-mails remain on the server and how many are currently being downloaded, pops up for a second, telling me that all remaining 12000 e-mails have been downloaded in the same time span - which obviously didn't happen.
    I have already tried deleting downloaded mails from my computer, thinking that there might be a limit to the number of mails saved on the desktop. Also I deleted the whole account and set it up again, but the same thing happened at exactly the same point, respectively the same email downloaded. What to do?
    Thanks to everyone who can help me out with this!

    Yes, these were the e-mails that showed up in the inbox, i.e. they were the chunk of mails that I could download before Apple Mail stopped the downloading at all. I deleted them because I thought it would make space for newer ones to be downloaded.
    No, I have not used any other Mail application before. I used to go directly to the hotmail-webpage.
    Interestingly, I have deleted the whole account again and set it up anew - which enabled Apple Mail to another round of downloading mails when I did it the last time. This time however, nothing happened: again, the bar on the left appears for a second, telling me that around 12000 mails are on my server and that all have been downloaded in about this second. But they do not show up. It remains a mistery to me, even more so as Mail is obviously able to detect all mails on the server (when I check under Account Information, Emails on Server) but not to download them.

  • Cannot install iOS 5 despite re-installing iTunes, phone hangs at certain point

    Hi there,
    I cannot seem to install iOS 5 on my iPhone 4. It always hangs at a certain point in the progress bar, about a quarter of the way. I have tried unplugging it and plugging it in again, clicking "Restore and Update", but it still hangs at the same point. And yes, my iTunes is version 10.5, I have re-installed it twice now and the problem still prevails.
    Can anyone help me?

    Couple of possabilities,
    1 - As Andea says, use the MacMini but start a new backup from your 3Gs iPhone, so that you can restore if the upgrade to IOS 5 goes pear shaped. A backup doesn't hold your Apps, Music or Movies, just the settings and App data etc.
    2 - Copy your entire iTunes folder from the G3 to the Mini, then when you want to sync the iPhone all the music etc. can be kept in sync as before.
    Not sure if you sync your address book, iCal and e-mail from iTunes or via the Cloud, if the former you'd need to put a copy of these also on the Mini
    Mike

Maybe you are looking for