How can I change the skin of button with the function arguments?

Hi guys, I am building a card witch I represent with grid 40 * 26 buttons, now I used to create an action script function that will get a string that contains the name of the folder where I store the data for example skin buttons:

[Embed("maps/grass/upSkin.jpg")]

_upSkin: class private var;

[Embed("maps/grass/overSkin.jpg")]

_overSkin: class private var;

[Embed("maps/grass/downSkin.jpg")]

_downSkin: class private var;

private void changeMap (): void

{

slot: Button = new Button();

slot.setStyle ("upSkin", test);

slot.setStyle ("overSkin", _overSkin);

slot.setStyle ("downSkin", _downSkin);

}

That's what I managed to do so far, what I would do is send to changeMap() a string with the path name access, but some how I can't integrate a variables, I'll be glade if you could find a solution for this.

Here's the link to my site, so you can see what I mean. I'm not always online, but you can try.

http://gazmanwars.zapto.org/

* Best discovered ground less 1280 * 960

You can use the selector of a CSS class rather then type selector you probbably do something similar in your css

Button {}

upSkin:

DownSkin:

}

This will apply style on all of the buttons in your application as its happening now so you can use the Selector class more like this

{.myButtons}

upSkin:

DownSkin:

}

the grid of buttons that make you can then use this statement

Var b:Button = new Button()

'b.styleName =' myButtons

Tags: Flex

