Can't change style at runtime

I try to change the backgroundImage of a canvas
     private function butClickHandler(event:MouseEvent):void
                    /* invalidly */
          styleCanvas.setStyle("backgroundImage", "@Embed('bird.png')");
              //  styleCanvas.setStyle("backgroundImage", "Embed('bird.png')");
              //  styleCanvas.setStyle("background-Image", "@Embed('bird.png')");
               //  styleCanvas.setStyle("background-Image", "@Embed(source='bird.png')");
                    /* normally */
          styleCanvas.setStyle("backgroundColor", "#777777");
          Button(event.target).setStyle("fontSize", 22);
        <mx:Button x="38" y="44" label="为中国喝彩" click="butClickHandler(event)"/>
     <mx:Canvas id="styleCanvas" width="80" height="80">
          <mx:Label text="I'm Label"/>
     </mx:Canvas>

You need double-quotes:
styleCanvas.setStyle("backgroundImage", @Embed('bird.png'));
If this post answers your question or helps, please mark it as such.  

Similar Messages

  • Can I change "colorscheme" at runtime?

    Hello all
    Can I change the value of colorscheme at runtime ?
    This parameter can be config in formsweb.cfg file.
    I want to put this colorscheme as "User Preferences" in my application.
    Please help me if some one knows how to achieve this.
    From
    Chirag Patel (Nairobi)

    Chirag,
    You cannot change the colorscheme within a forms session, but you can override the value in formsweb.cfg at startup by specifying it in the URL, e.g.
    http://.../servlet/f60servlet?form=myform.fmx&colorScheme=blaf
    so you could allow users to choose their own colorscheme, e.g. if they started Forms from a web page or simple web app that allowed them to select a colorscheme.
    Mike.

  • Seen this question before but no answer, how can I change my email address from all caps into a more proper upper-lower style.

    Seen this question before but no answer, how can I change my email address from all caps into a more proper upper-lower style.

    You should be able to change your e-mail address from your provider ... then edit it to meet the Apple requirements.   Unfortunately you've given us no profile details so we can't tell what device you have.

  • How can you change property files of a EJB at Runtime?

    Hi,
    I have got an ejb and want to change my variables which I stored in property file at Runtime.
    But the property file isn´t in the jar-file of my ejb...
    How can I add it.
    Or How can I change the property file without new compilation.
    Thanks
    Uli

    Hi Uli,
    the previous post is generally correct, but without taking any part in the sensibility of this (there are valid reasons why you would not store the values in a DB) it would be necessary for you to be a bit more specific.
    Is your problem that you can not see the file from your EJB or that you don't know how to change a property file entry in general?
    Cheers,
    Kalle

  • Assets panel styles, can i change the color of a style to be an exact color?

    Assets panel > styles, can i change the color of a style
    to be an exact color? for example, if i want to create a navbar
    with the black and gray glass affect style, but i want to change
    the color but keep the same style of shading. each style in the
    assets panel has a default color, but i want to change the color
    and keep the style. i did change the color a little bit by
    adjusting the hue and saturation, but i can't seem to get an exact
    match of the color i am trying to duplicate. any help is greatly
    appreciated thanks

    When a style is applied to any object, the Properties panel
    at the bottom will reflect the attributes which are editable in
    that applied style. The properties which can be edited are fill and
    stroke colors also apart from adjusting the Hue and Saturation.
    Gradient colors can be modified by changing the fill color.
    The nodes in the gradient will change the color from blue to black
    or any other intended color of change. If you know the color you
    can either enter it as a 6 digit value or you can pick a color from
    an existing object.
    Hope it helps. Let me know I am missing you query
    completely.

  • How can I change the style of a row in tableview?

    Hi,
    How can I change the style of a row in tableview, for example ,I have 10 items in table view, and I'd like to change row 1,4,10 background-color:red; font-family:Arial ,Font-Weight:BOLD.
    Any suggestion?

    Yes, I knew how can I change the style using cell factory. there is a lot of work to do if it has so many columns in table view. we need to implement every cell factory, Do we have a simple way to change the whole row style , just like fabsav said, I 'd like to set the special row like this line:
    tableview.getItems().get(i).setStyle("myRowstyle"); And I found a bug if I implement my functionality with cell factory way, I can't change the cell style after rendering cell.
    protected void updateItem(Object object, boolean empty) {
          super.updateItem(object, empty);
    }updateItem() was only triggered while cell is being rendering, there is no way if I'd like to change the cell style after rendering event.
    Hi fabsav, How can I apply a CSS class to a specific row? Can you please provide a short example?
    Edited by: imtoocute on Aug 28, 2012 10:31 AM

  • Can I change fonts ? (size and/or style)

    I have just got a printer for the first time (with my iMac). I can't see how to adjust/choose a font style or size if ,for instance I want to print off an email i receive.
    Any advice would be welcome,thank you loons
    iMac G5   Mac OS X (10.4.5)  

    For emails (and all documents) you can just make the fonts bigger before printing by Command-"+".
    You can also change the scale % under File> Page Setup which will adjust the document you are printing. Use that with a combination of Print Preview to get exactly the size you want.

  • Can we change the font size of (none) style in RH8?

    In RH8 when you add bullets, numbers or a new row to an existing table the style immediately to (none).  And (none) is 12pt.  Our "Normal" is a 10pt....and the font size does NOT show in the editor for (none)...only in Preview or compiled webhelp.  So many people are missing that they have a (none) applied somewhere in the topic until its in Production.
    I can't find (none) in the stylesheets and it doesn't allow me to select and edit it.
    Is there a way to change the (none) size font to Arial 10pt?  The Arial seems to hold from Normal to (none) but the 12pt is killing us.
    It would be nice if it would keep the Normal that was origionally applied...but if I can force 10pt life would be much, much simpler.  ??
    THANK YOU for your creative answers!!!

    Hi Teri.
    You certainly can change the "None" style but I think it is not good to leave text in topics with no style assigned to it. When assigning things like bullets using the formatting toolbar icon it applies a "None" style forcing you to select a style (e.g. Normal). See here for further details (look in the RH8 section).
    If you want to change the "None" style, expand the "Other" styles section of your CSS file. In there is a "Background + Text [Body]" style that can be changed. It is this style that is used by the "None" style.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • How to change style property in runtime

    Hallo. I have this style tag in my main application:
    <fx:Style>
         @namespace s "library://ns.adobe.com/flex/spark";
         @namespace mx "library://ns.adobe.com/flex/halo";
         @font-face {
         src: url("../caratteri/MyriadPro-Bold.otf");
         fontFamily: "MyriadPro-Bold";
         embedAsCFF: true;
         .mioStileMyriadProBold {
         fontFamily:MyriadPro-Bold;
         fontLookup: embeddedCFF;
    </fx:Style>
    It works good but i wish to change the fontFamily while the program is running. How can i do that?
    Thx a lot.
    Max

    Hallo. Thx for the answer. I would like to know if your solution is working always. I mean, in my example i showed you that i have this:
    .mioStileMyriadProBold {
    fontFamily:MyriadPro-Bold;
    fontLookup: embeddedCFF;
    But what if i have 2 custom styles??.. How can i change one or another specifically ??
    I hope you understand what i mean.
    Max

  • Can we change width of the column at runtime

    I have a report with columns assigned runtime, can we change width of the colimn runtime?
    for example Query: select &lp_1, &lp_2 from emp &LP_Where
    if i assign lp_1 empno size 10 and empname size 50. Vertical and horizantal elasticty is not going work for me. Any suggestions please..
    Lalitha

    Doubt there is the dynamic you are seeking.
    But you may put a few overlapped columns (diff. length of course) and display/hide by passing parameters.

  • Can I change Data Source dinamically at runtime?

    I need to execute the same reports on testing environment and production environment. How could I to change DataSource at runtime, depending on users want to execute reports querying testing database or production database without modifyng report definition?

    Hi,
    what I'd recommend in your case: setup your development/test systems as separate systems parallel to your production system. Clone your production environment to those development systems. Then a developer can login to the development system and run the reports (and modify there without touching real production system) and normal users work on the production system and just for validating the new developments they login to the test system.
    That's a standard approach in software development and IT systems operations.
    How does your infrastructure look, I have the impression that you have on BI server and two databases (prod and test)? Why not setting up a test environment for the BI server, too?
    best regards,
    David.

  • How can i change the window scroll bar property at runtime...???

    hi all ,
    can i change the Window's (Forms window) "Show horizontal scroll bar property" at runtime, i mean programatically... Is there any property which i can set....??
    Thanx in advance
    Regard's
    Prasad

    There is no property there for your required task.
    Hassan

  • Can you change graphic text at runtime?

    can you change a text graphic item at runtime? There's no property for the text itself, or a visible property.

    No - use a Display Item - or put the text on a Stacked canvas and you can then hide the whole lot.

  • Can't change the font, color, size, text style, or alignment in iMovie 09..

    Hi there
    Just startet editing an mp4 file. I'm trying to do subtitles, and the only suitable option is the "Lower Third' titling option. According to the Help file "Select the title in the Project Browser, and then click Show Fonts in the viewer. The iMovie Font Panel opens." Well, it doesn't. 'Show Fonts' just disappears....am I missing something?
    Thanks in advance.

    I found out that you have to choose font, style & pt. size BEFORE you start typing your title, which is lame. If you type your title, you can't change the font etc. afterwards—you have to delete the title and start again. Very annoying, and, for Apple, a surprising bug.

  • Can we change the keyboard language that is displayed on iphone programatically i.e can we give user option to change keyboard to different language from application at runtime?

    Can we change the keyboard language that is displayed on iphone programatically i.e can we give user option to change keyboard to different language from application at runtime?

    Hi All,
    Please Update the Thread
    Regards
    Khanna

Maybe you are looking for

  • BI Publisher Report Layout Get Distorted when viewed in different format

    Hi Experts, I am facing issue while running BI Publisher Report. The Report Layout work fine in one output format (PDF). But when the same report is generated in different format it get distorted (HTML,EXCEL). Could any one please let me know how to

  • Smart Objects without tmp files

    I am trying to place/ import a .psd as a smart object into a composite and have Photoshop keep referenceing that same psd witout it creating a local tmp file. does anyone know fi this can be done? Thanks!

  • How to use SOAP with JSP (New to SOAP)

    Hi, i had a sch assignment(a set of JSPs)............anyone know how i can go about using soap for the encoding of data ? cos i had read up some books but i'm not sure how to go about implementing it !!!!! Anyone can help me? Regards, khim

  • (Automated) Tables in RoboHelp

    So we have this table on Excel. It's a table with different amounts  spread across multiple columns and multiple rows over many pages. The  way this table is set up is that we change one amount (which is hidden)  and then all other amounts change. In

  • How do I get my cracked screen fixed?

    Not sure how to go about getting my screen fixed on my iPod touch! Any one got any ideas?