Creating onrollover / onrollout button that plays its full ONanimation when touched

Hey all,
On most of my option MC's I have something like:
this.onRollOver = function(){
this.gotoAndPlay("onanim")
this.onRollOut = function(){
this.gotoAndPlay("offanim")
Obviousy if you quickly roll on and then off the MC the
animation is staggergy and not a fluid animation.
I would like to set it so that everytime you touch/roll on
the option MC it will always play its full on animation right, then
it will go to the off animation.
I believe you can incorporate onenterframe object to achive
this. Could someone please show me a good solution.
Any help would be great.

the best solution is to stop the rollover animation as soon
as the button is rolled out and start the rollout behavior (from
the correct place on your timeline) as soon as the rollout is
triggered.
depending on your rollover and rollout animations that may
require a little math or more commonly when the rollout animation
is just the rollover animation playing in reverse would involve
playing the rollover behavior backwords.
it's this latter situation that is commonly used to trigger
an onEnterFrame handler that calls a prevFrame() method and
terminates when frame 1 is reached.

Similar Messages

  • Buttons that play motion track only when selected

    I'd like to create a chapter menu such that as the chapter buttons are selected, a short loop of motion video (or audio+video) track plays somewhere on the screen, When focus moves away from the button, the track either goes away entirely or freezes at its start frame.
    A good example of what I'm talking about would be the chapter menus of any of the Lord Of The Rings Extended Editions.
    Is this possible with DSP?

    The other way to achieve the effect is to use overlay shapes as masks which you make transparent when selected. You composite the motion areas as part of the background and then make an overlay to cover them. Set the overlay shape to be large enough and make it fully opaque when not selected/activated. You can then reveal the video underneath as you move from button to button.
    This will work much faster than moving from menu to menu but there are some issues to consider...
    Firstly, when you click on a button, your player may remove ALL overlay masks momentarily which will reveal all background videos. Similarly, when returning to the menu you may have a slight delay when the menu first appears, so that all video is again visible for a fraction of a second. This effect is not seen on every player, but some are worse for it than others.
    Secondly, there is no way of controlling where abouts you start the video clip as the mask is removed - it will simply loop in the background and each time the mask is removed the clip will show from where it currently is.
    However, if these are not major issues for you, then this technique will give you faster responses to your button selection and activation than moving between menus. If you want to have finer control over things then the multi-menu approach is the only one to consider!

  • IPhone (Cocoa Touch) Button that plays sound file on click?

    Hello.
    I am trying to create a button that, when clicked, it plays a given sound file in the app's filesystem.
    This is what I have set up thus far:
    Regular Rectangular button -> connected to NSObject Called "sounds" -> with the Event "playsound1" chosen as the event.
    I then wrote the class files, brought them into Xcode file project under classes, and now I'm staring at sound.h and sounds.m with no idea what to do next.
    I was able to create in a regular Mac OSX Cocoa, a button that plays the system beep using NSBeep. However, I don't know how to achieve this similar objective with using a given sound file in the iPhone Cocoa Touch.
    Thanks

    I have tried so many things. I'm so lost.

  • I am having trouble bouncing and creating an aiff file that plays back. I've checked my output settings, and although I am able to create MP3s, the aiffs are blank. The happens when I try to export a track as an aiff file - it's blank.

    I am having trouble bouncing and creating an aiff file that plays back. I've checked my output settings which appear to be correct. Although I am able to create MP3s, the aiffs are blank. The happens when I try to export a track as an aiff file - it's blank.

    When bouncing, do you use the Key Command or the button on the Output Channel Strip? The Key Command only bounces from the Stereo Output. The bounce button bounces from the Channel Strip it is on. So if you want to bounce out outputs 3-4 or higher, don't use the key command, but the button.
    The strange thing here is that Logic, when it bounces an MP3, first bounces an AIFF, which at the end of the bounce process is being converted to MP3, so I can't imagine how you can get a silent AIFF and a normal MP3.
    How have you listened to those bounces? iTunes? Quicklook? Quicktime?

  • How can I create a submit button that only saves?

    Our end users will save the completed form and later upload it to anotherg place.  I created a save button that works fine, but without a Submit button there is nothing to trigger the reminder to go back and answer required questions.  I don't want to lose that part.  Thanks in advance for any help you can offfer!

    Would something like this work for you?
    var OKToSave = true;
    if (tfSomething.isNull) {
              tfSomething.border.edge.color.value = "255,0,0";
              OKToSave = false;
    else tfSomething.border.edge.color.value = "255,255,255";
    if (!OKToSave) app.alert("Please fill in all required fields");
    else app.execMenuItem("SaveAs");

  • Create a clear button that will clear a jpanel

    so i have two classes. One being a frame, and the other being a panel.
    On the panel, i can draw various shapes with various colours etc. The frame contains the panel, and also a north panel containing various buttons to achieve this.
    What i would i need to do is create a clear button that will clear the panel.
    I know i can go and set it so it's draws a rectangle the same colour as the background but that would be cheating.
    I will post a section of the paint just so you get an idea.
        public void paintComponent(Graphics gPanel) {
            if (this.buffer == null) {
                Dimension d = getSize();
                this.buffer = new BufferedImage(d.width, d.height,
                        BufferedImage.TYPE_INT_ARGB_PRE);
                myLineColour = new Color(0, 255, 0);     // initial colour for drawing
                this.g2Buffer = (Graphics2D) this.buffer.getGraphics();
                this.g2Buffer.setColor(Color.white);
                this.g2Buffer.fillRect(0, 0, d.width, d.height);
                // This time we'll draw with a broad pen 
            g2Buffer.setStroke(new BasicStroke(myLineWidth));
            if (myShapeFlag == 1){{
                this.g2Buffer.setColor(Color.white);
                g2Buffer.setXORMode(myLineColour); //go into the overwrite mode
                g2Buffer.drawLine(xStart, yStart, xOld, yOld); // undraw last
                g2Buffer.drawLine(xStart, yStart, xEnd, yEnd);     // draw new
                g2Buffer.setPaintMode();          // out of XOR overwrite mode
                xOld = xEnd;                    // store last end point
                yOld = yEnd;
            if(mouseReleased) {          // final time through
                g2Buffer.setColor(myLineColour);
                g2Buffer.drawLine(xStart, yStart, xEnd, yEnd);     // draw final
                mouseReleased = false;
            gPanel.drawImage(this.buffer, 0, 0, this); }Any help on this would be much appreciated

    no idea how to do this.. sorry...
    for the jbutton action listenener i'm not sure.
    I think i'm on the right tracks with a method
        public void clearPanel(Graphics gPanel){
                g2Buffer.fillRect(100,100,100,100);     // draw final
                gPanel.drawImage(this.buffer, 0, 0, this);
    }but again i think i'm way off the mark..

  • How do I make multiple videos on one slide play in full screen when selected?

    I want to put four short videos per slide and have each play in full screen when I click on them. How can I do this? Thanks

    I've figured out to hyperlink to the video in a different presentation, which works. BUT how do I end back on my original slide?

  • HT5213 I am about to publish my iBook with photographs. It is interactive in that small images will go full screen when touched. Is there a size limit on my book? If so how many megs?

    I am about to publish my iBook with many photographs. It is interactive in that small images will go full screen when touched. Is there a size limit on my book? If so how many megs?

    2Gb is the max

  • Rollover buttons that play a movie clip.

    Hello,
       I am new to Flash and I am trying to accomplish a simulation such as this example, http://www.its-about-time.com/investinesart/coalplantvirtualtour.swf. I have all of my movie clips done, but how do I tell a rollover button to play a specific movie clip? I also want to have all the movie clips to play simultaneously via a rollover button as shown in the example. I've attached a captured image of my timeline, if that helps. I've tried everything so far, but nothing is working! What is the simplest way of doing this?
    I have this inside one of the movie clips (mc_2) in a seperate layer under - (actions)
    RO_btn.onRollover = function(){
    mc_2.play();
    On the main timeline I have an actions layer with this:
    stop();
    Thinking that this may stop all of my movie clips but it doesn't.
    Should I make an actions layer in each movie clip with this syntax huh? stop();?
    I'm frustrated!!
    Thanks, if you can help!
    MG

    Hi,
    I have made something that you are looking for.
    It will be of help to you.
    basically you will have to create a few movie clips namely:
    2 buttons: (name them a_btn, b_btn, c_btn, d_btn, e_btn)
    3 movie clips (I am taking example image1_mc, image2_mc, image3_mc)
    in each of these movieclips.place 2 frames and on second frame put your movieclip(one in one).on both the frames put stop()
    now click on a_btn and write this script
    on (rollOver) {
    _root.image1_mc.gotoAndPlay(2);
    _root.image2_mc.gotoAndPlay(2);
    _root.image3_mc.gotoAndPlay(2);
    on (rollOut) {
        _root.image1_mc.gotoAndPlay(1);
        _root.image2_mc.gotoAndPlay(1);
        _root.image3_mc.gotoAndPlay(1);
    with this all 3 animations will work simultaneously. if you need to run any one of the movieclips at a time the you can address that mc in particular
    .Say if you want only 1 mc to move at a time then put this on  btn 2
    on (rollOver) {
    _root.image1_mc.gotoAndPlay(2);
    on (rollOut) {
        _root.image1_mc.gotoAndPlay(1);
    .Dont forget to give proper instance names to movieclips.(they are in properties panel.)
    Cheers!

  • Create an exit button that (really) works

    Hello,
    I'm using Captivate 6.
    I have create a playbar with trigger zone for "previous slide" button, "next slide" button and a "home" button.
    Trigger zone for previous and next slide are working perfectly in the preview and from the swf i have published.
    Concerning the "Home" button, it is in fact an exit button that closes the swf (an advanced action including cpCmndExit with 1).
    It is working from the preview but not at all from the swf (played in Chrome and IE9).
    Kind regards,
    Vincent

    I just went through a very similar struggle using the variable CPcmdexit =1 here was what I found and the solution for me.  First off, this variable only seems to work when using Internet Explorer (couldn't get it to work with chrome and didn't test firefox).  Luckily our LMS standard is the users use IE so that helped me passed the hurdle.  The second part of the equation though that took me forever to figure out was that in the Reporting Settings make sure that your success criteria is being obtained.  In other words my criteria was that the user viewed 100% of the slides before being complete.  This did not work for me because I had slides past my end point that the presentation jumped and returned from.  My resolution was to set it to the number slide instead of percentage that I wanted my user to view.  So success now looks like the user viewing to slide 37 (note: It seems although I didn't throroughly test that if you have hidden slides along the way to get the end number that it throws the count off since user can't actually view it).  When that criteria is met it seems that the Cpcmdexit button functions properly otherwise it is unresponsive.
    Hope that helps.
    Brian

  • How to create a radio button that changes colors

    I'm using Acrobat X and ID CS5 on Mac OS X.
    A couple of years ago someone on the forums explained to me how to create a button that changes color with each click. You can view a sample PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle.pdf. They gave me the document JS and showed me how to set the properties of the button. I've integrated the button into a particular series of PDF forms and it's worked out very well.
    Now I would like to do the same thing, but using a circle instead of a square. Can anyone tell me the best way to do this? Can I somehow set a radio button to cycle through colors in the same way? I design my forms initially in ID CS5 and then activate and format the fields in Acrobat X. I've tried using circles instead of squares in my ID document, but when I export to an interactive PDF, they're converted to squares.
    Any ideas?

    I understand how to make buttons cycle through colors-- the problem I'm having is that I'm trying to figure out how to make a circular button cycle through colors. When I export my ID document to PDF, my round button maintains it's original appearance, but when I click on it to cycle through the colors, it behaves like a square (see new PDF at https://dl.dropboxusercontent.com/u/52882455/colorcycle2.pdf).
    If I use a radio button, I can get it to cycle through colors, but I don't want it to have a black dot in the middle. Is there a way to format the radio button to not show the black dot when clicked?

  • Creating a DVD Movie that Plays When Inserted

    I would like to movie DVD that plays automatically when inserted into a player. Is there a way to skip the initial interface where one has to click the play button on the screen? Thanks.
    Gus

    Here is the way I do it:
    http://homepage.mac.com/profpixel/AutostartDVD/autostart.htm
    F Shippey

  • How to create a intro clip that plays automatically when DVD is inserted?

    I am a pretty much a newbie to DVD studio pro and I am wondering how can I create an intro clip that will play when you insert a DVD created in DVD Studio Pro into a player? In iDVD it was fairly simple but in Pro I am getting a little stumped by it.
    Thank you.

    Click on the track in the outline or graphical view, look in the property inspector near the top for the 'end jump' settings box. Use that to specify the correct menu...

  • How can I creat a control button that will allow the vi to run?

    Instead of pressing the run button, I want to creat my own run button that will allow my vi to run.
    Any idea?
    Thank you

    First you need to set the VI to Run When Opened (VI Properties>Execution). Then you create a front panel Boolean. On the diagram what you need to do is have some sort of idle state where nothing is done until the Boolean is pressed. It could be a separate while loop that doesn't exit until the Boolean is pressed, an Event Structure, or as part of a state machine. Look at the shippings examples Queued Message Handler, New Event Handler, Using Buttons for Options to name just a few.

  • Create Email/Submit button that asks the user what email address to submit to

    Is it possible to have an Email/Submit button that will ask for the users to imput the email address in which to submit to?

    My own opinion is that you are going to tick off more people than you realize. I think you can handle this in one of a few better ways:
    1) Institute an interface/web service where the HR system can send you people that are terminated. If the person has sensitive company data or anything on your site it would be in their best interest to remove their access.
    2) Force password resets every x days. To reset a password, your page can send the link to their email. That way they have to establish they still work there to reset it.
    3) Along the lines of #2, just make them verify their account every x days. If they don't do it within a week timespan, lock their account until they can prove they work there.
    I mean unless you're dealing with top secret information, if someone gets a few extra days of your service its not a big deal. You have to balance the user experience with the reality that someone may get your service for free for a bit.
    I can still get into My Oracle Support with my old email address. I obviously would not dare to put in a ticket, but I can view bug notes, knowledge base..etc. So it happens.

Maybe you are looking for

  • DVD Drive no longer working

    Hi there, I tried getting help with this issue a few months ago, but no luck. So I'm trying again in hopes of a response. My laptop is a Satelite L655-S5058 (2 years old now) and the internal DVD drive stopped working. It would appear in "My Computer

  • Refilled color cartridge can't conform to F2120 all-in-one

    In a nutshell, I got my colored ink jet cartridge refilled and it doesn't seem to conform to my HP F2120 all-in-one printer. A more detailed description: *When I attach the printer cable to my computer, an orange light flashes beside of the image on

  • Please help with a query were struggling with.

    Any help please, were struggling to get the result we require. We have Scheduled data returned from another program(job table). Shows our jobs 1 through 9 and the time that each job is loaded on a machine. i.e. if you look at the job table, job 1 is

  • Create a Summarized custom report having information of Client Status, Deployments and patching

    Hi,  I have to create a custom report in SCCM 2012 R2. The single report will contain a summarised details of 1. Number of SCCM clients & there health. 2. OSD/Software Distribution/Client Installation performed within a period of time. 3. Patching (R

  • Reading untagged documents keeps popping up

    My computer has Windows 7 Home Premium 64bit and Adobe Reader 9.4.3.  When I open up a pdf, a window Reading Untagged Document pops up wanting me to take an action.  I have looked at all of the preferences as to how to turn this off and have not foun