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

Similar Messages

  • 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!

  • 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.

  • 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.

  • 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

  • Can anyone recommend any good books on leaning actionscript for flash?

    Can anyone recommend any good books on leaning actionscript
    for flash?
    Intermediate level
    I have been using flash for about 2 years more as a hobby
    than anything else, some websites etc but now I realise I am going
    to need to learn more actionscripting to do what I want, I have
    come to terms with the simple stuff like goto – basic
    variables – load mov – enough to programme up website
    navigation.
    I ideally want to learn more about the dynamic side of flash,
    mostly for designing user interfaces and websites etc
    I’m after a book that doesn’t get too heavy too
    fast yet I’m a little past the more basic functions
    Any thoughts?
    Cheers

    You appear to be stuck on iOS 4.2.1. That means up really have a 2G iPod. A real 3G can go to 5.1.1
    .To find compatible apps more app for 4.2.1 see:
    Old Apps
    VintApps 3.1.3 for iPhone, iPod touch, and iPad on the iTunes App Store
    apps for ios 4.2.1: Apple Support Communities
    Finding iOS 4.2.1 Apps Compatible with Older Devices - Apple Club
    HT4972 Touch Game 4.2.1 Apps: Apple Support Communities
    apps for 4.2.1 (also works for 3.1.3)
    Tip - Finding 4.2.1 apps that work on an...: Apple Support Communities
    4.2.1 iPod 2nd generation unable to use any...: Apple Support Communities

  • How to set the short cut key for buttons

    Hi
    I dont know how to set the short cut keys for the button...can u pls help me out

    Do you mean a short cut key for buttons at client side (web browser)? If yes, you could do it with JavaScript~~~ ^o^

Maybe you are looking for

  • N97 Bugs ant problems...

    Dear forum members... I have been used N97 RM505 for couple of months. I bought it brand new with 3 generations old fw. My problems with the phone started then! Very disappointing and embarrassing for Nokia, to be honest. Since I consider myself  "po

  • ABAP program fails  in process chain -'ABAP/4 processor: DBIF_NTAB_SQL_ER

    Hi Experts, I have an ABAP program in  process chain. It frequently fails in the chain . When i do repeat on it will run fine. Purpose of the program is to delete the content from open hub table. I can    'ABAP/4 processor: DBIF_NTAB_SQL_ERROR' . Wha

  • Adobe Illustrator thumbnail view in a Picture Library?

    We are using Adobe Illustrator and we need to see the thumbnails in a picture library.  All of the other images work, but not the AI files.   We got the 16x16 icons added for AI for the details view, but we haven't been able to figure out where the t

  • Jar run time problem

    Hi, I have an application in SWING where thumbnail images are being created at runtime and displayed in a ListCellRenderer. This is mainly used as a history feature where the user can click on that image and retrieve back the information. The problem

  • Purple/Pink screen when bringing Humax Youview box...

    Hi all A quick question. Has any user successfully solved the problem of the "purple screen" when using an HDMI connection from the box to the TV. I am using a BT Humax box with a Samsung LCD flat screen TV. I have upgraded my HDMI cable to a Triple