Anchor the Style menu buttons

OK so I followed this tutorial today: http://active.tutsplus.com/tutorials/actionscript/create-a-mac-dock-style-menu-with-as3/

and this is a great tutorial... with one exception. They never tell you where you can put the code by clicking on the buttons to make them functional.

so now, I have a few nice buttons that don't go anywhere. All want to take a look at this and see if you can tell me where I can put in my event code 'click '.

The way in which the directive addEventListener is written, it assigns the same function, mouseUp, each of your buttons. Looks like you have adapted the original six movieClips icon file to four of your own icon movieClips. If you followed the methods used in the original file and the value each of your movieClips icon to export for Actionscript and define a unique class name and a class name of common basis, then you can analyze what button was actually inside the function mouseUp.

Here's a revision of OverButton.as that might work for you. You need to change the URL.

package {}

Import org.effects.DockButton;

import flash.display.DisplayObject;

import flash.events.MouseEvent;

import com.greensock.TweenLite;

import com.greensock.plugins.TweenPlugin;

import com.greensock.plugins.TintPlugin;

import flash.net.URLRequest;

import flash.net.navigateToURL;

Add this category to your imports

import flash.utils.getQualifiedClassName;

SerializableAttribute public class OverButton extends DockButton {}

private var _object:DisplayObject;

Create the urlrequest here...

private var request: URLRequest;

public void OverButton (): void {}

_Object = This.getChildAt (0);

this.addEventListener (MouseEvent.MOUSE_OVER, mouseOver);

this.addEventListener (MouseEvent.MOUSE_OUT, mouseout/mouseouthandler());

this.addEventListener (MouseEvent.MOUSE_UP, mouseUp);

TweenPlugin.activate ([TintPlugin]);

}

private void mouseOver(e:MouseEvent):void {}

new TweenLite(_object,.5,{tint:0x990099});)

}

private void mouseOut(e:MouseEvent):void {}

new TweenLite(_object,.5,{tint:null});)

}

private void mouseUp(e:MouseEvent):void {}

/ * assign a new variable for the name of the class you gave each button...

getQualifiedClassName returns the name of the class that you have assigned to each button in the

Properties for each movieClip that you created

The result will be a string * /.

var thisButton:String = getQualifiedClassName (e.currentTarget);

use a switch function to open the new url based on the name of button class that was found...

{Switch (thisButton)}

case "Quiz":

request = new URLRequest ("http://www.mySite.com");

navigateToURL (request, "_Self");

break;

case "FS":

request = new URLRequest ("http://www.mySite.com");

navigateToURL (request, "_Self");

break;

case 'Keller ':

request = new URLRequest ("http://www.mySite.com");

navigateToURL (request, "_Self");

break;

case 'manual ':

request = new URLRequest ("http://www.mySite.com");

navigateToURL (request, "_Self");

break;

}

}

}

}

Tags: Adobe Animate

