ActionScript for button to launch

Hi,
I have a button and I'd like to attach a script so that it
will play an animation in a different spot on the page. What would
the actionScript look like?
gotoandplay and quote the movie clip name? -- I'm very rusty
with this!
Thanks for your assistance!

OK, that is good to know.
The script you provided doesn't seem to want to work so here
is what I now have:
In the main animations movie clip, there are 2 keyframes -
each represents an animation (so 2 animations). Each also has a
stop action attached to its frame.
Now, in my main timeline of the actual webpage I have this:
button1.onRelease=function(){
_root.animations.gotoAndStop(1)
button2.onRelease=function(){
_root.animations.gotoAndStop(2)
But...when I test this my animation blinks continuously
within its container; again, not interacting w/ the buttons.
Any ideas? Do I need any other actions anyplace?
Also, I'm so rusty with this...for syntax...is the code
written exactly as above WITHOUT any spaces before and after equal
signs? No spaces before the first curly brace...is that correct?
(don't know if it makes a difference or not)
Thanks!

Similar Messages

  • ActionScript for buttons

    Hello everybody,
    I am new to flash, and I really don't have much expirience
    with ActionScript in Flash.
    Does anyone know what actionscript should I write for opening
    a new page in the same window?
    For example, I have allready created my button, and made
    adjustements to all 4 states, but when I import it in Dreamweaver,
    I'll need some actionscript to put it to work, so when I click on
    the button in the Internet Exproler that button opens a new
    link(page) in the same window?
    Thank you.
    Dusan Cvetkovic
    [email protected]: cool;

    Ok here is what I got.
    When kg told me to use ac2, I did, but I didn't adjust the
    publish settings. So when I did that, everything went well except
    when I imported the button in Dreamweaver and when I tested it, the
    command to open an url didn't work.
    On the other hand, when I tried to put the command that last
    comand in AC3 and right publish settings, I got the following
    message:
    Compiler Errors 1
    Line 6 1120: (Description) Access of undefined property
    my_btn. (Source) my_btn.addEventListener(MouseEvent.CLICK,
    gotoURL);
    What's the problem? Yes, I do have CS3 Web Premium.
    Thanks

  • Need help with actionscript for media controller

    I seem to be having a slight problem. I've been looking
    around and everything I see is for .flv playback. Anyways, here's
    my problem.
    Client wants a video that's interactive. When a transition
    occurs a simple tex button shows up which links to certain web
    pages. Deploying this as a .swf would be no problem, but they want
    a controlbar with it so a user can scrub back and forth in the
    video. So the best way to do this would be progressive or
    streaming.
    I created a source file that utilizes the "loader component"
    and inserted the "media controller component". I'm not very good
    when it comes to actionscript and can't seem to find the proper
    script which utilizes the media controller so the user can scrub
    back and forth. Everything else seems to work fine with the loader
    as it loads an external .swf file.
    Just need to get the controller working properly. Total
    frames of the swf is a little over 3,000 and dividing the total
    frames by 30 was 107.7 seconds. So I round that to 108 seconds. The
    online docs seem to be fragmented and not always consistant
    especially when i'm not using the flvplayback or display.
    Does anybody know the actionscript for this? Or where I can
    find the information on this? I've associated the loader with the
    controller and vice versa in the behaviors panel as well if that's
    any help. Any help is much appreciated thanks.

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Button timing/launch url

    I have a one slide movie with buttons which launch a new
    window to play additional movies. Once the main side finishes
    playing (it is set to stop project), the buttons don't work. I
    added a hidden click box that should pause the movie until the user
    clicks, but it is not helping. The only other alternative would be
    to extend the slide timing to a time equal to enough to view all
    the movies in order to keep the buttons alive. I am hoping this is
    not a problem with Cap4. Any other ideas?

    Welcome to our community
    You said:
    I am hoping this is not a problem with Cap4.
    I think we need more information. From what you have posted
    it would suggest you aren't totally understanding how Buttons and
    Click Boxes work. I say this because you mention inserting a Click
    Box to pause the slide.
    Click Boxes will certainly pause the slide but so will
    Buttons. Lots of folks miss a setting in the Button (or Click Box)
    object that governs what happens when the object has been clicked
    by the user. Frequently folks want to open a file or URL. They
    manage to accomplish that and even manage to discover they may open
    the object in a new window by clicking the button with the down
    arrow to the right of where you type the URL or File Name and
    choosing New. What is often missed is that if you click that button
    with the down arrow again, a new option has become enabled and
    available. The option is labeled "Continue playing project". Often
    this needs to be "DE-selected" for each Button or Click Box in
    order to keep the slide fixed where it paused and prevent it from
    progressing.
    Hopefully this helps... Rick

  • All buttons in all files are now showing error: Mouse events are permitted only for button instances.

    Somebody please help:
    I've taught myself enough with Flash to customize a
    fully-Flash template for my wife's website, and two of the buttons
    didn't do what I wanted them to in Actionscript. They then began
    giving me the message:
    **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line 1:
    Mouse events are permitted only for button instances
    on (rollOver) {
    **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line 4:
    Mouse events are permitted only for button instances
    on (releaseOutside, rollOut) {
    Total ActionScript Errors: 2 Reported Errors: 2
    Not only do I not know how to fix this, the same message
    comes up for every single button in the entire fla I had saved,
    plus earlier versions where I hadn't even messed with the buttons
    yet.
    Any suggestions?

    Hello Corbett,
    The error is saying that you are trying to apply a button
    action to something
    other than a button. Often this happens when you select the
    frame that the
    button is on instead of the actual button, thus applying the
    action to the
    frame instead of the button.
    Make sure you select the button on the stage and then apply
    the actions there.
    You'll probably have to remove the action from the frame
    before it will work
    (looks like it's on Layer 4 frame 1).
    Good luck!
    Jesse H.
    Adobe Community Expert
    My site:
    http://www.jharding.com
    Free Blog Radio:
    http://www.tornadostream.com
    > Somebody please help:
    > I've taught myself enough with Flash to customize a
    fully-Flash
    > template for
    > my wife's website, and two of the buttons didn't do what
    I wanted them
    > to in
    > Actionscript. They then began giving me the message:
    >
    > **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line
    1: Mouse
    > events are
    > permitted only for button instances
    > on (rollOver) {
    > **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line
    4: Mouse
    > events are
    > permitted only for button instances
    > on (releaseOutside, rollOut) {
    > Total ActionScript Errors: 2 Reported Errors: 2
    >
    > Not only do I not know how to fix this, the same message
    comes up for
    > every
    > single button in the entire fla I had saved, plus
    earlier versions
    > where I
    > hadn't even messed with the buttons yet.
    > Any suggestions?

  • Can anyone write a actionscript for flash project

    Hi All,
    Can anyone write a Actionscript for my project.
    I want to develop my project with the flash.
    My project scenario is, I have total no of 60 (.swf) flash
    movies and are about to take 4 to 5 minutes each, my aim is to
    display 20 .swf files randomly at a time on the screen.
    i.e., if we click on a button for the first time, it should
    display a 20 flash movies on the screen and when we click for the
    second time it should display other set of 20 flash movies it may
    or may not repeat the previous ones. It means every person should
    be displayed with a different set of flash movies, no two persons
    can get the same set of movies. The movies should be randomly
    selected.
    Could you please direct me to meet my scenario, could you
    please write a script for my flash.
    Thank you for your precious time.

    Ndippy,
    Folks on here are pretty good about helping out others who
    are trying to learn actionscript, or have trouble with
    understanding concepts. They are less likely to volunteer to do an
    entire project for you. I'd suggest trying to do it yourself, and
    asking specific questions about the process. Both of your posts are
    way to general to allow anyone to give advice that would be
    worthwhile. You have said that you have 60 .swfs in your first
    post. However, in your second, you said they were 60 quicktime
    files. There are very different processes for each option there.
    Are you planning to display 20 at once, or let people scroll
    through them? What size are your clips and what size are you
    developing for?
    Start small, like just trying to load one movie clip
    randomly, and then work your way up. Experiment with changing the
    positions, sizes, etc. When you run into trouble, ask a specific
    question about what you are trying to do, and people will be happy
    to help.

  • CNQL1213 Button Manager launch on start up

    CNQL button manager launches at start up on my iMac and it delays start up.  I already unchecked it on start up in the System Preferences/Accounts/Login Items.  It still launches.  I tried to restart and delete from the Library/CFMSupport but I get a message the Button Manager is already open and can't be deleted.  How do I get this program to stop?  Also Chrome browser launches at start up and I also unchecked that from Login items.  I don't want it to launch either.
    Thanks for the help.
    chris

    First, open /Library and trash the folder "CFM support". as you mentioned, you cannot EMPTY the trash because you come up with this message "Button Manager is already open and can't be deleted" then. So, just trash the folder at the first step. Now open Preferences/Accounts/Login and you most probably dont see the buttonmanager items anymore, but if they are still there, just uncheck them. now restart your mac, and you can see that buttonmanager won't come up on startup again! NOW you can empty your trash bin without getting any messages and get rid of the remaining signs of BUTTONMANAGER!

  • Type of listener needed for buttons ? please help

    hi
    does anyone know what type of event or listener one should
    include for buttons in a web page which has been downloaded
    into a JEditorPane. i have been able to get a web page
    onto my JEditorPane and can even follow most of the hyper links
    by implemmeting hyperlinklistenter.
    but i am not able to do the same for butttons
    ie for eg in google web site i am not able to get anythinh
    by clicking on button .

    This is not easily dooable, You're talking about form submit buttons, which the Default HTMLEditorKit does not support. Even worse, the LinkController class is not overridable, which is a bad design on sun's part.
    You'd have to create your own EditorKit, me thinks, and use that for text/html.
    Not an easy job, but you could cheat off the HTMLEditorKit source.

  • How to find function code for buttons on toolbar in oops alv

    Hi experts,
    I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
    method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALV

    Hi Prakash,
    -->First you have to set the pf status in your alv program by,
    {FORM pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'FIRST'.
    ENDFORM.                    "PF_STATUS}
    -->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
          i_callback_pf_status_set          = 'PF_STATUS'}
    *-->Then doble click on that pf status,
    From the menu bar, select Extras->Adjust Template->List Viewer,
    This will give you the existing statndard gui status of the program*
    ->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
          i_callback_user_command           = 'COMM'
    And make a subroutine of the name 'COMM'i.e,
    FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      DATA: okcode TYPE sy-ucomm.
      okcode = ucomm.
      CASE okcode.
        WHEN 'REF'.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel         = 'MANSI'
            txt1          = 'CREATED BY'
            txt2          = SY-UNAME
          TXT3          = ' '
          TXT4          = ' '
    endcase.
    Hope it helps you
    Regrds
    Mansi

  • Setting icon for buttons in labview 6i

    Hi All,
    Currently i am working on Labview 6i. i created two buttons in my vi one button is used to perform the test, another will be used to exit from the test. i would like to add icons for those buttons. can anyone tell me how to add icons for buttons.
    Thanks,
    kalpana

    You realize that LabVIEW 6.0 is at least 15 years old? That would be almost equivalent to working with a Windows 98 machine nowadays!
    Yes your picture can't be imported in LabVIEW 6.0 on my machine either. I haven't checked about all the details, but the LabVIEW import in 6.0 doesn't seem to work for png and gif images but only for bmp. Newer versions do work for your png file including honoring the transparency at least since version 7.1.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Need Help with ACTIONSCRIPT for Interactive Music Video

    I am trying to create an interactive music video in After Effects and Flash.
    The concept is that while the music video is taking place the user can  decorate the hair of the woman with any of the objects they select.   There will be predetermined animations and destination spots but the  user can choose whatever objects they select to be delivered to the  predetermined spot.  I need to figure out how to let the user to select  an object that will become part of the animation.  I created a PDF  Roughly explaining what I am trying to do.  If anyone can help me I'd be  very grateful as I am more versed in After Effects, I don't know  ActionScript well enough to execute what I am trying to do.
    Below is a rough example of what I am trying to do.  There will be a music video of an animated woman singing.  As she is singing the user will be able to click any of the objects , below the numbers 1-10.  Below it is illustrated that the user wants to press the blue number 2.  If the user presses the 2 the 2 will animate in the mouth of a bird to a predetermined pre-animated spot.  I assume I need to send a movieclip to a blank  holder on the timeline and use a gotoAndPlay() action ???  I am not well versed in ActionScript so any advice would help
    Now whatever number (movieclip) the user chooses next needs to be placed in another blank spot in the timeline? Below the user selcts the Pink 5.
    If the user just wanted to Place two "Blue 2's" then the "Blue 2's" would follow the same animated path and end up at the same predetermined space.
    If the user selected just 5's and 7's they would go to the predetermined preanimated paths
    How would I go about writing the Actionscript for this?

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • t:inputFileUpload : problem with styleClass for button

    Hello,
    the component <t:inputFileUpload> has a field and a button. I want to add styleClass for button, but the styleClass into inputFileUpload tag works only for fields. Where can I add styleClass for button?
    Thank you in advance
    Manu

    Hello,
    I tried your suggestion, but it is not working.
    look the code:
    jsf
    <t:panelGroup styleClass="inputFile">
              <t:inputFileUpload value="#{interpreterDataImageHandler.uploadedFile}"
                   storage="file" accept="image/*" size="30"/>
                                  </t:panelGroup>css:
    .inputFile p{
         color:#5d0408;
         width:80px;
         margin-top:20px;
         border:1px solid #cacac4;
         background-color: #f87e39;
         }generated source:
    <span class="inputFile"><input type="file" size="30" accept="image/*" name="imageListForm:subimageUpload:_idJsp7"/></span>

  • Raster / vector option for buttons

    As written in the title, it would be a great improvement to have an option 'raster/vector' for buttons.
    The same we already have for MSO and scrolling contents.

    Well I figured it out on my own. It was my wacom touch-zoom. My hand brushed it while I had hit both option and command by accident. So it WAS a lock like I thought! Sadly nowhere does anyone seem to MENTION THIS.... so here's the fix;
    Option+command+~+e+u+i
    Opt and Cmnd are already on lock so you just need to push the others at once. You don't need shift. I just refer to the ~ since it's more specific visually than the ` since it seems to differ depending on font and may look like a typical comma at times.
    You can also just swipe the zoom since that's it's function. But in case you get stuck and can't, there it is in normal letters.
    The zoom was deactivated and reset with opt+cmnd+8 I managed to find this online which helped me pinpoint the whole problem.
    I hope this helps anyone else who's unlucky enough to accidentally trigger such a ridiculous and basically hidden command.

  • How to create valid values for button

    Hi,all
    I want put valid values to button like copy from or copy to functionality is it possible.
    if u have idea plz post it..?
    by
    Firos.C

    Hi,
    Actually u cannot have valid values for buttons. IN SAP we have Copy to and Copy from but the same kind of button cannot be created in SDK..... so u need to use the combo box and add ur valid values.
    Hope it helps,
    Vasu Natari.

  • How to set Shortcut keys for button in Apex

    Hi
    Could anyone help me on how to set shortcut keys for buttons in Apex.
    I need to use say ALT + S to submit the page.
    The following thread pertaining to HTML DB refered to use ACCESS key. but that couldnt work in my case.
    Re: operation of the app. with the keyboard
    Any pointers on achieving this would be helpful.
    Thanks
    Vijay

    Hi Vijay,
    I’m afraid you must do it using javascript key listener. You can’t use action() on template based buttons because they are actually not HTML buttons but images with hyperlink.
    Key listener checks which key has been pressed down and invoke some JS function. For example, write this code in page header:
    <script>
    document.onkeydown=keyCheck;
    function keyCheck(e){
         var KeyId = (window.event) ? event.keyCode : e.keyCode;
         switch(KeyId){         
              case 113:
                   doSubmit('SAVE');
                   break;                    
              case 118:
                   alert('Hello');
                   break;
    </script>
    This script will submit page with request 'SAVE' if you press F2 or will show alert message if you press F7. Modify it to your issue.
    Regards,
    Przemek

Maybe you are looking for

  • Specific Vendor selection from a Customer for component in a Bulk Order

    We have a situation that for a Particular customer ordering Bulk they can only select an API based on Vendors Customer one orders Bulk A and API X but API X can only come from Vendor 1 Customer two orders Bulk A and API X but API X can only come from

  • Not sure how i should go about creating this flash to accomplish what i need.

    First let me start by saying my flash file is currently 740kb in .swf form and I'm not done with it. I'm taking this which was developed from another developer and trying to customize it to work for what i need. The flash was bought from template mon

  • Ready to blow my brains out

    I have a g5 1.6 from 10/03 and recently upgraded to 10.4.2. Have done all the updates. Upgraded to FCP hd4.5 I have hit or miss luck getting DVDs to burn after exporting through compressor 1.2.1 Can someone jump in and give me some direction. I have

  • "Recipient is a member of group" smart mailbox??

    Hello, I'd like all mails to and from a group to be collected in a smart mailbox. That option is not in the smart mailbox widget. Can anyone suggest a work around? This would allow me, for example, to build a smart group (in Address Book) with a comp

  • Problem building unique key in create (AttributeList) after cancel create ?

    Hallo, i have a create form. In the create process i build a unique key. protected void create(AttributeList attributeList) { super.create(attributeList); try { String strSQL = "select max(ver_nr) from verfuegungen where sts_id = ?"; PreparedStatemen