Buttons and ActionScript

Hi everyone just registered on the forum today, really need help, would appreciate your help.

Basically, I created 5 buttons on one layer. I'm now trying to associate each button to a Web site, but without success for the moment.

In order to make it easier for me that I need to set each button in its own layer and insert the following actionscript code, I inserted one of my buttons, I realized that maybe:

Stop()

home_btn.addEventListener (MouseEvent.CLICK, mouse click);

function mouseClick(event:MouseEvent):void

{

application of var = new URLRequest ("http://www.sign-technologies.net/");

navigateToURL (request, "_blank");

}

Copy the following code binds my first button 'home_btn' on my site, what remains is. When I run Flash it works, but when I click on the button in the real web browser it won't go to the Web page, so I'm stuck.

Another question: For convience sake is there a way I can have all the buttons in a single layer, but insert code that can separate one single button on the other? Someone at - it this code?

separate one single button on the other?   distribute the buttons?   change the layer? What you mean?

Tags: Adobe Animate

Similar Questions

  • How to create table of controls (Images, buttons) in ActionScript

    Hello!

    Could someone help with ActionScript and Playbook SDK?

    How can I create a two-dimensional array of controls (buttons, images, text fields) in ActionScript?

    And how do I use radio buttons in ActionScript?

    Hey,.

    keys and parts do not have ID like in html and javascript. That being said, its impossible to do it like that. the best approach is to create your own class that extends the LabelButton (or whatever component you need) and have an id property that is implemented. so, you can set a code personal to her. I've implemented what you asked below. You can apply this to other components as well enough to make changes to the class and modify the extension. Here is the code:

    LabelButtonTest.as (main application class):

    package
    {
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.MouseEvent;
    
        [SWF(width="1024", height="600", backgroundColor="#CCCCCC", frameRate="30")]
        public class LabelButtonTest extends Sprite
        {
            private var myButtons:Array;
    
            public function LabelButtonTest()
            {
                super();
    
                // support autoOrients
                stage.align = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
    
                /*
                 *  Initialize your array of 2 X N (in our case we will be using 10)
                */
    
                myButtons = new Array(new Array(), new Array());
    
                /*
                 * Now we set up our array, first doing the first row and
                 * set up 10 buttons with their own ID using the constructor
                 * for our custom class CustomLabelButton(ID)
                */
    
                for (var i:int = 0; i < 10; i++)
                {
                    var myBtn:CustomLabelButton = new CustomLabelButton(i);
    
                    myBtn.label = "Button " + i;
                    myBtn.setSize(100, 50);
    
                    myBtn.addEventListener(MouseEvent.CLICK, onClickEvent);
    
                    myButtons[0].push(myBtn);
    
                }
    
                /*
                 * We do the same for the second row of buttons, starting
                 * with 10
                */
    
                for (var i:int = 10; i < 20; i++)
                {
                    var myBtn:CustomLabelButton = new CustomLabelButton(i);
    
                    myBtn.label = "Button " + i;
                    myBtn.setSize(100, 50);
    
                    myBtn.addEventListener(MouseEvent.CLICK, onClickEvent);
    
                    myButtons[1].push(myBtn);
                } 
    
                /*
                 * Finally we cycle through our arrays and add them to our display
                 * this wil produce two rows of 10 buttons going accross
                 * each when clicked will call the funciton onClickEvent and
                 * trace out their ID to the debugger
                */
    
                for (var i:int = 0; i < 10; i++)
                {
                    var myBtn:CustomLabelButton = myButtons[0][i];
                    var xPos:int = (i * 100) + 10;
                    var yPos:int = 10;
    
                    myBtn.setPosition(xPos,yPos);
    
                    addChild(myBtn);
                }
    
                for (var i:int = 0; i < 10; i++)
                {
                    var myBtn:CustomLabelButton = myButtons[1][i];
                    var xPos:int = (i * 100) + 10;
                    var yPos:int = 60;
    
                    myBtn.setPosition(xPos,yPos);
    
                    addChild(myBtn);
                }
    
            }
            public function onClickEvent(e:MouseEvent):void
            {
                /*
                 * Print out ID of the button thats clicked
                */
                trace("the button ID is: " + e.target.id);
            }
        }
    }
    

    CustomLabelButton.as (our custom label with the ID property button class):

    package
    {
        import qnx.ui.buttons.LabelButton;
    
        public class CustomLabelButton extends LabelButton
        {
            private var _id:int;
    
            public function CustomLabelButton(num:int = 0)
            {
                super();
    
                id = num;
    
            }
            public function set id(num:int):void
            {
                _id = num;
            }
            public function get id():int
            {
                return _id;
            }
        }
    }
    

    run the code and see how it works. I hope that's what you're looking for. Good luck!

  • Problems with the UI Flash CC. Mainly, I can't click on some buttons and textboxes on different modal windows. (for example. Scale and rotate the sound properties.

    Hello

    I was wondering if anyone else has problems of this kind. I basically only to find a bunch of different buttons, fields and the tabs do not respond to my clicks. This seems to be spread throughout the application.

    I had to work around most of this by using the tab and arrow keys to navigate around the modal buttons and fields... but it's a bit of a pain.

    There are certain parts of the interface that are not accessible via the tabs and the arrow keys... for example tab ActionScript in the Sounds Properties window... There is no way to do that... and by clicking on the tab itself does nothing, although I can see that the rollover of the tab State is enabled.

    I ended up having to run Flash CS6 in order to define the classes of the export of audio files, and it's a major pain.

    Interface issues similar user exist with other things... for example, the color picker (eyedropper) seems to choose colors near, but not directly under him.

    I'll be honest... I'm running on Windows 7... Via boot camp on a Mac Book Pro with the retina display... so questions could come from this combination. However... Flash CS6 has these questions... so I can only think that it is a matter of Flash CC.

    I appreciate any input you can provide. (Although the obvious 'it on OSX rather run' or "just use CS6" are not the kind of responses I'm looking for.) I have my reasons for installation. )

    Thank you.

    Cheerfully,.

    -JR

    Mohan thanks!

    Scaling text to 100% actually works!

    After that I changed the scale to 125%, it still works (which was not planned)

  • help with the menu button and the film load

    Hi all... I am very new to flash and actionscripting and I am self-taught using mainly Internet searches.
    I'm building a site with a menu and a banner that is controlled by the menu (two swf files). I got to the make contact however, I'm stuck at this point.
    When 'bt_1' is hit I would like to be respected a "mv_1" to load in the banner.swf with intro animation... this I figured out how to... but now when you click on "bt_2" I want to play the rest of the animation of "mv_1" to unload the film before loading "mv_2" with its animation enterance respected... that I would make to several buttons. The method that I use for my local connection is...

    Sending script
    mySender = new LocalConnection();
    on (release) {}
    ------each button corresponds to a different setting... 1,2,3,4,5,6
    _root.mySender.send ("menuconnect", "action", 1);
    ------This is the best way that I could understand to disable the buttons appropriate... There might be a better way?
    Home.Enabled = false;
    couple.enabled = true;
    Events.enabled = true;
    Bridal.enabled = true;
    Media.enabled|disabled = true;
    RSVP.enabled = true;
    }



    Script of reception

    myReceiver = new LocalConnection();
    myReceiver.action = {function (doThis)}
    If (this == 1)
    gotoAndPlay (2);
    If (this == 2)
    gotoAndPlay (3);
    };
    and so and soforth for all six buttons
    myReceiver.connect ("menuconnect");

    If all this makes no sense at all, I'm sorry... I tried my best...
    If some pro out there can understand what I'm trying to do and can help me I would greatly appreciate it... Thank you all

    SJS

    I would like to use the ID to link to each of your mv_1, mv_2 etc. in the main stage and control them. This would have the advantage of eliminating the duplication of code and keeping most of your code in one place (image 1 of your _root timeline).

    If mc_1 etc was connection id mc_1ID etc, the other began on a frame labeled "outro" and ended on the last image, you can use:

  • Cannot restart or refresh my iPhone 7 from the "home" button and the sleep/wake button at the same time

    I'm having difficulty trying to restart and update my iPhone 7 using the Home button and the sleep/wake button at the same time, when I do my phone takes a screenshot of the home screen.

    Should I turn off my Touch ID?

    Basically my home button button and / standby works not together at the same time.

    You need hold the House and turn off the button for 20 seconds, until the Apple logo appears.

  • My portfolio is currently configured to allow access when locked. I used to be able to double-click the home button and seems my card and I would enter my access code. I have updated to IOS 10 and I am no longer able to do this.

    My portfolio is currently configured to allow access when locked. I used to be able to double-click the home button and seems my card and I would enter my access code. I have updated to IOS 10 and I am no longer able to do this. All the settings are there. I have an IPhone 6.

    Are? you double click in front of the screen of the iPhone are? (pending). This is what seems to work for me.

    I hope this can help.

  • How can I make YouTube playback buttons and other plug-ins more great because they are so tiny?

    How can I make YouTube playback buttons and other plug-ins more great because they are so tiny in Firefox? I tried some suggestions dealing with entering "subject: config ' in a fresh browser, but does not. I also downloaded the add-on called "Theme font & size changer", but that no longer works. So I'm reaching here that it was a suggestion that offered another user here.

    Ah, Yes, that's - a ultra high resolution (dots per inch) display. It is a known problem in Flash Player, which Adobe is working on fixing.

    In the meantime, you can get some videos to have normal size controls from the Youtube HTML5 video player:
    In Firefox, go to https://www.youtube.com/html5 and click on the button "request the HTML5 player.

  • iPhone5s, about 3 years. My phone was in place. Whole phone freezes up and I have reset ("home" button and lock button)

    I have an iPhone5s for about 3 years now. My phone has been in place for some time now. My phone just hangs and I have to reset ("home" button and lock button) and when I unlock it after ALL my messages have disappeared or erasing their own messages and I get not notified when someone texts me. Help?

    Reset.

    Restoration.

    Restore as new.

    Standard troubleshooting steps. Have you tried one of them?

  • My iphone 6 does not light, I held the home button and power at the same time and no vibration or no sign of life, any suggestions as to what it could be would be appreciated

    Phone bought 3 days ago and I fight to turn it on, it's just a black screen, the phone records into iTunes but does not turn, I tried holding down the home button and power at the same time and still nothing, I presume that it's a battery problem as if it was the backlight then the phone vibrated when you press the power button help Please!

    Marley6921 wrote:

    Phone bought 3 days ago and I fight to turn it on, it's just a black screen, the phone records into iTunes but does not turn, I tried holding down the home button and power at the same time and still nothing, I presume that it's a battery problem as if it was the backlight then the phone vibrated when you press the power button help Please!

    Put it on wait ten minutes if the phone did not come one, then hold down the sleep/Home button until you see the apple logo and then release, make sure that the phone is still connected to the charger.

  • "Home" button and Touch ID dead after few water damage

    Recently, I took my iPhone 6 tubes with me. It is in a case of Lifeproof which for me has always been impervious to water. For some reason, this time a few drops of water seeped into the 'home' button and contact ID no longer work, and Siri now appears at random times. I'm no stranger to dismantle iPhones for repair I do my own repairs if the warranty is up, but I ask, would simply replace the home button / Touch ID unit fix it? The rest of the phone works perfectly, I even typed this on this subject.

    Well, if fix it you yourself, you cancel all Apple support.

    Also, if I remember correctly, ID contact in the phone communicates with something in the motherboard and the two are interconnected. I think it was a measure of security/encryption to ensure data were insured.

    If you change the ID of the button home/Touch yourself, you break this connection and will probably have problems. Better to make an Apple store and have their support.

    ~ Lyssa

  • buttons and new layout cannot do anything

    Now, I get an extra layer of height. Its like this: high windows have a layer containing nothing, it's a waste of space, next height layer is the tabs in firefox, then finally we're the buttons and the address field. How can I remove the layer of the window? Before with the firefox button in the left corner of the layer of the window has been integrated with it, so I don't loose any height.

    Another problem. I can't move the settings customized to the left button, so I left my mouse have to move anywhere on the screen.

    Another problem of moving. I can't move the reload/stop button. I want that to the left with all the other buttons.
    And why can't I see the forward button? I don't see the attacker when it assumes to be there. I want that it to been seen at any time. And why can not move back/forward buttons? I could only with the latest version.

    OK I have the other problems by installing addon: Restorer Classic theme. Now, everything looks and works exactly as in the 28th. Best layout, everything is close to the other and you need to move your mouse less than distant. You have all the options under firefox button.

    If you do that and your session manager addon does not appear as... button disable the Restorer Classic theme, move the button session manager from the scope of the option meny or what you call... Then turn the Restorer Classic theme and then replace the button Manager session to the domain again.

  • When writing a new message OR reply to a message, I lost the 'Send' button AND the button "check spelling". Help!

    When writing a new message OR reply to a message, I lost the toolbar that includes the "check spelling" button AND I lost the toolbar which includes 'send '. I can't send messages! Can you help me find these toolbars?

    Open a window of writing.

    You have a Menu bar with file-Edit-View etc? If this is not the case, press the alt key to bring up.

    The Menu bar select View-Toolbars and relight toolbars missing.

    Sending is on the Composition toolbar.

  • The orange Firefox button and the Navigation toolbar is on the same line

    Someone interfered with my Firefox settings and goofed a bit. Now the orange Firefox button and the Navigation toolbar are on the same line/line, as shown in the image below. Can you help me with the Firefox orange button at the top of the Navigation toolbar (as usually is the case)?

    http://PUU.sh/4NoO8.jpg

    Thank you very much! I had this same problem. I'd rather have my tabs at the top, in line with the orange. For some reason any that an add-on reset my 'browser.tabs.drawInTitlebar' to false, which looked horrible and wasted a whole bar of space by the presence of a large space empty on the top of my screen. It fixed my problem!

  • I do not have a firefox button and didn't get to the general page

    I have firefox symbol in the upper left corner, but I don't have a button that takes me to the general page. Do I need a button, and if not how to access the General page? If I need a button how to do it

    Firefox on Windows has two configurations of different menu:

    • Bar menus classic full-width
    • Compact menu accessed with a Firefox button orange

    I'm looking for Options. In the classic menu bar, they are under Tools.

    To activate the menu configurations, you can use one of these:

    • View > toolbars > Menu bar
    • Right click on a zone empty of the tab bar > Menu bar
  • "Back" button and the buttons Add on becoming pixelated.

    I noticed that my back button and my addons button in the upper right corner becomes pixelated.
    Here is a picture of what I see, this alone, it disappears if I open firefox safe mode.

    Image 1 - "back" button: http://i.imgur.com/PCc1iQI.png
    Image 2 - button "return": http://i.imgur.com/QKGefck.png
    Picture 3 - button Add-on: http://i.imgur.com/KLczXIp.png

    Image 3 the gradient does not stand still, but it shows scan lines expanded in the background of the add-on of LastPass.

    Try disabling hardware acceleration in Firefox.