Similar Questions

  • How to get rid of the new menu button on the right side of the toolbar

    Honestly, I don't know why the developers cannot offer new features that we can use or not, by choice. Instead, things are forced upon us.

    Could someone tell me please how to get rid of the new menu button on the right side of the toolbar?

    It doesn't seem to be an option to remove via the Customize Toolbars window.

    Thank you very much.

    CTR extension makes Firefox customizable menu button 3 bar, so you can drag this button in the palette to customize to remove it from the Navigation toolbar.

    Reload and stop probably combine only if you set the two buttons in the correct order (reload - Stop and non-Stop - Reload)

  • where is the main menu button

    I'm looking for the main menu button

    The main menu depend on your phone.

    If you have a phone with a menu button Android it will be activated by this button.

    If you have a phone with a switch button Android app it will be activated by pressing the three points or lines near the address bar.

  • I disabled the toolbar > > Menu button (via a right click on a PC, Windows 7) and cannot access the toolbar to add items to the sail back in. Any ideas?

    I disabled the toolbar > > Menu button (via a right click on a PC, Windows 7) and cannot access the toolbar to add items to the sail back in. Any ideas?

    Don't see the menu bar not (File, Edit, View, history, Favorites, tools, help)?
    Turn on/off the menu bar is a new feature in version 3.6.
    (Linux and OSX see: what happened to the file, edit and view menus? )
    Windows Method 1. Press and hold the key and press the letters of the following in this exact order: V T M
    Windows method 2 Press and release the button. The Menu bar is displayed; then choose ~ ~ red: V ~ ~ iew > ~ ~ red: T ~ ~ oolbars and click on ~ ~ Red: M ~ ~ enu Bar.
    The menu bar should now be displayed permanently, unless you turn it off again using view > toolbars. Check = not displayed, NO check mark is not displayed.
    See: http://support.mozilla.com/en-US/kb/Menu+bar+is+missing

    Navigation, bar toolbar bookmarks and other toolbars under view > toolbars. By clicking on one of them will place a check mark (display) or remove the check mark (not shown).

    To display the status bar, view, and then click status bar to place a check mark (display) or remove the check mark (not shown).

    Mode full screen
    http://KB.mozillazine.org/netbooks#Full_screen

    See also:
    Back and front toolbar buttons or others are missing
    Customize controls, buttons, and Firefox toolbars

  • Option of 'Options' of the Smartphones from blackBerry in the BB Menu button doesn't work is not on the Torch 9800

    Whenever I select 'Options' from the drop of the BB Menu button on my Torch 9800, the screen flashes, then back to my home screen. It has been so for a long time (almost a year) and I think that there is a permission that has been disabled inadverdently. It does work if I use the theme BB6 native or other that I downloaded. Anyone know how to make 'Options' to the option to start working again?

    Hi randynjaimie,

    Try to back up your data using the BlackBerry® Desktop Software and perform a clean reload of your BlackBerry® Device Software.

    For more information, see the following article. How to perform a clean reload of the BlackBerry Device Software for Windows. www.BlackBerry.com/BTSC/kb11320
    Please test to make sure that the problem has been resolved before restoring all the data from your backup file.

    I hope this helps.

  • In Media Center Chess Titans, how can I remove the 3 Menu buttons up (game vs man, play Vs computer, exit) while I'm playing?

    In Media Center Chess Titans, how can I remove the 3 Menu buttons up (game vs man, play Vs computer, exit) while I'm playing?

    While I play Chess Titans (Media Center Version, full screen), there are 3 buttons on the top while I play (game vs man, play Vs computer, exit).  These buttons are boring because there is no need of them.  Make a right click on the screen offers these options.  In addition, when you regularly play Chess Titans (not the Version of Media Center and windowed screen), these 3 buttons do not exist.

    Hi Shpati,

    Thanks for posting this question in the Microsoft Community.

    Windows media center is normal and it is not possible to remove or deactivate form here.

    It will be useful. For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.

  • The top Menu button sends strangely to a submenu

    In my construction of DVD, I have a main menu and two submenu.

    Main menu is the first piece of theatre.

    It has three video clips to choose to play

    and two submenu select.  For some reason any in any clip played the Top Menu button sends me one of the submenu.  It is not chosen as the end to a timeline action.

    I know I'm doing something wrong.  Someone told please straighten?

    I think that in the properties of the disc in the properties panel, your title button is set to the subtmenu you mentioned.

    The menu that you want to see when Top Menu touch the value this title button.

  • Replace the Actions menu button on interactive report (Apex 4.1)

    I replaced the the menu button actions with an image in the report attributes section. The interactive report is to halfway to the bottom of the screen.

    The image is automatically included in an anchor with href = tag "#", which makes the page jump to the top every time the button is clicked. This changes a "false javascript:return"; it'll work out, but I don't know what to change to make this happen.

    Anyone know if there is a css or some model that I can change to fix this problem in the world?

    Thank you!
    John

    Found a solution using Jquery:
    Create an HTML region below 0 with the following content:

    
    

    or with an image

    
    

    Eric.

  • The Firefox menu button reduced my window

    Whenever I get close the Firefox menu orange button it minimizes my window and I cannot access the menu. SO if I need to access one of these functions I have to press the button and use them to a minimized window

    I have reset Firefox and also re-installed without joy

    Had it... turns that of it's my fault. I had installed something called GridView. As soon as I disabled it, Firefox was back to normal... just a shame I bloomin' lost al my settings in trynig to resolve this lol

  • Can change you the style radio button multi-response box or on leaves of verification of knowledge?

    I see that you can specify the style of most of the objects in question, including the graphics review quiz. But what about the little circle that appears when the user replies to a question? Or the small check box if there is more than one answer to a question? You can change the color of those? I can't find an option for that, but maybe I'm not looking for the right place.

    For the output SWF Rod is right. For HTML output, have a look at the assets in this way:

    C:\Program Files\Adobe\Adobe Captivate 9 x64\HTML\assets\htmlimages

    You will find the buttons option and boxes with their States. You can edit the images (keep a backup for the original).

  • Custom in the top Menu button

    Hello

    We want to add a custom button in the menu at the top of the application home page, next to the home button in version 6.1 of the P4P. We tried the following setting in the site - Extensions.xml map

    < SiteMap >

    < MenuItem ID = "ApplicationWideMenu" DisplayText = "" * Menu wide Application ">"

    " < MenuItem ID ="Custombutton"ToolTip ="Custombutton"="Custombutton"TranslationRef DisplayText ="Applications"SortOrder ="15"NavigateUrl =" https://testing.aspx "Visible ="true"> < / MenuItem > "

    < ID MenuItem = "Applications" DisplayText = "* Applications" >

    < / MenuItem >

    < / MenuItem >

    < / Sitemap >

    but we are unable to see this button in the top menu. Note that this custom button is available in version 6.0 of p4p. Let us know if we lose any configuration / settings.

    Thank you
    Kumar

    You guessed right, I will create a SR oracle.

    Kind regards
    Kumar

  • Content of the missing menu button

    Hi I have CS - 6 is installed via disk and when I put a menu button in their absence to the choice. The backgrounds are present, but that's all. This content has not installed and if so how to do it on my computer running windows 7. Thank you very much!

    The library is not installed with the installation of CS6.

    See here:

    http://helpx.Adobe.com/x-productkb/multi/library-functional-content-missing.html

  • How I evenly space the horizontal menu buttons?

    I am following the tutorial for Kate Café (part 3,http://www.adobekb.com/building_your_first_website_pt03.html#adding) and I'm trying to customize the menu headers. According to, I have to use the default settings. Later, I put the logo on the menu for the 'home' button below the logo, so when you click on the logo, it takes you to the home page.

    I used the Menu > Horizontal option. Here's how mine as:

    Screen Shot 2013-05-16 at 2.27.34 PM.png

    The problem is that my menu buttons are not evenly spaced but tense.

    This is what looks like the demo version:

    fig_37_building.jpg

    Also, I noticed on some online tutorials that others have a Menu > Bar option, it is related to that?

    I checked and my Application Manager said that my version is up-to-date (I use cloud creative).

    Thanks for any help in advance!

    Select a menu item to set its appearance, then press ESC to select the whole menu, go to your control panel space and add horizontal space + in the option of the blue arrow for your menu widget, be sure to have "same size" (sorry, human translation from the french)

  • How to remove the context menu buttons?

    Hello

    I have a pretty annoying problem. I have installed GNU Emacs and Emacs W32 some time ago, but spent to vim. However, in the menu context (context menu) for any file text (.txt, .c or .java) it is always an option called "Edit with Emacs." Now, obviously I no longer use Emacs and uninstalled several months ago. However, I can't get rid of this option in the registry. When I click on it now it opens the 'Open with' instead.
    Anyone know how to remove this option from the context menu?
    Thank you!

    Take a look at the app ShellMenuView. See http://www.techspot.com/guides/210-edit-windows-extended-context-menu/ for instructions and download.

  • How delete/disable the option 'start private browsing' in the Firefox Menu/button?

    I don't want the incognito on this computer option. Please help me to disappear! I have Firefox 6.0. Thank you.

    This extension turns off private browsing hides all the elements PB menu and disables the keyboard controls, disables the overcoming of the browsing history and the extension does not appear in the modules with the exception of the Firefox SafeMode.

    https://addons.Mozilla.org/en-us/Firefox/addon/disable-private-browsing/

Maybe you are looking for