Similar Questions

  • How can I change the function of the Run button?

    I recently got a new hard drive and had to install all my software from National Instruments

    Now, the run button in TestStand runs only the selected sequence.  How can I change to Pass simple execution of the process template and MainSequence?

    Right click on the run button and choose Customize...

    Now click on the tab orders and click Rearrange Commands.

    Click the radio button next to the toolbar: select Debugging from the drop-down next to him.

    Select the command with the green arrow and click Remove.

    Now click on the Add button and select Execute under categories:

    Under orders: scrolling until you find the one you want.  In this case second execution Entry Point.  You will need to repeat the add other buttons.

    Highlight the one you want and click OK.

    Click Close and close when you are finished.

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

    Hello

    You are not sure if this should go in the Flash forum or Captivate forum, but nobody knows how, where to find ActionScript 3 orders for Captivate?

    I downloaded a pre-made button Flash (source file) for Adobe Captivate, which was originally made to make a video go to the next slide when you press. He does it very well, but I wanted to know how use the ActionScript in Flash Professional CS5 to have the button JUMP to a specific slide in Captivate, rather than just go to the NEXT slide. I know that usually how the code works, but have never really used and do not know the specific command to get there. Currently, the relevant part of the code of 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 think I should just change the last line to something else and it should work, but I need the command. Can someone tell me what needs to be changed in the code above to get there?

    The full code is below. Thank you.

    code.JPG

    Here is an answer for everyone out there trying to do the same thing.

    To change the function, simply change "rdcmndNextSlide = 1" to another command with its variable. Commands and variables can be found here:

    http://www.cpguru.com/2010/07/20/Adobe-Captivate-5-system-variables/

  • How can I change the function of the multimedia button in my keyboard?

    Hello

    I want to change the function of the media in my keyboard button, because if you press the button, the media Center launch, but the problem is, I can´t use the media center due to many reasons, so I want, when I press the media button, only Windows Media Player launches and not the Media Center?

    Who knows what I have to do?
    Thank you very much for your help!

    Hello Sailor

    Can you please write what model of phone you have?

    Anyway, check it please Toshiba controls tool. You can find it in the control panel.

  • How can I change the parameters of function key?

    How can I change the function keys on my keyboard so I don't have to press the Fn key each time? At the moment I put alternative functions such as volume and brightness but can not change it back.

    This depends on the public services of PC manufacturer, but you don't say what kind of PC you have.

    For Dells & maybe others, appointment on

    1 Control Panel, Windows Mobility Center - there may be an element called line feature key with a drop-down list.  You should find it the value of multimedia keys & can select function keys instead.  The settigs will return to their value by default when you restart the PC.

    2 restart in the BIOS & get the point of the multimedia keyboard .  This change to the function keys instead change the default behavior.

    If your PC does not include these changes, then you will need to go to the PC manufacturer's support site to know how to do.

  • How do I change the function to send to in Windows 7 to add to an email?

    How can I change the function: send to, when I do a right click on the mouse? I want to add... .for an e-mail.

    If you want to add a document to a new Message already opened (or a reply or forward), then you must use the "Attach a file" or the equivalent in your e-mail client (secret). the function "send to" will only send the file to a NEW e-mail message. AS FAR AS I KNOW.

  • How can I change the music button on my keyboard to launch Windows Media Player to launch WinAmp?

    original title: program music keyboard key

    How can I change the music button on my keyboard to launch Windows Media Player to launch WinAmp?

    Thank you

    Drew

    As Mike Hall suggested, first look for the keyboard utility and seek to change the keyboard assignment there.

    If this option is not available, you can try to change the default program to open files of music. I do not think that "hotkey" keyboard music trying to specifically open Windows Media Play, rather it opens the program assigned as the default value for the music.

    So you'll need to get to the default programs control panel applet. To get there:

    1. Click Start , then Control Panel (in midway up on the right side)
    2. In the Control Panel window, click programs (not options, just the word more big programs). (If you have your set control panel to displayall items in the Panel control, then the applet default programs will be already visible and available directly)
    3. The second group of options should be the default programs. The two options here that should be of interest to you are:
      Make a file always open in a specific program type and (especially) set your default programs.

    You should find everything you need there.

    • If this proposal of solution solves your problem, please go back and mark as answer for others to consider.
  • How can I change the Home Page of Adobe to English? Happens to be french and I do not understand. I press the translator button but nothing changes!

    How can I change the Home Page of Adobe to English? Happens to be french and I do not understand. I press the translator button but nothing changes!

    Adobe - Choose your area

  • How can I change the 'Submit' button States in muse adobe?

    How can I change the 'Submit' button States in muse adobe? Currently, I can only change the color, text, and the outline of the button, but I can't customize it as I have the other buttons in the tool.

    Use your images as a background the button fill

  • How can I change the text in the Messages to the vertical?

    How can I change the text in the Messages to the vertical?

    If you mean change the orientation, simply turn the phone. If this does not work, close Messages and then run again.

    To close the Messages, press the Home button twice quickly. You will see small glimpses of your applications recently used. Drag to the left to find the application you want to close. Swipe up on the preview of the application to close.

    If it does not, the strength to restart the phone. No data is affected by this. To force the reboot your device, press and hold the two buttons of sleep/wake and home for at least ten seconds, until you see the Apple logo.

  • TB 31.7 W7, how can I change the police in the "all folders" list on the left?

    TB 31.7 on W7
    How can I change the police in the "all folders" list on the left?

    I was also unable to change the position of the icons on the e-mail toolbar in a message window. When I try to drag a box icon from the tool bar customize I get a symbol of the circle with a line through it, rather than the vertical bar I expect.

    Something like that?

    http://forums.mozillazine.org/viewtopic.php?f=30 & t = 2834207

    Note that the name of the folder and the name are case-sensitive. It must be userChrome.css and it must be placed in a folder named chrome.

    Finittary poster regularly wrote something about this recently. It may be possible to find this thread on this forum.

    The inability to drag or move a button usually means that you have opened the pane customization evil.

  • How can I change the beige tabs with white text to the text of the tabs beige with black (or another dark color)?

    Classic restoration changed by FF 29 tabs beige with black text on the tab active and beige with white text on other open tabs. The white text is not visible. How can I change the text in white with a darker color?
    If this cannot be done, is there a way to reinstall FF 29 with just the security updates (and not all the other stuff) so that I can keep my 28 FF settings? Thank you.

    1. Open the modules (Ctrl + Shift + A Manager; Mac: Command + shift + A), then the Extensions category.
    2. Beside the classical restaurant theme, click on the Options button.
    3. Click the custom colors tab, then the less than (active/hover/default) tab.
    4. Below (active) tab, check 'Text', then click on the color swatch and choose black.
    5. Click the tab (unread) / new tab.
    6. (Unread) tab, check 'Text', then click on the color swatch and choose black.
  • ICloud Keychain how can I change the phone number needed to verify the code text for me? The number it was sent is an old phone number of my friends that I do not have access to the.

    ICloud Keychain how can I change the phone number needed to verify the code text for me? The number it was sent is an old phone number of my friends that I do not have access to the.

    Try this from another thread I saw.

    On iOS, go to settings > iCloud > keychain and tap button to disable iCloud keychain. (you will be asked to delete or keep the passwords on device) I chose to delete...

    Then turn it back on, and pop - up chose reset iCloud trousseau, on a chosen pop-up confirmation reset

    In the new window pop up use iPhone password like iCloud cryptogram? has chosen the use code

    Enter your secret code (4 digits) then choose country and your new phone number

    Although, to "Restore the iCloud Keychain," I took to erase the data and essentially set up a new keychain.  Not the case.  Strangely, after essentially bypassing the security system, setting a new password and verification number, I see my cards, passwords and other data have been restored.  Maybe it's all the iCloud account and this master password.  Or maybe it's a bug.  With Apple, we'll never know.

    Also have a look here: get help using iCloud Keychain - Apple Support

  • Satellite P300D-220: How can I change the Toshiba Multimedia Buttos config

    Hello

    How can I change the options for the buttons to support key Toshiba?

    I want to change the button to 'cut the computer', in 'turn led light on or off.
    Toshiba Button support shows only two possibilities: CD/DVD and in German "Your aus" what means "mute".

    What it means?

    In Vista was the button with the right option, now I have installed Windows 7 Ultimate x 86. Since then the mute only it.

    I hope you understand my question.

    http://forums.computers.Toshiba-Europe.com/forums/message.jspa?MessageID=125277
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=34487

    This two threads did not help me, because I find no "utility control" in the list of the drivers for my computer.

    Hello

    Win 7 is different!
    The configuration of keys on Toshiba utility is not available for Win 7!
    After the installation of the VAP (value added package) for Win 7, you can configure the keys by pressing the button for the first time.

    I did it on my laptop after changing from Vista to Windows 7.
    I pressed a button and the window a pop-up asking me which application should be attributed to this button.

    As far as I know after the configuration it of not possible to change this once again

    Maybe after the new TPC facility you could configure the new buttons

  • How can I change the language to itunes Asian characters back to English. I don't speak or read Asian.

    How can I change the iTunes language to English of Asian characters? I don't speak or read Asian characters and have no idea how it happened.

    CTRL + , should display the Preferences dialog box, the tab the leftmost is General, the drop-down list language is located at the bottom of the dialog box, English British and English American are respectively the ninth & tenth of the entries in the list. The OK button is the second from the bottom right. Close iTunes and reopen it to apply.

    TT2

  • How can I change the size of a photo book without changing the theme

    How can I change the size of a photo on iphoto book without changing the theme?

    Click the button change theme and in the next window, select a different size without changing the theme.

    Be sure to carefully check each page as with a different size, you may have questions of text, or all text in the text boxes.  Before ordering the book read it again according to this document from Apple: get an overview of a project on paper in Photos, iPhoto or Aperture to avoid problems - Support Apple. Save the PDF file to compare it to the printed version when it arrives.

Maybe you are looking for