Defining Skin for several buttons. Flex 4

Hello,
I am finding great difficulty to understand, to apply a skin  when I have two buttons almost equal. Only thing  that will change them are icons.
I'll have to  make a skin file for each one?
Can anyone help  me?
Has anyone example?
Hugs

Maybe try a binding to alter the value.
<fx:script>
   public var nTab4OpenedX:int = 100;
   //Function to change the tab4 opened X value.
   public function ChangeX():void
      //Change the value to 500.
      this.nTab4OpenedX = 500;
</fx:script>
<s:SkinnableContainer id="tab4" x.tab4opened="" x="0"

Similar Messages

  • How can I dsiable the skins for a Button?

    I want to make a button without any skins.  I know how to specify the skins for a button, but I don't see how to set them to null.

    Basically, I just had
    <mx:Button label="Something"
         fillColors="{[myColor]}"
         skin="{nullRef}">
         <mx:Script>
              [Bindable] public var nullRef:Class = null;
         </mx:Script>
    </mx:Button>
    It was just using the default skins that come with Flex.

  • How to intercept style changes in skin for spark Button?

    How to intercept style changes in skin for spark Button?
    Thank you.

    How to intercept style changes in skin for spark Button?
    Thank you.

  • Default skin for spark button class

    Hi, where in the spark button class or superclasses does it specify its default skin?

    Spark components like Button.as don't define thier default skins internally. If you want a skinnable component to have a default skin so that you don't have to  manually specify the skin every time you have two options. The preferred method, and the one used in the flex sdk, is to use a css file to specify the skin for the component. If you don't want to do that, then the other option is to call setStyle("skinClass", YourSkinClass) inside the constructor of the actionscript component.

  • Problem in embedding a png file for a button's skin

    I am trying to embed a png graphic as a skin for a button using actionscript class for a custom component. It has an error: "unable to resolve 'btn.png' for transcoding" - see method 1 code below. However, it works fine in method 2. Code are all shown belown. Can someone help regarding why this happens and how to make method 1 work?
    Got error in method 1:
    package net.abc.free
        import mx.core.BitmapAsset;
        public class myComp extends Canvas {
            [Embed(source="assets/btn.png")]
            [Bindable]
            public var clasBtn:Class;
        public function myComp() {
            super();  
    Successful in method 2: 
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.core.BitmapAsset;
                [Embed(source="assets/btn.png")]
                [Bindable]
            public var clasBtn:Class;
            ]]>
        </mx:Script>
        <mx:Panel id="mainPanel" width="400" height="300" backgroundAlpha="0">
            <mx:HBox width="100%" height="100%" horizontalAlign="center" horizontalGap="100">
                <mx:Button id="myBtn" upSkin="{clasBtn}"/>           
            </mx:HBox>
        </mx:Panel>
    </mx:Application>

    If you don't put "/" in front of the path Flex will look for the file in the relative path of the file you refer it from.
    Your first example will look for the png file in:
    /net/abc/free/assets/  -- wrong path
    Your second example will look for it in:
    /assets/ -- since the application mxml file is at root level
    but if you put /assets/  it will look for it in /assets/ no matter where the MXML/AS file is

  • Need several buttons that each target a video cue point but only one works

    I have the code that works for one button to find a cue point but how can I make this work for several buttons and their respective cue points?
      "seek-btn2" to find cue 2(named "lou2")
    import fl.video.*;
    // Video component instance name
    var flvControl:FLVPlayback = display;
    var flvSource:String = "lou.flv";
    // Set video
    flvControl.source = flvSource;
    // Add seek functionality to the button
    function seekHandler(event:MouseEvent):void
       flvControl.seekToNavCuePoint("lou1")
    //seek_btn is the button instance name
    seek_btn.addEventListener(MouseEvent.CLICK, seekHandler);
    when i repeat the last part of the code it does not work, thanks for your time....

    Thanks but where would I insert that code and what would I take out from the original code I posted?
    i tried this....
    import fl.video.*;
    // Video component instance name
    var flvControl:FLVPlayback = display;
    var flvSource:String = "lou.flv";
    // Set video
    flvControl.source = flvSource;
    seek_btn1.cuePointName = new String();
    seek_btn1.cuePointName = "lou1";
    seek_btn1.addEventListener(MouseEvent.CLICK, onButtonPress);
    seek_btn2.cuePointName = new String();
    seek_btn2.cuePointName = "lou2";
    seek_btn2.addEventListener(MouseEvent.CLICK, onButtonPress);
    // onButtonPress function
    private function onButtonPress(evt:MouseEvent):void {
         flvControl.seekToNavCuePoint(evt.target.cuePointName);

  • Style for the button

    Hi,
    it is possible to define style for the button on the form?
    Portal version: 3.0.6.6.5

    leinadjan wrote:
    Hello everybody,
    (I'm using APEX 3.2)
    I get a really annoying problem. I'm using report region to show the selected options in one of my application. When I'm creating or editing that content, I do it in a specialised page. To edit my content, I'm using a standard edit button link in my first column. But the button column is ALWAYS taking too much space in my report, it shouldn't be longer then 30 pixels wide. I 'm trying to use the attribute fields or table attribute fields with style="width:30px;" but it never works. I'm having a hard time following this (and I don't currently have access to 3.2). Although its a different version, suggest you create a similar example on apex.oracle.com to give a clearer idea of the situation.
    The only way I found to do that was by creating a new template and write my new style in the header option. But I was told that I can't edit those tamplate. What template? Who told you this?
    I'm thinking that some substitution strings are missing and that is why it changes nothing.What substitution strings?
    It always helps if you provide precise details of:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)

  • How do I apply programmatic skins for completely custom drawn components of a Flex library project?

    Hello folks,
    I am looking for best practices advice when (1) creating
    custom components and (2) styling and skinning.
    I already know how to skin a component part of the Flex
    framework. I can make a class extending ProgrammaticSkin and have
    my component skinned using CSS to link the component with the
    reference to my custom class.
    However what about those cases when you are completely
    creating a component from scratch?
    Imagine a "Freehand Drawing Canvas" component that allows the
    user to draw on it and has some buttons to set color styles, line
    styles, etc., or imagine a "Screen Flow Gallery" component that
    displays visual objects in a fashion similar to Cover Flow in the
    Mac.
    In many components I am aware you may reuse other components
    part of the Flex framework but I am trying to picture an scenario
    where you would need to draw everything yourself because there just
    isn't something to base it upon so you will end up drawing it from
    scratch.
    To learn how instead of building one of those components I
    mentioned previously I decided to start with something simple that
    would illustrate this like a LiteButton component that will behave
    just like the Flex mx.controls.Button but will extend UIComponent
    and be completely custom drawn.
    The component will have a default look and will also be
    style-able and skin-able. I will provide styles for users of the
    component to modify and regarding skinning anyone can create a
    custom ProgrammaticSkin adding its own drawing logic and link it to
    the component via CSS with the ClassReference applied to the skin
    selector.
    So far so good and it's clear what I want to achieve. I
    actually know how to do most of the stuff here but I have one
    single problem.
    Here is my question, where should I put my custom drawing
    logic? If I do it in the updateDisplayList inside the class
    extending UIComponent it works, however I thought that it would be
    a better practice to do it using programmatic skins, that way I
    could provide different skin themes for my component set.
    The problem is that I can't make the programmatic work in
    this scenario. I tried instantiating the custom programmatic skin
    during the updateDisplayList of the LiteButton component and adding
    it to my display object via addChild but that didn't do anything. I
    also tried creating a "default.css" stylesheet and tried to use
    ClassReference as I would normally do to skin an already existing
    component (or composite component as well) but that didn't do
    anything either.
    So how do I apply programmatic skins for completely custom
    drawn components of my Flex library project?
    I could do it inside the updateDisplayList of the LiteButton
    class extending UIComponent but again I would like to provide
    different theme sets for my components so it makes sense using
    programmatic skins.

    "jbucaran" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hello folks,
    >
    > I am looking for best practices advice when (1) creating
    custom components
    > and
    > (2) styling and skinning.
    >
    > I already know how to skin a component part of the Flex
    framework. I can
    > make
    > a class extending ProgrammaticSkin and have my component
    skinned using CSS
    > to
    > link the component with the reference to my custom
    class.
    >
    > However what about those cases when you are completely
    creating a
    > component
    > from scratch?
    >
    > Imagine a "Freehand Drawing Canvas" component that
    allows the user to draw
    > on
    > it and has some buttons to set color styles, line
    styles, etc., or imagine
    > a
    > "Screen Flow Gallery" component that displays visual
    objects in a fashion
    > similar to Cover Flow in the Mac.
    >
    > In many components I am aware you may reuse other
    components part of the
    > Flex
    > framework but I am trying to picture an scenario where
    you would need to
    > draw
    > everything yourself because there just isn't something
    to base it upon so
    > you
    > will end up drawing it from scratch.
    This may help with that
    http://livedocs.adobe.com/flex/3/html/help.html?content=skinstyle_3.html
    > To learn how instead of building one of those components
    I mentioned
    > previously I decided to start with something simple that
    would illustrate
    > this
    > like a LiteButton component that will behave just like
    the Flex
    > mx.controls.Button but will extend UIComponent and be
    completely custom
    > drawn.
    >
    > The component will have a default look and will also be
    style-able and
    > skin-able. I will provide styles for users of the
    component to modify and
    > regarding skinning anyone can create a custom
    ProgrammaticSkin adding its
    > own
    > drawing logic and link it to the component via CSS with
    the ClassReference
    > applied to the skin selector.
    >
    > So far so good and it's clear what I want to achieve.
    Actually after
    > playing
    > with the weekend and today I know how to do most of the
    stuff but I have
    > one
    > single problem. So here is my question, where should I
    provide my custom
    > drawing logic? If I do it in the updateDisplayList
    inside the class
    > extending
    > UIComponent it works, however I thought that it would be
    a better practice
    > to
    > do it using programmatic skins, that way I could provide
    different skin
    > themes
    > for my component set.
    These aren't mutually exclusive. When you provide a skin with
    a
    TypeSelector, you have to add it to the display list
    somewhere, and this is
    typically done in updateDisplayList or addChildren. I prefer
    to do it in
    updateDisplayList, because you can then change it if the
    style changes.
    > The problem is that I can't make the programmatic work
    in this scenario. I
    > tried instantiating the custom programmatic skin during
    the
    > updateDisplayList
    > of the LiteButton component and adding it to my display
    object via
    > addChild but
    > that didn't do anything.
    Exactly what did you do?
    > I also tried creating a "default.css" stylesheet and
    > tried to use ClassReference as I would normally do to
    skin an already
    > existing
    > component (or composite component as well) but that
    didn't do anything
    > either.
    I've never had any problem using an approach similar to
    this...but I will
    say that I couldn't see any advantage in creating a
    default.css style sheet,
    since it's not really default in the way that the one that
    comes with Flex
    is. It's much more obvious to anyone using your component
    what's going on
    there if you create a style sheet where they're likely to
    spot it.
    > So how do I apply programmatic skins with the default
    look for custom
    > drawn
    > components?
    It seems like your approach is fine, but maybe you've made a
    mistake in your
    implementation.
    > I could do it inside the updateDisplayList of the
    LiteButton class
    > extending
    > UIComponent but again I would like to provide different
    theme sets for my
    > components so it makes sense using programmatic skins.
    You might want to consider also adding an instance of
    HaloBorder to your
    component. That brings a lot of functionality with it.
    HTH;
    Amy

  • Problem with skin for server side buttons.

    Hi,
    I have a problem with the skin for server side renderd buttons.
    In my CSS file I have :
    .AFButtonStartIcon:alias
    content:url(/skins/images/btns.JPG);
    .AFButtonEndIcon:alias
    content:url(/skins/images/btne.JPG);
    .AFButtonTopBackgroundIcon:alias
    content:url(/skins/images/btntb.JPG);
    .AFButtonBottomBackgroundIcon:alias
    content:url(/skins/images/btnbb.JPG);
    JPG files in project are in dir "public_html/skins/images".
    In WAR file,the JPG files are in "/skins/images" directory.
    Skin configuration is correct because other settings from CSS
    file are functioning fine after deploying.
    But buttons are standard browser buttons and are not taking the images i have used.
    In document provided by Oracle it says:
    (Note: These icons must be specified using either context-image or
    resource-image icons. Text-based icons are not allowed.)
    I am nt able to understand what this means?

    Perhaps this thread will help.
    JSF Skining Button Images
    The doc should say whether or not the width/height is a requirement. But since it doesn't mention it, try adding a width and height.
    - Jeanne

  • How does one define a default style for a custom Flex component?

    How does one define a default style for a custom Flex component?
    hello
    I created a new set of Flex component library slib.swc (Flex 4.5). Would also like to have a default style. defaults.css file, making it the default style of the component library.
    Like flex the builder install directory of sdks \ 4.5.0 \ frameworks out \ libs directory has a spark.swc file, open with Winrar will see defaults.css this file. Defaults.css file defines the default style of the flex spark components.
    How can it be achieved?
    As follows
    slib.swc contains a CLabelEx components, and a defaults.css file
    defaults.css source file as follows:
    @ namespace s "library :/ / ns.adobe.com / flex / spark";
    @ namespace mx "library :/ / ns.adobe.com / flex / mx";
    @ namespace cn "http://os.slib.cn";
    cn | CLabelEx
            styBackgroundAlpha: 1;
            styBackgroundColor: # 569CC0;
            styBorderAlpha: 1;
            styBorderColor: # 569CC0;
            styBorderWeight: 1;
            styCornerRadius: 3;
    In slib.swc the application MyLabel.mxml of the source file as follows:
    <? xml version = "1.0" encoding = "utf-8"?>
    <s: Application, the xmlns: fx = "http://ns.adobe.com/mxml/2009
                               xmlns: s = "library :/ / ns.adobe.com / flex / spark"
                               xmlns: mx = "library :/ / ns.adobe.com / flex / mx"
                               xmlns: cn = "http://os.slib.cn
                               the minWidth = "955" The minHeight = "600">
            <fxeclarations>
            </ fxeclarations>
            <cn:CLabelEx x="67" y="112"/>
    </ s: Application>
    I hope CLabelEx default use cn | CLabelEx, style to display its appearance.
    I refer to above approach, but failed to achieve. Can you please re-Detailed
    Thanks!

    dj is right. Any Folder can be a picture folder.
    Create a root level folder and add it to your Pictures Library in Windows.  It will show up with all the scattered pictures from other programs. It can even be a different dirve if you like.  You  can even specify one to be the default save location for pictures in this dialog.
    Navigate to Pictures in your Libraries in Windows Explorer Right Click and select Properties.
    Message was edited by: Rikk Flohr forgot the instructions...

  • Classic: will not recharge; apple logo flashes every few seconds then fades away; have tried the 'reboot' advice i.e. move hold switch on and off, hold menu and center button, no success.  have tried this many times and kept connected for several hours.

    I have a classic, several years old.
    It will not recharge; the Apple logo flashes every few seconds then disappears. 
    I have tried the 'reboot' advice i.e. move the Hold switch on and off, hold the Menu and Center buttons, no success. 
    I have tried this many times and kept the ipod connected for several hours.  And I have tried two different cords, one connected to the desktop computer, one connected to electrical outlet.

    Hi enbridge4,
    If your iPod Classic won't charge or turn on, you may find the following articles helpful:
    Apple Support: iPod won't turn on
    http://support.apple.com/kb/ts1383
    Apple Support: iPod's battery doesn't charge
    http://support.apple.com/kb/ta44551
    Regards,
    - Brenden

  • My sons iPod touch stopped working, it won't charge in a docking station and the computer/itunes won't recognize it when connected.  We have tried holding the power and home button at the same time for several seconds, and the screen still stays black

    My sons iPod touch stopped working, it won't charge in a docking station and the computer/itunes won't recognize it when connected.  We have tried holding the power and home button at the same time for several seconds, and the screen still stays black.  Thanks!

    Hello skdog I possibly think your ipod touch is black because it has not charged. If your dock is broken it might just mean the dock will be broken and so might be the USB port. You should see an Apple shop nearby and hand it over and see what they can do. I hope this information works!

  • My mac book pro 17" model 1229 does not work. It askes' me to :'you need to restart your computer.Hold down Power button for several seconds or press the Restart button

    Mac book pro 17" model 1229 displaying: "you need to restart your computer. Hold down the power button for several seconds or press the Start button

    Your MBP may have had a kernel panic.  If so, post the kernel panic per these instructions:
    http://support.apple.com/kb/ht2546
    An Apple Hardware Test may be useful:
    http://support.apple.com/kb/ht1509
    Note that an error free AHT is not definitive.
    Ciao.

  • My Led flash light switch on all the time,anybody got the solution.i tried 3 things but it couldn't solved the problem. 1.settings-accessibility-LEd flash off   2. Switch off the phone for several times.  3.press the home button n power button until the

    My Led flash light switch on all the time,anybody got the solution.i tried 4 things but it couldn't solved the problem. 1.settings-accessibility-LEd flash off   2. Switch off the phone for several times.  3.press the home button n power button until the apple logo appears.  4.reset my all settings.

    My Led flash light switch on all the time,anybody got the solution.i tried 4 things but it couldn't solved the problem. 1.settings-accessibility-LEd flash off   2. Switch off the phone for several times.  3.press the home button n power button until the apple logo appears.  4.reset my all settings.

  • I am trying to download the update to Photo Effects (Lite) v 3.0.0, for several weeks now without success. I press the update button and it goes away, then comes back again without any change. Can someone help please?

    The update to Photo Effects (Lite) v 3.0.0 won't work. I've tried for several weeks without any result. I press the download button and it disappears, then reappears again. Can any one help, please?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select
              /var/log ▹ appstore.log
    from the hierarchical list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar.
    Each message in the log begins with the date and time when it was entered. Select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, click the Clear Display button in the toolbar of the Console window and then try the installation again.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    ☞ The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.

Maybe you are looking for

  • How do i update iPad 2 to ios5

    How do I update iPad 2 with ios5?

  • Problem Installing VM: "Database is not available"

    I'm trying to install VM Manager 2.2 but when I get to creating the database I get this message: Checking the availability of the database ... Database is not available Please check log from /var/log/ovm-manager/db.log This is my db.log file: 2010-07

  • Vertical alignment in a cell and IE

    In this page www.gk-developers.com, on IE, the navigation menu is showing up midway along the page when it should be right at the top. The table cell has the vertical align instruction but IE seems to ignore it. What gives? Mario.

  • Error in my ipod shuffler! HELP!

    when i try and press play in my ipod shuffler it saids error (lights green and orange come up). What should i do?!?   Windows XP  

  • Sending a mail

    hi experts. Is there any possibility to make , microsoft office to be linked with sap for the purpose of sending mails to external sources such as purchase order etc. kindly give me a suggestion how to do it... thanks &regards deepika.