Multiple Button Functions - Help!

I'm designing an interface for a class, and the buttons that I am using all have multiple functions.
For example, when the story button is clicked, I need the mc to stop playing and change to text (in the same window/screen, just no mc playing).  The mc is 31 frames long, but if there's a way to just make it loop continuously until told not to, I'd appreciate the help with that as well.
Currently, my code looks like this:
stop();
story_btn.addEventListener(MouseEvent.CLICK,story);
function story(event:MouseEvent):void {
gotoAndStop(32);
credits_btn.addEventListener(MouseEvent.CLICK,credits);
function credits(event:MouseEvent):void {
gotoAndStop(35);
credits_btn.onPress=function(){
credits_btn.onRelease = function(){
downloads_btn.addEventListener(MouseEvent.CLICK,dwnlds);
function dwnlds(event:MouseEvent):void {
gotoAndStop(40);
downloads_btn.onPress=function(){
downloads_btn.onRelease = function(){
characters_btn.addEventListener(MouseEvent.CLICK,chars);
function chars(event:MouseEvent):void {
gotoAndStop(45);
characters_btn.onPress=function(){
characters_btn.onRelease = function(){
options_btn.addEventListener(MouseEvent.CLICK,opt);
function opt(event:MouseEvent):void {
gotoAndStop(50);
options_btn.onPress=function(){
options_btn.onRelease = function(){
When I click the button, the mc does not stop playing and the text does not show up.  How can I fix this?
I'm really stuck here.  Any help is appreciated!

here's a simple click handler. You'll need to add whatever it is you want to happen on those frames you're going to.
//CODE START
//asuming thes are the names of your buttons
var buttons:Array = new Array(story_btn,credits_btn,downloads_btn,characters_btn,options_btn);
for each(var btn in buttons){
     btn.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(event:MouseEvent):void{
     staticMC.visible = false;
     switch event.target.name{
          case "story_btn":
          gotoAndStop(32)
          break;
          case "credits_btn":
          gotoAndStop(35)
          break;
          case "downloads_btn":
          gotoAndStop(40)
          break;
          case "characters_btn":
          gotoAndStop(45)
          break;
          case "options_btn":
          gotoAndStop(50)
          break;
// CODE END
HTH
-Ted

Similar Messages

  • Can multiple button actions be implemented by creating just one RFC?

    Hi All,
         I wanted ask a general question "is it possible to create just one RFC for multiple button actions such as delete, insert, search, modify, copy".
       I tried using one RFC for all the above mentioned actions but I wasn't able to consistently get expected results. So, I just want to confirm from SDN forum members that is it a good practice or is it advisible to create individual RFC for each button actions?
    Earlier responses would be much appreciated.
    Thanks
    Uday

    Hi,
    I did not see any problem for that creation on multiple button actions such as delete, insert, search, modify, copy".  These actions depending up on your RFC.
    For Example. Your RFC having Insert and Delete Functionality you can develop these two Actions. i.e is depending upon your requirement and Depending upon you r RFC functionality. That
    RFC donu2019t gave insert, Delete, modify these functionalities no need to create these Actions.
    So there is no restriction for call the RFC Via Actions(buttons)
    Hope this is help full for u
    Regards
    Vijay

  • IPhone SDK - Multiple buttons calling the same IBAction

    Hi,
    Can I call the same action with multiple buttons? I´ve just connected
    the action to the buttons in interface builder, but in the header file
    I can´t use - (IBAction)setOperator: (id)sender; as the parameter to the function, it always crash due to uncaught exception. If I use - (IBAction)setOperator; it
    works, but i can´t differentiate wich button was pressed.
    I don´t know if i can set the (id)sender parameter in the interface
    builder. Can anyone help me?
    Thanks,
    Pitteri

    .h file:
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    @interface CalculatorView : UIView {
    IBOutlet UITextField *txtResult;
    IBOutlet UIButton *btnMult;
    IBOutlet UIButton *btnDiv;
    @property (nonatomic, retain) UITextField *txtResult;
    @property (nonatomic, retain) UIButton *btnMult;
    @property (nonatomic, retain) UIButton *btnDiv;
    - (IBAction)setOperator:(id)sender;
    @end
    .m file:
    #import "CalculatorView.h"
    @implementation CalculatorView
    @synthesize btnDiv, btnMult, txtResult;
    - (IBAction)setOperator:(id)sender{
    //if btnMult pressed
    //bla bla bla
    //if btnDiv pressed
    //bla bla bla
    that´s my code. Hope u can help.
    thanks
    @end

  • How to use one pop up window for multiple buttons and input fields?

    Hi Experts,
    I have created a pop up window that will be opened from multiple buttons in the same view. There are input fields that the data will be populated from a pop up window.  How can I set up which button that a pop up window is opened from? I also would like to populate the data from a pop up window to the input field next to a clicked button. There are 6 buttons and 6 input fields that share the same pop up window. I would very appreciate your responses.
    Thank you,
    Don

    Hi,
    Try creating 2 context attributes, one in your component controller and the other in the pop-up view. Bind the attribute of pop-up view to the component controller attribute.
    In the main view, on click of every button set a unique code in the controller's context which helps you in identifying the button clicked. Since u have created a binding to the pop-up view attribute the value flows from the controller.
    In the init method of your pop-up view, check the value of the attribute and based on that display which ever UI elements are required.
    Eg:
    On Button 1 click set value "B1", Button 2  value "B2" etc. In the init() of pop-up view u can check the values and perform the required operation:
    if(("B1").wdContext().currentContextElement().getButtonIdentifier()){
    else...{
    Hope this helps you.
    Regards,
    Poojith MV

  • How to use the same script for multiple buttons

    Hi,
    I've only just started using flash so any help would be great!
    I'm creating a blockbusters type game, I have a grid of 20 buttons and I need  them (individually) to turn blue on click and red on double click. I've managed to do it with the first one using this code;
    var clicked:Boolean = false;
    bn1.addEventListener(MouseEvent.CLICK, bn1click);
    function bn1click(event:MouseEvent):void {
        clicked = true;
        var newColorTransform:ColorTransform = bn1.transform.colorTransform;
        if(clicked){
        newColorTransform.color = 0x064258;
        bn1.transform.colorTransform = newColorTransform;
    bn1.doubleClickEnabled = true;
    var doubleclicked:Boolean = false;
    bn1.addEventListener(MouseEvent.DOUBLE_CLICK, bn1dclick);
    function bn1dclick(event:MouseEvent):void {
        doubleclicked = true;
        var newColorTransform:ColorTransform = bn1.transform.colorTransform;
        if(clicked){
        newColorTransform.color = 0xac1e23;
        bn1.transform.colorTransform = newColorTransform;
    Now I'm having trouble getting the same to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and remain blue/red once clicked. I've tried listing them as addEventListener commands but not having a great deal of success!
    Any help would be greatly appreciated, thanks!
    Tomo

    One way to do this is to use arrays to keep track of the buttons and their properties.
    var buttonList:Array = new Array(bn1,bn2,bn3);
    var clickedList:Array = new Array();
    var doubleClickedList:Array = new Array();
    //then use a for loop to assign the functions and properties for each button:
    var thisMany:int = buttonList.length; // this will give you the number of items in the buttonList array
    for(var i:int = 0; i<thisMany; i++) {
         buttonList[i].addEventListener(MouseEvent.CLICK,btnClick); // assign the click function to each button
         buttonList[i].addEventListener(MouseEvent.DOUBLE_CLICK,btnDClick); // assign the double click function
         clickedList.push(false);  // add a false value for each button to this array
         doubleClickedList.push(false);
               buttonList[i].doubleClickEnabled = true; // set the double click property for each button
    function btnClick(event:MouseEvent):void {
              var thisButton:int = buttonList.indexOf(event.target);  // figure out which button was clicked as an item in the array
              clickedList[thisButton] = true;  // change the value in the array
               var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
        if(clickedList[thisButton]){
        newColorTransform.color = 0x064258;
        buttonList[thisButton].transform.colorTransform = newColorTransform;
    function btnDClick(event:MouseEvent):void {
              var thisButton:int = buttonList.indexOf(event.target);
              doubleClickedList[thisButton] = true;
        var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
        if(doubleClickedList[thisButton]){
        newColorTransform.color = 0xac1e23;
        buttonList[thisButton].transform.colorTransform = newColorTransform;
    Now you can have any number of buttons, just add their instance names to the array at the top.

  • Override "Email a Page link" in ribbon button functionality in SharePoint 2013

    Hi,
    I want to override "Email a Page link" ribbon button functionality on the ribbon control.
      <CustomAction Id="Ribbon.WikiPageTab.Share.EmailPageLink"
                    Location="CommandUI.Ribbon"                
                    Title="Custom Email this page">
        <CommandUIExtension>
          <CommandUIDefinitions>
            <CommandUIDefinition Location="Ribbon.WikiPageTab.Share.EmailPageLink">
              <Group
              Id="Ribbon.WikiPageTab.Share"
              Sequence="30"
              Command="ShareGroup"
              Description=""
              Title="$Resources:core,cui_GrpShare;"
              Image32by32Popup="/_layouts/15/$Resources:core,Language;/images/formatmap32x32.png?rev=23" Image32by32PopupTop="-137" Image32by32PopupLeft="-103"
              Template="Ribbon.Templates.Flexible2"
              >
                <Controls Id="Ribbon.WikiPageTab.Share.Controls">
                  <Button
                    Id="Ribbon.WikiPageTab.Share.EmailPageLink"
                    Sequence="10"
                    Command="CustomEmailPageUrl"
                    Image16by16="/_layouts/15/$Resources:core,Language;/images/formatmap16x16.png?rev=23" Image16by16Top="-115" Image16by16Left="-19"
                    Image32by32="/_layouts/15/$Resources:core,Language;/images/formatmap32x32.png?rev=23" Image32by32Top="-137" Image32by32Left="-511"
                    LabelText="$Resources:core,cui_ButEmailLink;"
                    ToolTipTitle="$Resources:core,cui_ButEmailLink;"
                    ToolTipDescription="$Resources:core,cui_STT_ButEmailLinkPage;"
                    TemplateAlias="o1"
                   />
                </Controls>
                  </Group>
            </CommandUIDefinition>
          </CommandUIDefinitions>
          <CommandUIHandlers>
            <CommandUIHandler Command="CustomEmailPageUrl" CommandAction="javascript:alert('Hello, world');" />
          </CommandUIHandlers>
        </CommandUIExtension>
      </CustomAction>
    Any help would be appreciated.
    Rajasekar A.C

    Hi,
    According to your post, my understanding is that you wanted to override the “E-mail a Link” button on the Ribbon.
    I had created a simple demo to override the “E-mail a Link” button on the Ribbon, you can have a look at it.
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="Ribbon.Library.Actions.OverrideEmailLinkButton" Location="CommandUI.Ribbon" RegistrationId="101" RegistrationType="List" Title="Display the UniqueId for the list item.">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.Library.Share.EmailLibraryLink">
    <Button Id="Ribbon.Library.Share.EmailLibraryLink.ReplacementButton" Command="ReplacementButtonCommand" Image16by16="http://s10.postimage.org/lhar0oijp/U16.png" Image32by32="http://s17.postimage.org/trf3y2ui3/U32.png" LabelText="Replaced Button" TemplateAlias="o2" />
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="ReplacementButtonCommand" CommandAction="javascript:alert('This button has been replaced.');" />
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    </Elements>
    More reference:http://msdn.microsoft.com/en-us/library/office/ff407619(v=office.14).aspx
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Not able to use multiple grid function in smartview

    Hi,
    One of my client want to use multiple grid function in Hyperion smartview and he was using latest version of Hyperion smartview 11.1.2.5. But still that feature was not enabled in smart view.
    Our's is windows environment and essbase server version 11.1.2.1 and APS version 11.1.2.1.
    Can anyone please help me to resolve this issue.
    Please let me know if i might missed anything or still if any info required.
    Thanks in Advance.
    Thanks,
    Kumar.

    Thanks for your help Celvin. I will try to apply the path for both APS and essbase server and will check.
    Thanks once again.
    Regards,
    Vinay Kumar.

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • How to make next and previous button function

    Hello
    Can anybody help me with how to achieve next and previous button function such as the one at www.bestbuy.com?
    I would appreciate any help or suggestion.
    Thank you!

    if you're not familiar with flash it might be easiest to place your initial "page" in frame 1, the 2nd (or next) page in frame 2, the 3rd/next page in frame 3 etc.
    place your previous and next buttons in their own layer that spans the main timeline (which will have as many frames as you have "pages").  give them instance names (say prevBtn and nextBtn).
    you can then use the following code placed in frame 1:
    var tl:MovieClip=this
    prevBtn.onRelease=function(){
    tl.prevFrame();
    nextBtn.onRelease=function(){
    tl.nextFrame();

  • Thumbnail and button navigation help

    I would like to start out by saying I am very new at this and am working on a portfolio website in flash CS4 and currently getting help through the tutorials over at Lynda.com. Now my problem is In the portfolio section I want a preview of the pics like a thumbnail on the bottom with a scroll bar to scroll through them all, but at the same time I would like to have buttons to navigate through these photos at the same time. I have got it to work, the only problem is let say i'm using the buttons to navigate through but then stop and go to the scroll bar on the bottom and click on one three of four pictures in front of where I left off, The image loads and everything is fine but when I go back to the buttons it continues off from where it last left off not where I clicked on the scroll bar. Not sure if you can follow that but if not ask questions I really have no clue on how to do this so any help is greatly appreciated.
    Here is the code that I currently have:
    myscrollpane.source=allthumbnails;
    //load the thumbnails...
    var thumbLoader:Loader = new Loader();
    thumbLoader.load(new URLRequest("smallthumbs/portfolio01.jpg"));
    thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
    function thumbLoaded(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader);
    myscrollpane.update();
    thumbLoader.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio01.jpg";
    var thumbLoader2:Loader = new Loader();
    thumbLoader2.load(new URLRequest("smallthumbs/portfolio02.jpg"));
    thumbLoader2.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded2);
    function thumbLoaded2(event:Event):void {
    allthumbnails.addChild(thumbLoader2);
    thumbLoader2.x=118;
    myscrollpane.update();
    allthumbnails.buttonMode=true;
    thumbLoader2.addEventListener(MouseEvent.CLICK, loadMainImage2);
    function loadMainImage2(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio02.jpg";
    var thumbLoader3:Loader = new Loader();
    thumbLoader3.load(new URLRequest("smallthumbs/portfolio03.jpg"));
    thumbLoader3.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded3);
    function thumbLoaded3(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader3);
    thumbLoader3.x=236;
    myscrollpane.update();
    thumbLoader3.addEventListener(MouseEvent.CLICK, loadMainImage);
    function loadMainImage(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio03.jpg";
    var thumbLoader4:Loader = new Loader();
    thumbLoader4.load(new URLRequest("smallthumbs/portfolio04.jpg"));
    thumbLoader4.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded4);
    function thumbLoaded4(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader4);
    thumbLoader4.x=354;
    myscrollpane.update();
    thumbLoader4.addEventListener(MouseEvent.CLICK, loadMainImage);
    function loadMainImage(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio04.jpg";
    var thumbLoader5:Loader = new Loader();
    thumbLoader5.load(new URLRequest("smallthumbs/portfolio05.jpg"));
    thumbLoader5.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded5);
    function thumbLoaded5(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader5);
    thumbLoader5.x=472;
    myscrollpane.update();
    thumbLoader5.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio05.jpg";
    var thumbLoader6:Loader = new Loader();
    thumbLoader6.load(new URLRequest("smallthumbs/portfolio06.jpg"));
    thumbLoader6.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded6);
    function thumbLoaded6(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader6);
    thumbLoader6.x=590;
    myscrollpane.update();
    thumbLoader6.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio06.jpg";
    var thumbLoader7:Loader = new Loader();
    thumbLoader7.load(new URLRequest("smallthumbs/portfolio07.jpg"));
    thumbLoader7.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded7);
    function thumbLoaded7(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader7);
    thumbLoader7.x=708;
    myscrollpane.update();
    thumbLoader7.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio07.jpg";
    var thumbLoader8:Loader = new Loader();
    thumbLoader8.load(new URLRequest("smallthumbs/portfolio08.jpg"));
    thumbLoader8.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded8);
    function thumbLoaded8(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader8);
    thumbLoader8.x=826;
    myscrollpane.update();
    thumbLoader8.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio08.jpg";
    var thumbLoader9:Loader = new Loader();
    thumbLoader9.load(new URLRequest("smallthumbs/portfolio09.jpg"));
    thumbLoader9.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded9);
    function thumbLoaded9(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader9);
    thumbLoader9.x=944;
    myscrollpane.update();
    thumbLoader9.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio09.jpg";
    var thumbLoader010:Loader = new Loader();
    thumbLoader010.load(new URLRequest("smallthumbs/portfolio010.jpg"));
    thumbLoader010.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded010);
    function thumbLoaded010(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader010);
    thumbLoader010.x=1062;
    myscrollpane.update();
    thumbLoader010.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio010.jpg";
    var thumbLoader011:Loader = new Loader();
    thumbLoader011.load(new URLRequest("smallthumbs/portfolio011.jpg"));
    thumbLoader011.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded011);
    function thumbLoaded011(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader011);
    thumbLoader011.x=1180;
    myscrollpane.update();
    thumbLoader011.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio011.jpg";
    var thumbLoader012:Loader = new Loader();
    thumbLoader012.load(new URLRequest("smallthumbs/portfolio012.jpg"));
    thumbLoader012.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded012);
    function thumbLoaded012(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader012);
    thumbLoader012.x=1298;
    myscrollpane.update();
    thumbLoader012.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio012.jpg";
    var thumbLoader013:Loader = new Loader();
    thumbLoader013.load(new URLRequest("smallthumbs/portfolio013.jpg"));
    thumbLoader013.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded013);
    function thumbLoaded013(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader013);
    thumbLoader013.x=1416;
    myscrollpane.update();
    thumbLoader013.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio013.jpg";
    var thumbLoader014:Loader = new Loader();
    thumbLoader014.load(new URLRequest("smallthumbs/portfolio014.jpg"));
    thumbLoader014.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded014);
    function thumbLoaded014(event:Event):void {
    //add the thumbnail to the allthumbnails instance
    allthumbnails.addChild(thumbLoader014);
    thumbLoader014.x=1534;
    myscrollpane.update();
    thumbLoader014.addEventListener(MouseEvent.CLICK, loadMainImage1);
    function loadMainImage1(event:MouseEvent):void {
    largeUILoader.source="largeimages/portfolio014.jpg";
    //added the next button function
    next_btn.addEventListener(MouseEvent.CLICK,nextImage);
    //variable is a container that holds some value...
    var imageNumber:Number=1;
    function checkNumber():void {
    next_btn.visible=true;
    back_btn.visible=true;
    //if the imageNumber is = 14,then do something...
    if (imageNumber==14) {
    trace(imageNumber);
    next_btn.visible=false;
    //if imageNumber is = 1, then dont show back button..
    if (imageNumber==1) {
    trace(imageNumber);
    back_btn.visible=false;
    checkNumber();
    function nextImage(evtObj:MouseEvent):void {
    trace("nextimage");
    //adding to the current value+1
    imageNumber++;
    largeUILoader.source="largeimages/portfolio0"+imageNumber+".jpg";
    checkNumber();
    //added the back button function
    back_btn.addEventListener(MouseEvent.CLICK,backImage);
    function backImage(evtObj:MouseEvent):void {
    trace("backimage");
    //subtract 1 from the current value...
    imageNumber--;
    largeUILoader.source="largeimages/portfolio0"+imageNumber+".jpg";
    checkNumber();

    You need to have each thumbnail change the value of the variable imageNumber when you select from the thumbnails.  You can see how it changes when you use the next and previous buttons, but there's nothing to change it when you select a thumbnail that I can readily see.

  • Button Function Failure on Adobe Content Viewer

    Why do the button functions work well the first time I view them on my iPad's Adobe Content Viewer but do not function properly in subsequent viewings?
    For example, the next page buttons work flawlessly during the first viewing on the iPad. But from the second time they functions awkwardly. The Next page button on Page 1 stops functioning. The one on Page 2 takes me back to Page 1.

    Same issue-- and it's been  a few weeks now.  As far as I can tell it is a waiting issue
    This is from Page 68 from USING DIGITAL PUBLISHING SUITE
    help.adobe.com/en_US/digitalpubsuite/.../digitalpubsuite_help.pdf
    Last updated 3/23/2012
    Use the iPad Viewer to preview content
    The Adobe Content Viewer for the iPad is a generic version of the viewer used for testing the digital content you create on the iPad. The iPad viewer is updated whenever the Folio Producer tools are updated.
    Note: However, when a new set of tools is released, folios you create with those tools may not work properly until Apple approves the new viewer version. If you try to open the folio, a “Please update your app” message appears. If you have a Professional or Enterprise account, you can create a custom version of the Adobe Content Viewer. See
    “Create a custom Adobe Content Viewer for iPad” on page
    98. Otherwise, hold off on updating the tools or use the Desktop Viewer until Apple approves the updated viewer.

  • How prevent simultaneous execution of multiple button threads?

    My AS 3 program has multiple buttons. Users can select one and then immediately select another and this causes 2 threads that collide.  Once one button is executing, I want the other buttons to ignore clicks.
    I've tried using a lock:Boolean to indicate a button is being processed.  Each button checks lock.  My logic is such that when the AS 3 processor detects a locked condition, it abandons execution of that button.  However, surprisingly, it abandons execution only termporarily ... once the the boolean is unlocked, AS 3 comes back and executes the button.
    The problems are twofold:  1)  the first time the 2nd button attempts to execute (by checking lock), when it returns (from checking lock) and attempts to pick up processing where it left off, it seems to forget where it was and does not utlimately complete its task(s); possibly variables have been altered, it is difficult to say.  That is, AS 3 is unable to successfully pickup where it left off on the first button.
    2) the second problem is that AS 3 incorrectly returns to button 2 after the lock condition is cleared.  It persists and will execute that button.
    Can anyone tell me how once one button is selected, the others can be locked out and won't execute??  Multiple threads from these buttons is a problem.
    Thanks in advance.
    Steve @ U Iowa

    dmennenoh - OK.  The downside to that type of solution is that each button has to "know" which other buttons are on the stage at that time, but, yes, that should work.  Do you think turning their visibility off would or would not be as effective as removing the event listeners?  I'm thinking turning visiblity on or off is simpler and simpler to manage.  Thanks for your help.

  • The Problem is about Standard Back Button Function in the Report Program.

    The Problem is about Standard Back Button Function in the Report Program.
    In the Report,First call screen Then Using "write" output some information,That is ok. but In the GUI When I press back button that is standard button,it exit screen to program.
    My question is how can i do When i press back button,the screen can be back forward first screen instand of exit screen to program. Thanks .

    Hi,
    You can define your own PF-STATUS and in that assign the function code for BACK button anything except 'BACK'.
    The code would somewhat look like this:
    SET PF-STATUS 'TEST'.
    write : itab-col1,
               itab-col2.
    in the PF-STATUS 'TEST', assign the function code to BACK button as 'BCK'.
    Now in your program you can use the event AT USER-COMMAND.
    In this you can handle the functionality of BACK button.
    Hope this helps.
    Regards,
    Himanshu

  • Notes interaction pauses slide that contains multiple buttons

    I have several slides, each with a Notes Interaction. As advised, each of the notes is set to Rest of Project and are not resized.
    On the slides with a Notes Interaction, there are multiple buttons made out of Smart Objects. When a button is clicked, an advanced action causes a certain text caption to appear.
    The problem is that the buttons work UNTIL the Notes Interaction appears on the slide. As soon as the Notes Interaction appears, the slide seems to be paused and the buttons that are supposed to show text captions no longer work.
    I'm hoping that someone can help with a solution to this.
    By the way, this only seems to happy when previewing in HTML web browser.

    Jay,
    I had replied in an earlier thread that you need to have ONLY ONE notes interaction in the entire project - Not on every slide. The interaction is designed to be placed only once inside a project. So, placing it in the first slide of your project and setting 'Rest of Project' on it should cater to your need.
    You can choose slide notes or project based notes in the edit panel of the interaction.
    Marcellus

  • How do I total across multiple Tables? Help!

    how do I total across multiple Tables? Help!
    I feel like a complete noob.

    Hi Marc,
    There is no function explicitly for that sort of array calculation in Numbers.
    My favorite way is to use a list of Table Names and the INDIRECT(ADDRESS) function combination to produce a SUM across tables. I'm making the assumption that you want to do something like adding up all the values in a particular cell of multiple tables.  For example "give me the total of all the A1 cells in tables T1, T2, T3 and T4".  For this I would use the formula:
    =INDIRECT(ADDRESS(1,1,1,,A))
    to grab the cell contents of the table names mentioned in column A of a summary table.  Once you have them collected in your summary table, add them up.
    Here's a screen shot...
    Hope that gives you an idea for approaching this problem.
    Jerry

Maybe you are looking for