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

Similar Messages

  • How do i actionscript my flash button to play the sound while being transfered to another url?

    Hi!
    As the title says:
    How do i get my flash button to play my sound when i click on
    it while being transfered to another url?
    I did get it to work, but only when i set the script to
    "_BLANK". When i clicked the button then it played the sound and
    opened the url in a new window. I want it to be in the same window
    and still play the whole sound.
    Now i get just 1 or 2 sec then when im transfered, it stops
    playing the sound.
    I hope this explains it..... if any typo....its because im
    Swedish =)
    Thanks in advance!

    If you are jumping to another URL using the same window you
    cannot have a sound start on the press of a button and that sound
    to continue on.
    Reason
    You are removing all trace of the sound and the swf that
    contains that sound file.
    Work arounds
    1.Take a look at "frames". This way you are keeping the
    container page and opening another page inside of that page.
    2. Div's. again you are importing a page into a particular
    area yet keeping the swf, with the sound playing, in the parent
    frame.

  • Help with flash buttons actionscript 2.0

    Help please, I am not sure what I am doing wrong here. Each button has this script
    on (release) {
    getURL("http://www.mysite.com/index.html");
    Once they work I want to import them to dreamweaver.

    Do you happen to have any kind of rollover code tied to anything that is containing the buttons?  I don't see the sense in having Flash buttons unless you have some form of animation associated with them, possibly triggered by rollover interactions.  If so, the rollover may be blocking access to the on(release) interaction.

  • Flash Button Actionscript

    can anyone plz help me code my flash buttons in a drop down
    menu, a basic flash button in order to link my pages within
    dreamweaver.
    now this website has the drop down menu if you look at the
    top, i know how to create everything buttons,dropdown menus in
    flash but somehow i cannot get the buttons to link to my webpage
    within dreamweaver i tried
    the actionscrip
    On(Rollover)}
    getURL("Page")}
    but it doesn't work for my webpages but it does work to
    external pages like google.com
    noW, i know there is way to create this drop down menu or
    button thats why this page has it, im trying to make my website for
    my school and i would love to know how to code it. plz
    help..thanks

    unless your publishing for flash 6 or earlier, flash is
    case-sensitive and your code is incorrect. that should be:
    on(rollOver){
    getURL("Page.html"); // assuming Page.html is correct.
    }

  • How to SHOW/HIDE a dreamweaver layer from a flash button?

    I have almost 2 weeks tying to find a solution for this. Please help...
    -How can you SHOW/HIDE an thml-dreamweaver layer from a flash movie button.
    My html layer name is LAYER1, and my FlashMC botton name is FLBOT1
    Now, what is the actionscript that im suppouse to place in the flash button?
    Please respond, Thanks

    Adobe removed Flash Text and Flash Buttons from CS4 for accessibility reasons.  Flash buttons aren't web friendly.  And if you use this approach, you'll need to work in Flash because DW doesn't write Action Script for you.
    That said, you could do something similar without Flash.
    Pure CSS Disjointed Menu Rollovers
    http://alt-web.com/DEMOS/CSS-Disjointed-Menu-Rollover.shtml
    Pure CSS Disjointed Text Rollovers
    http://alt-web.com/DEMOS/CSS-Disjointed-Text-Rollover.shtml
    Show/Hide Layers with DW behaviors:
    http://www.cbtcafe.com/dreamweaver/showhidelayers/index.html
    Walter Zorn's Tooltips
    http://www.walterzorn.com/tooltip/tooltip_e.htm
    FloatBox Demos
    http://randomous.com/floatbox/demo
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.com/blogspot.com

  • Flash buttons problem

    Hi All,
    I am looking to attach this code to a flash button on click
    <form method="POST">
    <P><Input type="submit" value="table lamp on"
    name="run_event"></P>
    </form>
    the code above sends a command to run an event to my home
    automation server
    thanks in advance

    You cannot apply links to Flash elements using HTML. All
    interactivity in
    such elements MUST be done in Flash Actionscript.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "dirtymurt" <[email protected]> wrote in
    message
    news:frdutu$124$[email protected]..
    > Hi All,
    >
    > I am looking to attach this code to a flash button on
    click
    >
    > <form method="POST">
    > <P><Input type="submit" value="table lamp on"
    name="run_event"></P>
    > </form>
    >
    > the code above sends a command to run an event to my
    home automation
    > server
    > thanks in advance
    >

  • Flash button problem

    Hi
    I am quite new to actionscript but when building a simple app
    that calculates amounts when you press on a button it only works if
    I use a library button and not my customised one. I have checked
    that the button is a button symbol and has four states but whenever
    I use my own customised button I get error message...the library
    button works fine with the actionscript.
    Here is the error message I get with my custom button - any
    idea why?
    thanks
    Em
    **Error** Scene=Scene 1, layer=buttons, frame=1:Line 2:
    Invalid mouse event specified.
    on(click) {
    **Error** Scene=Scene 1, layer=buttons, frame=1:Line 3:
    Statement must appear within on handler
    with(_parent){
    **Error** Scene=Scene 1, layer=buttons, frame=1:Line 6:
    Unexpected '}' encountered
    Total ActionScript Errors: 3 Reported Errors: 3

    Know the type of button:
    1. Button Symbols made in library:
    on (press)
    on (release)
    on (rollOver)
    This appears the one you are deploying.
    See
    http://livedocs.macromedia.com/flash/8/main/00001752.html
    2. The Flash Button Component:
    ... where there is a click event handler
    http://livedocs.macromedia.com/flash/8/main/00003114.html
    3. Custom buttons created with a MovieClip Symbol.
    Use Actionscript and the methods for responding to events for
    example onRelease -
    http://livedocs.macromedia.com/flash/8/main/00002499.html

  • Flash button link AS 3.0

    I have a flash button link using actionscript 3.0. The animation is a fade in of a logo. The problem is that the button is only a link during the animation, ie. when the logo has fully faded in it stops becoming a link. Here is the actionscript code i am using, does anyone know where i am wrong? Thank you so much.
    import flash.events.MouseEvent;
    myButton.addEventListener(
    MouseEvent.CLICK, myButtonFunction);
    function myButtonFunction(event:MouseEvent):void {
    var request:URLRequest = new URLRequest("http://flightswitch.com/home.html");
    navigateToURL(request, "_self");

    Hi,
    If the logo animation is completely fade then the link is not enabled?
    Is it?
    Disable the logo button after it fade.
    Saransoft

  • How can I change the function of a flash button?

    Hello,
    Not sure if this should go in the Flash forum or Captivate forum, but does anyone know how where to find ActionScript 3 commands for Captivate?
    I downloaded a pre-made Flash button (source file) for Adobe Captivate that was originally made to make a video go to the next slide, when pressed. It does that fine, but I wanted to know how to use the ActionScript code in Flash Professional CS5 to have the button JUMP to a specific slide in Captivate, instead of just go to the NEXT slide. I know generally how code works, but have never really used it, and don’t know the specific command to make that happen. Currently the relevant part of the code in the Flash button reads:
    function clicked(e:MouseEvent):void{
                    var myRoot:MovieClip = MovieClip(root);
                    var mainmov:MovieClip = MovieClip(myRoot.parent.root);
                    mainmov.rdcmndNextSlide = 1;
    I suspect that I just have to change the last line to something else and it should work, but I would need the command. Can anyone tell me what needs to be changed in the above code to make that happen?
    The full code is below. Thanks.

    You are awesome. Thank you. That was extremely helpful. Michael also gave me a list of variables to use. However, when I use:
    cpCmndGotoSlide = 5
    It always jumps to slide 9, regardless of the value I put in the place of the '5'. So it does jump to a slide, but I can't yet get it to jump to the slide I want. In other words,
    cpCmndGotoSlide = 7
    or
    cpCmndGotoSlide = 13
    or
    cpCmndGotoSlide = 44
    etc,
    produces the same result: jump to slide 9. I followed the same format... Any idea why it wouldn't be working?
    Here is the full script:
    this.stop();
    // Set up event listeners
    main.btn2_mc.addEventListener (MouseEvent.MOUSE_OVER, over);
    main.btn2_mc.addEventListener (MouseEvent.MOUSE_OUT, out);
    main.btn2_mc.addEventListener (MouseEvent.MOUSE_DOWN, clicked);
    // functions for eventlisteners
    function over(e:MouseEvent):void{
        main.button1_mc.gotoAndPlay("s1");
    function out(e:MouseEvent):void{
        main.button1_mc.gotoAndPlay("s2");
    function clicked(e:MouseEvent):void{
        var myRoot:MovieClip = MovieClip(root);
        var mainmov:MovieClip = MovieClip(myRoot.parent.root);
        mainmov.cpCmndGotoSlide = 5;   

  • Putting Hyperlinks into Flash Button Symbols

    Hi there,
    I just wanted to know how to put Hyperlinks into Flash Button
    symbols
    For example;
    I have a button which is named Home, and i have the UP, OVER,
    DOWN and HIT stages and wanted to put a
    Hyperlink to lets say Google so www.google.com.au and wanted
    it to open in the same page not a new tab.
    And if possible would like to know how to put multiple
    Buttons as one Flash File and have them all Hyperlinked to
    DIFFERENT Pages.
    I know very little Actionscript, but know what it is and
    other basics on it.
    I am using Adobe CS3 Flash 9 and would prefer a simple
    answer, Thank You

    Hi,
    There is a video tutorial for this on my website below.
    Hope this helps.
    Thanks
    Alan

  • Flash button that controls breeze play button

    Is it possible to create a flash button that is scripted to
    control the play and pause button on the breeze playbar? What I am
    looking for is a way to have a button that would start a slide
    again after it has stopped and is waiting for the user to start
    again.

    Hi!
    If you want to control the viewer with a Flash button you've
    embedded in a powerpoint slide (prior to using presenter to convert
    it) try this:
    (1) Make your button in Flash, and add this Actionscript to
    the first slide (replace [btnName] with the name of your button
    instance:
    btnName.onRelease = function () {
    _root.m_controlBar.m_slideNextBtn._onRelease();
    (2) Insert your button's swf in the PPT presentation and
    compile with Presenter. Now, when the user clicks the button, it
    will simulate pressing the "next slide" button in the viewer's
    control bar.
    Here are some of the other button names; to use these
    instead, just replace "m_slideNextBtn" in the above code:
    Play/pause button "m_playBtn"
    Next slide button "m_slideNextBtn"
    Previous slide button "m_slideBackBtn"
    View changer button "m_viewChangeBtn"
    Attachment Button "m_attachmentsBtn"
    Volume Button "m_volumeBtn"
    Hope that helps!
    ~Marc B

  • Flash button to show html layer

    I have embedded a Flash menu into an html doc with a hidden
    layer called player. I want a button in the Flash menu to show that
    layer. I used the instructions on this website:
    http://www.bestflashanimationsite.com/tutorials/1/2/
    But it doesn't work. I made a link on the html page that
    shows the layer, so the Dreamweaver MM_showHideLayers function is
    there in the html head. I tried this in the button actionscript:
    on(press) {
    getURL("javascript:MM_showHideLayers('player','','show')");
    I also tried writing a custom function in the html which does
    work from a button in the html:
    function showPlayer() {
    MM_showHideLayers('player','','show')
    and then putting this in the Flash button:
    on(press) {
    getURL("javascript:showPlayer()");
    Which does not work. (following are the Dreamweaver
    functions)
    Please help!!!!!

    I use externalInterface (instead of getURL). Its a great way
    to call javascript functions from flash and vice-versa.
    http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveD ocs_Parts&file=00002200.html
    There are some links to examples in the comments below the
    description.

  • Importing Flash buttons into Flash

    I've created a nice button as a movie clip in Flash 10 CS4
    Actionscript 3 so that the button changes with mouse_over and it
    all works fine, both with Test Movie and separately playing the swf
    file. The problem is I want to use this button in a variety of
    Flash applications. I thought all I would have to do was to export
    the button as swf and then import it into the new Flash program as
    a button symbol and add the ActionScript code for mouse_click etc.
    I didn't expect to be able to edit the button in the new program,
    but I thought it would run OK. What happens is that the button
    appears, but all the movie clip behaviour is missing -- it's just a
    static object that doesn't respond to mouse_over. I've tried
    importing it as a button and as a movie clip -- neither works.
    Given my primitive experience of ActionScript and Flash, the only
    work around I can think of is to put all the ActionScript code for
    the button in each application. This will be a big task, as various
    layers and scripts are involved.
    There must be something simple that I am missing, but I can't
    seems to find this problem addressed anywhere. Most people seem to
    want to use their Flash buttons in non-Flash applications like html
    web pages. Help, please, from someone who can make Flash sing and
    dance (or at least more than I can) ...

    You can copy and paste any item in the Library of one movie
    to the Library of a second movie. If you do that, you can get the
    button into your new movie. You will still need to bring the
    actionscript over from one movie to the other. You can do this in a
    similar copy and paste manner.

  • Linking a flash button to a html page

    Hi, I was wondering if anyone knew the best way to link a
    flash button to a page in DW?
    Thanks

    Place this actionscript into the hit area of your flash
    button, then export the flash as a .swf and place onto the
    dreamweaver page...
    on(release){
    getURL("YOUR_DESIRED_PAGE.html","_self");
    This will open the new html page in the same window. Hope
    that helps.
    You can get a cheap but awesome tutorial on Flash buttons
    here...
    http://www.cartoonsmart.com/smooth_buttons.html
    No, I don't know the guy and I don't get a commission. The
    tutorials really helped me, that's all.

  • Using own flash button - no link option

    Hey,
    This is probably a really dumb question, but I cannot figure
    out how to link my own imported flash button to a page on my site.
    If I select a button within DW, and click the edit option I'm
    presented with the option of linking the button. If I use my own
    button, clicking edit just puts me into Flash.
    I don't want to use the "getURL" within flash because it
    insists on too many security checks which would really ruin a
    visitor's experience to my site.
    Even in code view there is no hint as to a link referenced,
    so I can't even fudge around with the code!
    Any help would be appreciated.
    Thanks.
    PS.--Adobe: maybe offer a "suggested username" when
    registering for your forums - not really my preferred choice of
    nick, but got fed up after 20 attempts to choose one.

    You cannot apply an HTML link to a Flash element. That link
    must be part of
    the Actionscript.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Biscuit666" <[email protected]> wrote in
    message
    news:etfnt9$afg$[email protected]..
    > Hey,
    > This is probably a really dumb question, but I cannot
    figure out how to
    > link
    > my own imported flash button to a page on my site.
    >
    > If I select a button within DW, and click the edit
    option I'm presented
    > with
    > the option of linking the button. If I use my own
    button, clicking edit
    > just
    > puts me into Flash.
    >
    > I don't want to use the "getURL" within flash because it
    insists on too
    > many
    > security checks which would really ruin a visitor's
    experience to my site.
    >
    > Even in code view there is no hint as to a link
    referenced, so I can't
    > even
    > fudge around with the code!
    >
    > Any help would be appreciated.
    >
    > Thanks.
    >
    > PS.--Adobe: maybe offer a "suggested username" when
    registering for your
    > forums - not really my preferred choice of nick, but got
    fed up after 20
    > attempts to choose one.
    >
    >

Maybe you are looking for

  • Wpc content in KM tab in portal

    HI when i am working with webpage compsoser in order to create a website i have enabled wpc_editor_role but inside the website management i could see nothing. Instead i did not find any wpccontent in teh KM content tab Can anyone please let me know h

  • How to find custom forms in FND_FORM

    Hi All, I Retrieved data from fnd_form table.I got total forms.But i want only custom forms.How to find custom forms.How to retrieve only custom forms. Thanks& Regards, Raghu

  • Query For Linking Activity

    Dear All, I need your help in writing a query. My Scenario is as follows: I add an Activity whose Code is 95. Now using activity no. 95, I make a follow-up whose no. is 103. Now using 103, I create another follow-up, no. is 110. And using 110 I creat

  • Quicktime heavy weight components

    Hi guys, Im using the QT java api and have hit some problems with their AWT video window component. The reason I'm posting here rather than the QT forums is that I believe this problem is common to all heavy weight components in Java. Ok, the QT api

  • Waste management scenario

    Hi Team, Please write me steps involved in "Waste management scenario". What are the T-Codes. What master data is required. Thanks