Adding actionscript to a button?

For some reason, my actionscript on my button is not working.
I did a button in Photoshop, imported into the library, dragged it
onto the stage and what it does is fade in and then stays normal,
which I have converted into a button. But now when I click that
button and add actionscript:
"on (release) {
getURL("
http://www.google.com");
It doesn't work for some reason. =/
my problem:
http://mu.thesixthdesign.com/banner_backupExact.html
Try clicking 'free trial' or demo'; I haven't added any
actionscript to most of the other buttons yet, since it's not
working. >_<
Any help is super appreciated.

Adriennee wrote:
> For some reason, my actionscript on my button is not
working. I did a button in
> Photoshop, imported into the library, dragged it onto
the stage and what it
> does is fade in and then stays normal, which I have
converted into a button.
> But now when I click that button and add actionscript:
>
> "on (release) {
> getURL("
http://www.google.com");
> }"
>
> It doesn't work for some reason. =/
Action looks a OK.
Perhaps you apply it after you apply the tween ?
If you add action after you add the tween, the action only
appear
on first or last frame of the tween, not throughout.
Try to add an action first than apply the tween.
Other than that... not sure, it all looks ok.
Perhaps you could upload it somewhere so we can check out the
source
file.
Best Regards
Urami
!!!!!!! Merry Christmas !!!!!!!
Happy New Year
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami>

Similar Messages

  • User exit/ BADI in f-32 / f-28 for adding application tool bar button

    Hi Experts,
    There is a requirement, for adding application tool bar button in the Transaction codes F-32 / F-28 / Feba_lockbox. So that while clearing documents with reference document, they can upload the data(Reference Documents) from local file and after the data is fetched for clearing, they need to download the data to local file for verification. If the data is verified to be okay, then they can go ahead with simulation and posting. They need this verification to be done in excel sheet, so need to download the data into local file.
    I found a BADI in that screen is BADI_LAYER but I don't think it is relevant.         
    Any help is apreciated!
    Is there any EXIT ? Because I can not find it too.
    Regards,
    Nitin

    where you did the enhancement?
    I have to create the IDOC once Clear docuemnt is created.. It may help me.

  • ActionScript on Flash buttons

    I am just getting back into using Captivate 2.0 to create
    some online training and I need some assistance using
    JavaScript/ActionScript in Flash buttons. I created a series of
    buttons that are part of a single Flash .swf file. I'm using these
    buttons as kind of a "main menu" and I would like each of the
    individual buttons in the exported Flash .swf file to perform one
    of the following functions:
    - Open another Captivate project in the same (parent) browser
    window, or...
    - Jump to a specific slide in the current project
    I layed out all the buttons in a single .swf file so I
    wouldn't have to import individual buttons into my Captivate
    project. So how do I define the ActionScript for each button in
    Flash to achieve these functions?
    Any help is greatly appreciated.
    Brian

    Hey Brian,
    You can easily open another .HTM file using Javascript, but
    doing so generally won't allow you to do any tracking of results.
    Successful results tracking pretty much requires that an LMS is
    launching each file. That said, opening a new file requires only
    the following line of Javascript, where the path can be either
    relative or absolute:
    window.location.href = "<path to new file>";
    As for jumping to a specific slide in a given file, Adobe
    Community Expert Paul Dewhurst contributed to a discussion topic in
    these forums that references using an undocumented internal
    Captivate array to navigate to a specific slide via Actionscript.
    You can check it out here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=67&catid=464&threadid =1149498&highlight_key=y&keyword1=variable

  • ALV Grid default values for new rows added with Add/Insert buttons

    Hi!
    Help, please,  to find a way how to set default values for new rows added with Add/Insert buttons in
    ALV Grid.

    I have found salution:
    ALV Grid u2013 Insert row function
    Sometimes we need to assign some default values when we create a new row in a grid using standard ALV Append row button. In our scenario we will see how to assign default values to Airline Code (CARRID), Flight Connection Number (CONNID) and Flight date (FLDATE) when a new row is created. To do that we need to handle DATA_CHANGED event in the program like mentioned below.
    Definition of a class:
    Code:
          CLASS lcl_event_receiver DEFINITION
    CLASS LCL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
    METHODS:
         handle_data_changed
         FOR EVENT data_changed OF cl_gui_alv_grid
         IMPORTING er_data_changed
                           e_ucomm.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    Implementation of a class:
    Code:
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
      METHOD HANDLE_DATA_CHANGED.
        DATA: dl_ins_row TYPE lvc_s_moce.   " Insert Row
          FIELD-SYMBOLS: <fs> TYPE table.    " Output table
    Loop at the inserted rows table and assign default values
        LOOP AT er_data_changed->mt_inserted_rows INTO dl_ins_row.
          ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
          loop at <fs> into ls_outtab.
            ls_outtab-carrid  = 'LH'.
            ls_outtab-connid  = '400'.
            ls_outtab-fldate  = sy-datum.
            MODIFY <fs> FROM ls_outtab INDEX sy-tabix.
          endloop.
        endloop.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    Register the events to trigger DATA_CHANGED event when a new row is created.
    Code:
        CALL METHOD OBJ_GRID->REGISTER_EDIT_EVENT
          EXPORTING
            I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
        CALL METHOD OBJ_GRID->REGISTER_EDIT_EVENT
          EXPORTING
            I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.

  • Adding text to a button.

    Can anyone tell me how to add text to a button I created? If it changes anything, it is a sub-menu button

    Hi:
    Sorry if it sounds like a RT_M answer, but look in the User Manual for the topic Adding Text to a Button and you'll get the step by step procedure.
    If it don't answer your question or you mean something different come back please !
      Alberto

  • Adding text to a button, and related button fun

    Ok, I'm new to AS3 (only been doing it for a couple weeks
    now, never really learned AS2), so help would be great, especially
    as the deadline was more then a week ago (not all my fault there)
    I put a text field inside a button and tried to put text in
    that button's text field via the following:
    hmm.. I'm new to the forum I guess... don't know if it added
    the code, the code is: instancenameofbutton.textfieldinstance.text
    = "play";
    Well that seems not to work... so how do I make it obey my
    auth-or-a-tah?
    Am I perhaps just slash dot syntax impaired?
    Trouble seem to be that putting text over the button blocks
    the event.. Is there another way to skin this cat?
    A related problem I haven't been able to fix is.. I have a
    text field with dynamic text.. numbers, and I want it to be bold.
    Where I'm at in trying to figure out the solution is that bold
    dynamic text needs to be specially embedded.. Well, I follow what
    the help system tells me to do.. and nothing seems to actually
    work. Is there a bug here or something?
    Ok, one last related thing.. I'm following the book on
    "things thou shalt not do" in that I have a good amount of moving
    transparent gradients... well 2 of them actually.. but then other
    transparent stuff all over the place that.. could be pushing things
    a little far. The frame rate's about 14 fps, screen size is only
    about 600x450, I am on an 8 core mac pro with a better then
    standard graphics card... seems to me that I've been able to get
    away with worse on older version of Flash on a G3 power mac bad in
    the day....
    Well when I tried to dynamically load mp3s, that's when
    things started going down hill! now buttons blink, sometimes aren't
    responsive at all.. I'm thinking maybe its that I've over laded the
    player and ought to think pulling back...
    I have on gradient spinning shape thing that I was
    controlling by actionscript using the enter frame thing.. when I
    disabled the code.. well things worked fine again... accept that
    one of my buttons stopped working.. which is mysterious... cause as
    far as I know the code wasn't touching that at all.. so I went back
    to buggy vill, cause at least then my buttons work! (most of the
    time).
    So the only thing I can think to try and do is to try and
    optimize stuff... the projects a bit of a rush job.. so it's "a
    little hack-e" ( well I confess that at my best things are probably
    "a little" hack-e, so this is really bad)
    So I'm thinking of just changing the code over to a timer
    thing, will that make it all groovy? I mean do you think? I seem to
    remember hearing something, somewhere, about the enter frame thing
    as having some issues somewhere...
    What's also kind of strange is that stuff gets strange when
    the mp3s are loaded.. There's only 4 of them, small little
    snippets.. which probably total only about 1MB or so.. so why
    should that make it trouble? Admittedly there's not a lot of
    compression on them, and there stereo but?
    Anyway.. I guess I'm just wondering if any of this sets of
    any red flags for anyone who actually knows what they are doing..
    probably not describing things well enough.. but you know, any help
    is appreciated :)

    same questions, same answers
    I'm new to AS3 too. I know the kind of frustration you face,
    especially when it comes to finding out the how's. So I'm giving
    answers rather than telling people where to look for them (for
    now).

  • Adding Script to a Button?

    Is there a way to add JavaScript to a button when creating an Interactive PDF in InDesign (CS6)? This Interactive PDF is being turned over to other developers, who need to tack on a Certificate/Completion process, which is called to from a script that I need to place in the document somewhere.
    Other issues: I know this is probably doable by opening the interactive PDF in Acrobat and adding the script from there - but I have to save the Interactive PDF as a SWF (the developers' process eliminates interactivity from a PDF.)
    Any ideas? Help?

    Perhaps the definition of windows is the issue. Flash swf
    movies are self
    contained in a web browser window web page. So opening an
    external image in
    a MovieClip is simply redrawing the Flash swf.
    If you are thinking of windows within the Flash movie, they
    will have to be
    within the confines of the Flash movie that is first
    launched. You can have
    MovieClips with externally loaded content appear as windows
    and even be
    draggable, but they will not be a separate web browser
    window.
    If you need the web browser to open another window and then
    load another
    Flash movie in it that does the loading, then you need to use
    getURL("
    http://www.domain.com/pagewithotherflashmoviecontainingloadjpg.html/",
    "_blank");
    However it seems it would be less files to simply use html in
    the other
    window page to show the jpg without the Flash movie doing the
    loading unless
    you are using Flash to animate the jpg in some fashion like a
    fade in or
    out.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "Chicca81" <[email protected]> wrote in
    message
    news:e92am7$58n$[email protected]..
    >I need some help to understand and find a way to script
    the loading of
    >pictures
    > on different window. I already tryed to use behaviours:
    adding the
    > following
    > script to a button:
    >
    > on (release) {
    >
    > //load Graphic Behavior
    > _root.Contenitore.loadMovie("Cornice 10.jpg");
    > //End Behavior
    >
    > }
    >
    > When I do test the movie though I realised that it
    doesn't work as I
    > expected.
    > The picture "Cornice 10" loads on a what I think to be a
    new window: the
    > Movie
    > Clip "Contenitore" but it doesn't appear to a different
    window. How should
    > I
    > procede then?
    >

  • Adding click property of Button via function?

    Hi,
    I am trying to add a button to a group in a Flex 4 application from within a function like this;
    public function addButton(myID:Number):void {
    var myButton:Button = new Button();
    myButton.id = ObjectUtil.toString(myID);
    myButton.label = "New Button "+myButton.id;
    myButton.click= textAlerter(myID);
    myGroup3.addElement(myButton);
    The label and id properties get added but not the click. T
    he error message says click is an undefined property for spark.components:Button.
    But it is a property when add it to the group like this;
    <s:Button id="myButton" label="My Label" click="myFunction();"/>
    What am I doing wrong?
    Thanks.

    Your code should look like
    public function addButton(myID:Number):void {
                    var myButton:Button = new Button();
                    myButton.id = ObjectUtil.toString(myID);
                    myButton.label = "New Button "+myButton.id;
                    myButton.addEventListener(MouseEvent.CLICK, clickHandler);
                    myGroup.addElement(myButton)
               public function clickHandler(event:MouseEvent):void {
                    // handle event here
                   textAlerter('yay '+Button(event.currentTarget).id);
    See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Interacti veObject.html#event:click
    The reason this works when you define
    <s:Button click="clickHandler(event)" />
    is that mxmlc is generating the code I wrote above for you.

  • Ideas for Adding a Quick Print Button to VA01 Overview Screen

    Problem Statement:
    Our users would like a "quick print" button on the VA01/VA02 application toolbar that immediately spools the Order Confirmation output to the printer.  Our users want to print the output on demand, i.e., they do not want the output to automatically be printed when the order is created because a printout is not always needed.  We already have condition records created with Dispatch Time set to 3 - Send with application own transaction.  However, it takes 7 or more clicks to print the output on demand by navigating the menu (Extras > Output > Edit...Further Data...etc.) and changing the Dispatch Time to 4 - Send immediately when saving.  This is a big ergonomic issue and a time killer.
    Although the number of clicks to print are less when printing the output from the VA02 initial screen (via menu Sales document > Issue Output To), this is not acceptable when creating new orders.  Really need an on-demand, quick print button on the VA01 screen.  As an aside, we have a totally custom transaction for preparing sales order data (shopping cart-like way of finding materials and entering required data) that then calls VA01 and fills in all of the information.  When saving in VA01, the user is returned to our Z-transaction so asking the user to subsequently run VA02 to print is not practical.
    Current Output Determination:
    We have custom output type ZBS0 (copy of BS0).  Condition records for print medium are set to Dispatch Time = 3.
    Questions:
    1.  Searching these forums, it appears custom code (extension or user exit?) can be written to call RSNAST00, or something similar, to automatically send output having a Dispatch Time = 3.  Where can I find more information on exactly how to do this?
    2.  Do transactions VA01 and VA02 (Overview screens) have extensions that allow a print button to be added to the application toolbar?  We would want to call the custom printing code from the button to send the output.
    Any feedback on how others have solved this problem would be greatly appreciated.
    Warm Regards,
    Rob
    P.S.  Using GuiXT is not an option for us.

    HI
    We had similar issues with printing packing list and picking list by the warehouse people.
    We created a new ztransaction with input fields of delivery number, output type, number of copies and a check box for repeat output(in case if the output was already printed).
    You can also create a new Z-transaction with input fields of Sales order number(mandatory field), output type (Default it with value of ZBS0), number of copies (default it with 1) and a check box. On executing the transaction You can provide a message if the output was already printed so that the user can select the check box to repeat the output and execute. You can also print multiple SO by giving a range value if required.
    If you do not want the user to enter the new ztransaction every time, try providing a menu path to the new z-transaction from the existing z-transaction which you are using for order entry.
    Hope this helps you.
    Thanks,
    Arun.S

  • Actionscript 3.0 - Button to open URL

    I'm attempting to have a basic FlashCS4 intro/splash screen for my  website, that after finished playing is a button that links to the  first page of my site.
    I have the animation created, I'm just having trouble actually  linking it to the page.
    When I test the movie, I get the error:
    TypeError: Error #1009: Cannot access a property or method of a null  object reference.
    at splash_fla::MainTimeline/frame66()
    Frame 66 being the frame with the button and actionscript on it:
    enter_btn.addEventListener(MouseEvent.CLICK,goThere);
    function  goThere(e:MouseEvent) {
    var request:URLRequest=new  URLRequest("*******");
    navigateToURL(request);
    I'm very much an AS3 beginner, so it may just be a simple fix, but  I'm at a loss. Any help would be greatly appreciated!

    If that is the only code you have, chances are your enter_btn is not named or is otherwise out of scope.  Instance names are assigned by selecting the object on the stage and assigning the name in the properties panel where it says instance name.  If you did that okay, then maybe the problem is that the code is executing where the button doesn't exist-- they need to be in the same frame (Not layer, just frame).
    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is not in the display list
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with different names assigned.
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • Adding a new toolbar button in IC to Save the transaction

    Hi,
    I want to add a new custom button to my IC Toolbar which would do save. I have gone through some blogs( http://it.toolbox.com/blogs/sap-crm/how-to-add-buttons-to-the-ic-webclient-toolbar-46764 ) and able to get a new button and subscribe an event to that button but the now which APIs to use to save the current transaction. Currently in the standard IC web UI , End button does the save and ends the call but my requirement is to only save.
    Please help on the save. I am on SAP CRM 5.2
    Thanks,
    Saurav.

    Closing this thread as I have raised same Question in other forum which is IC specific.
    Re: Adding new button in IC Toolbar to SAVE current transaction

  • Problems adding  url link to buttons in action Script 3

    each time I added it link 1 to the button on file i get these error messages-  
    1046: Type was not found or was not a compile-time constant: link1.
    1180: Call to a possibly undefined method link1.
    Warning: 3594: exec is not a recognized method of the dynamic class RegExp. var r:Object = p.exec(s);  
    This is the code I am using:   import flash.net.navigateToURL; import flash.net.URLRequest;  var link_one:link1;  link_one = new link1(); stage.addChild(link_one);  link_one.addEventListener(MouseEvent.CLICK, buttonClickHandler);  function buttonClickHandler(event:MouseEvent):void { var url:String = "http://www.masterpiececorp.com/ARMREF.htm"; var request:URLRequest = new URLRequest(url); navigateToURL(request); }    I have no other problems with link 3 or 4, just link 1  I still cannot get my urls link to movie clips on the flash  
    Can you upload flash here? if not I have a image capture I can use to have you look at my buttons  and action script code. i have been to every forum I know and not any have been helpful at all. This is my last hope.
    Very frustrated newbie  Gina T
    Message was edited by: gtaylor0406

    The way you had your code originally would be correct...
    var link_one:link1;
    link_one = new link1();
    addChild(link_one);
    The 1046 error is indicating it doesn't recognize the link1 class.  So the first thing you need to make sure of is that you have assigned the link1 class designation to whatever symbol that is in the library.

  • Adding icon to a button

    Hello
    When I put a JButton on a frame I see in Property Inspector , Visial tab a icon section which it's follow is "<none>"
    how I can use it for adding a icon to the button
    my mean is I want add an icon to button by Property Inspector , but I don't know how I can do it
    can you say to me ?
    thanks

    Hi,
    I don't think the property inspector will help you adding the icon because it needs to be added from the class loader path. In an older JCLient Demo we used the following class
    public class ImageLoader
       public ImageLoader()
       public ImageIcon getImageIcon(String name)
          return new ImageIcon(getClass().getResource(name + ".gif"));
    }This then could be called when setting the icon to a JButton at runtime, passing the icon name to it
    Frank

  • Adding actions to my buttons

    hi flash ppl!
    why am i getting a "current selection cannot have actions
    applied to it" msg in the actionscript window(f9), when i try to
    add an action to my button to point to a section of my text? pls
    pls help.
    Frustrated newbie

    are you sure its a button that you have created and not a
    graphic?

  • Actionscript for nav buttons

    hi guys,
    how can i set some actions to the buttons in my navigation so
    that when clicked, it plays an animation. when it gets to the end
    of this animation i want the movie to play another animation that
    leads into the next section of the site, depending on which button
    was clicked.
    so basically if youre in a section of the site (say news),
    when you select another section to go to (eg. contact), an
    animation will play that gets rid of all the news stuff on the
    screen and then comes back in with the contact animation - as to
    not have a direct cut to the next scene.
    i dont want to make eight or so animations that exit from the
    news section that have a different gotoAndPlay actions at the end
    of them. im just hoping there is some actionscript that i can put
    on each button to tell it what to do and where to go.
    hope ive explained this ok!
    thank you very much and i hope to hear from you.
    all the best,
    mark

    I would create a "movie instance" first of all the
    animation(s) itself. Make it as long as you like, but in my demo
    I'm using a movie instance (my animation) of about 15 frames. When
    someone clicks on a button in my demo here, I use a script that
    points to the relavant frame in which I want my animation to play:
    Example ( this script attached to button one, the top button of my
    nav)
    on (release) {
    gotoAndPlay("1");
    In this code its going right to frame #2 when the first
    button is pressed, as seen in the image below of my example, within
    the "frame name" layer. I gave the "Frame Label" the name "1". (I
    kept it simple)
    What that is doing is playing the animation I created (the
    word "loading" fading in and out) and placed in the "animation"
    layer that runs from frame #2 to frame #14. Then in the "action"
    layer, frame 15, I have the "stop" command.
    http://www.themekings.com/images/flashsample.jpg
    See an eample of the nav unit at:
    http://www.themekings.com/themestk/gamers/sectionx/demo.htm
    Its not as animated as you want it to be, but it should give
    you an idea as what to do.

Maybe you are looking for

  • Duplicate Item Filename problem

    Hello, I have a number of offline items I am eager to digitize. When I select any of them or all of them and select Batch Capture then press OK in the Batch Capture window I get a window that states "Duplicate Item Filename". It says "A file in use b

  • Contract Workflow problem

    Hi Frnds, I have got a problem with my contract. We have putted certain checks in workflow which doesnt allows the contract to go for aproval until the target value is changed. But what we see is that for a particular contract the workflow is going f

  • "Capacity in which acting" on the W-8BEN form

    Hello, what should I fill in the "*Capacity in which acting*" on the W-8BEN form?? I am an individual developer, not company. Thank you. Raymond

  • Deploying a single JSP file

    Hi All, I have installed weblogic server 9.2 on production environment . I have deployed a web application in exploded way, where i will be updated the JSP files frequently. Whenever a JSP file is updated , the changed are not taking place. Please su

  • SAP Solution Manager - SOLUTION_MANAGER

    Hello! Would there be available Solution Manager documentation somewhere which includes also Solution (SOLUTION_MANAGER) descriptions and implementation instructions?