Maybe you are looking for

  • Videos YouTube start muted

    HP G72-253NR - MS WIN 7HP SP1 - FIREFOX 24.0 - FLASH 11.8.800.168 Until recently, videos YouTube played to whatever the last book that I had. Videos from YouTube (site / embedded) begin with Muted. I can increase the volume in the drive, but the vide

  • Can I store bookmarks, ad - ons and other parameters of firefox in a portable file?

    I have to set bookmarks, search engines, ad - ons and other settings every time I install firefox... I want a file he does everything at once...

  • Re: Qosmio G30-162 - updated graphics card

    However, I have a Toshiba Qosmio G30-162, which until now has served me fine - games is becoming more advanced and requires more vram. My machine came with a GeForce 7600 256 MB has told me that the technician "is integrated with the Commission. Now

  • Adding RAM to a HP2-1310. There is an open slot where I can simply add another 4G?

    Hi, I need to know what I need to do to add RAM to my HP2-1310.  I know he now has 4G and is a 64-bit system that will be 8G, but I can't find anything that tells me if I need to replace what is there now, or if she has a slot with 4G inside and an e

  • LaserJet P4515: LaserJet P4515 multiple paper jams

    Jam LaserJet P4515 continued in multiple locations, fuser, under the path between two tray and toner cartridge and toner area. Maintenance Kit life of 67% left, rolls have been changed, toner has changed, the vacuum cleaner, wipe with the cloth to du