Using an external css in Flex 4

I'm using the Flex 4 beta and the ability to load an external css seems to be broken. Running the code below shows no styling at all. Have I missed something?
components.MainPanel.as:
package components {
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.StyleSheet;
public class MainPanel extends Panel
    private var mainLabel:Label = new Label();
    private var label2:Label = new Label();
    public function MainPanel()
        super();
        var cssUrl:URLRequest = new URLRequest("css/style.css");
        var cssLoader:URLLoader = new URLLoader();
        cssLoader.addEventListener(Event.COMPLETE, cssLoaded);
        cssLoader.load(cssUrl);
    function cssLoaded(event:Event):void {
        var css:StyleSheet = new StyleSheet();
        css.parseCSS(URLLoader(event.target).data);
        mainLabel.styleSheet = css;
        mainLabel.htmlText = "Main Label";
        mainLabel.horizontalCenter = 0;
        mainLabel.verticalCenter = -350;
        mainLabel.setStyle("styleName", "h1");
        addElement(mainLabel);
        label2.htmlText="Sub-Label";
        label2.horizontalCenter="0";
        label2.verticalCenter="-300";
        addElement(label2);
css/style.css:
.h1 {     color:#ffe145;     font-family: Verdana;     font-size: 36;     font-style: italic;     font-weight: bold; }
app.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/halo"
               xmlns:custom="components.*"
               minHeight="768"
               minWidth="1024"
               backgroundColor="#333399">
    <custom:MainPanel horizontalCenter="0" verticalCenter="0"/>
</s:Application>

Thanks for the quick response dj_page. I definitely expect compression when creating jpegs but this kind of shocked me especially since I was starting with a jpeg.
The pixel count difference is indeed the result of cropping so that's expected.
After some experimentation with exporting files as jpeg and then comparing them to the file created as a result of "Edit in..." it seems that it would take a quality setting of 60 in LR Export to create a file of the same size that's created by Edit In. That's lower than what I thought was the LR default of 75 and definitely produces visible degradation.
Maybe someone who uses Edit In... can either confirm that there's a problem (and hopefully a workaround) or that it must be something with my setup.

Similar Messages

  • How to use external CSS for standard items ?

    Hi,
    I would like to use my external CSS style-sheet for the standard items I add to my portal page.
    I build an UI template with a CSS-link to my css style-sheet, and I used this UI template for my portal page. But it seems that items cannot use this UI template CSS reference.
    Is there a way to use external CSS on standard items (text, url,...) ?
    Thanks for your help,
    Best Regards,
    JC.AUDARD

    Easiest way I find to do it is to drop your css file in the portal/images folder. Make a hidden html portlet on your template and link to /images/mycss.css. You can then use it for many items such as text, links, html portlets, etc.

  • How can I convert external CSS to all be defined in page?

    I need to move all CSS to be defined in the head of the page.  Is there an easy way to do this with DWCC?

    In the external file, hit Ctrl + A to select all, then Ctrl + C to copy it to your clipboard. Add a <style> </style> tagset to your <head> section and hit Ctrl + P to paste it between them. I Know DW can externalize css, but I don't think there's a function to go the other way.
    Generally speaking, it's far better to use an external css file than it is to use embedded css though. Is there any particular reason you want to move it all?

  • I want to do multiple a:link colors in external CSS

    I want to do multiple colors for my Links/URLS (a:link). I am
    using an external .css file. Am i forced to embed some styles
    within html in parallel to having an external CSS file? can someone
    help answer this and/or show examples? thank you.

    Put this in your External CSS:
    .newlink:link{ /*unvisited*/
    color:#990000;
    text-decoration:none}
    .newlink:visited{ /*visited*/
    color:#9999FF;
    text-decoration:none}
    .newlink:hover{ /*mouseover*/
    color:#990000;
    text-decoration:underline}
    .newlink:active{ /*selected*/
    color:#FFCC00;
    text-decoration:none}
    .newlink:focus{ /*optional, same as hover, but with tab key*/
    color:#990000;
    text-decoration:underline}
    Put this list of links inside your HTML code:
    <ul>
    <li><a class="newlink" href="#"> Link
    1</a></li>
    <li><a class="newlink" href="#"> Link
    2</a></li>
    <li><a class="newlink" href="#"> Link
    3</a></li>
    </ul
    Does this help?
    --Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    "domerdel" <[email protected]> wrote in
    message
    news:g3e951$kk5$[email protected]..
    > I want to do multiple colors for my Links/URLS (a:link).
    I am using an
    external
    > .css file. Am i forced to embed some styles within html
    in parallel to
    having
    > an external CSS file? can someone help answer this
    and/or show examples?
    thank
    > you.
    >

  • Insert a div box background for one document only while using external CSS style sheet.

    I am trying to set a background image in one of my div boxes, but because I am using an external style sheet it changes it in all my documents. How can I do it with just this one page? Preferably in design mode.

    What i did to slove this problem was:
    Open my external CSS style sheet
    Copy the contents of it
    Remove the CSS link in the one page i wanted to be different.
    Pasted the contents in the <head> under the rest of the CSS rules for that page.
    Then I could set the background for that box w/o altering the other pages..
    I tried the other suggestions, but could not get them to work. Not saying they are wrong, but maybe i was implementing them wrong.

  • External CSS modification

    Hi all,
    I have a situation which I need to support external CSS files
    editing. The customer should be able to modify his CSS files so the
    application will get his changes at runtime.
    I know of two available Flex solutions to this situation:
    1) External CSS approach using StyleManager - correct me if
    I'm wrong I need to compile CSS files to SWF to make it work.
    2) External CSS using URLLoader which load the CSS file and
    it can be parsed with StyleSheet object which works only on
    TextField and I didn't get that all the way - why only for
    TextField object ???
    In the first case I have to compile my CSS and in the second
    I have to write some code for getting the style to work with all of
    Flex component (using CSSStyleDeclaration)
    I'm looking for more elegant solution - is there one?
    Thank you.

    <div class="myforms">           
                <html:form styleClass="search" action="search" >
                    <html:text styleClass="text" property="firstInput" />
                    <html:text styleClass="text" property="secondInput" />               
                    <html:submit styleClass="searchbutton" value="Start" />
                </html:form>
                <br/>
                <html:errors property="firstInput"/><br/>
                <html:errors property="secondInput"/>
            </div>page is ok upto validation process, by clicking start page should not change with wrong input, which in my case is only integers, but will get same page without my layout, which is linked external css and used
    <link rel="stylesheet" type="text/css" href="style1.css"/>

  • Unable to embed External CSS file, dropdown list,filter panel and dimension filter are not working in SAP Design Studio Tool

    Hello Everyone,
    I am new to SAP Design Studio. I am working on creating dashboards and I am using Design Studio 1.2 version. Please suggest some solutions for the following issues. Thanks in Advance.
    1. External CSS file which is embeded using custom CSS option under "application component properties" is not working.
        * I kept the external CSS file inside repository-> my application folder.
    2. During runtime, getting javascript error while selecting '-' option from filter panel.
    3. Unable to select or type dimension name under "dimension filer component" properties.
    4. Getting runtime error for dropdown list, and I have inserted the following code under "onStartup" option of Application component properties.
    "DROPDOWN_1.setItems(DS_1.getMemberList("PRODUCTREF", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 20));
    and dimension values are not populated in auto suggest."

    There should be an Error Log under View > Error Log that gives you more details of these errors.  Could you add that?  There is also a View > Script Problems log that provides more details as well.

  • How do I use the same css style but different attributes, Without affecting another page.

    Hey everyone,
    I am using the "NivoSlider", for my dreamweaver page but I am not sure how to tell styles that one page has one attribute and the other one will have a different attribute.
    For example: in my "about us" I have a small slideshow with its own pictures. I then put  a gallery page with its own pictures, yet, I want to make that slideshow box larger without affecting the other small slideshow.
    I am using just one Style.CSS for the slideshow.
    Anyways, is their a way to tell tell the code that one page is going to be a different width then the other?
    Thank you!

    Embedded CSS rules take priority over styles in external style sheets.   So you can add page specific rules between your document's <head> tags and after all other links to external CSS files.
    <style>
         page specific rules here....
    </style>
    Nancy O.

  • How do i convert my music and pics over from windows to mac using a external hard drive.

    New mac user.  How do i convert my files from windows to mac using external hard drive.  I am using a Seagate freeagent go flex.

    leave as is and add NTFS driver to write to the drive / migrate maybe / reading NTFS drives isn't always perfect, some times external drive case has trouble mounting or staying mounted and suffers slow copy speed after awhile or with large files which is why I suggest Paragon NTFS for Mac OS X.

  • CS4 Live View Won't Display External CSS

    I have a simple .html file - all located on my local machine
    with an external .css file located in the same folder as the .html
    file. Everything displays fine in a browser. Live View won't
    display items in my external css file. It displays items in the
    inline file fine. If I move items from the external to the inline
    file they will appear. Links are relative to the Document in the
    site setup. No default images folder defined (images are in a
    folder called "images").
    I know it's something simple and dunderheaded. Just getting
    back into html after a little hiatus. Any help greatly
    appreciated.

    > If this is a static site, ignore the Live View button.
    > Test it in browsers using F12.
    Live view will work fine in a static site, though.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Alan" <[email protected]> wrote in
    message
    news:C5713A99.31982A%[email protected]..
    > suggestion-
    >
    > Make every line in the site defintion Correct.
    > If not sure what it should be, ask.
    >
    >
    > If you use site root relative paths, enable using temp
    files in dw
    > preferences->Preview in browser
    >
    > The link to the external css file is a site root
    relative path.
    > Change it to a document relative path
    >
    > There is a pulldown at the bottom of the "browse to
    file" dialog box to
    > choose linking method.
    >
    > --
    > Alan
    > Adobe Community Expert, dreamweaver
    >
    >
    http://www.adobe.com/communities/experts/
    >
    >
    >

  • Loading an external CSS stylesheet

    I am new to Flash and trying to get an external CSS
    stylesheet to work correctly. I loaded the following sample code
    from the Adobe help files but the html text does not format
    correctly? If I add a StyleSheet object , then it will format just
    fine. The external CSS file is in the same directory as the SWF
    file and I'm not getting any error messages. Using IE7 and Flash
    Player 9.0.115....Any help would be much appreciated.

    you can use something like the following to make your code
    more eyeball friendly:

  • How to Live View with external CSS files?

    I am using a simple HTML page that references several external CSS style sheets.  The style sheets are site root relative.  The code validates.
    http://www.sandsmuseum.com/coinop/games/evansraces/documentation/index.html
    In Dreamweaver, the page looks good in Design View.  Previewing in a browser looks good when the box to save temporary files is checked (replaces css inline for the input to the browser.)
    However the page is missing the CSS and an image that is site root relative when I try to view it with Live View.
    Does Live View only work with a test server?  I tried setting up a test server that points to the remote server but that does not seem to help.
    I am sure I am missing something.  Can someone please help?
    Thanks,
    Michael

    Apparently I did not ask the question correctly or even make it interesting.  Does anyone have a suggestion on how I might ask the question next time?
    thanks
    Michael

  • Link to an external CSS style sheet

    This question was posted in response to the following article: http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7e1ca.h tml

    I am assuming you're working within a Defined Local Site Folder.  If not, go to Site > Manage Sites > New...  
    For further details:
    http://help.adobe.com/en_US/dreamweaver/cs/using/WS753df6af718a350a60097e0f131686fa2b4-7ff e.html
    How to attach external CSS files to your HTML pages.
    http://alt-web.com/DEMOS/DW-Link-Stylesheet.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • External CSS in CS6?

    The option to save HTML with an external CSS sheets eems to have disappeared in CS6. Any way of restoring it? CS5.5 was fine, and the reference PDF says it's still there.

    Correct, and thank you for the quick reply, Steve.
    Unfortunately, when you do this, instead of a straightforward reference to one's external sheet being put in the HTML, as was the case in CS5.5, two new files are made and referred to: [filename]-resources/css/[filename].css and [filename]-resources/css/[external sheet filename].css - the latter being a copy of the external sheet.
    So instead of having a single css file for a whole site, we have a separate one for each page. If the css is updated, every page will need to be re-saved.
    As I'm using InDesign for a diary web site which has many frequently-updated pages (Indesign is used so that its files can be used for the bi-monthly printed version), this is not helpful. I suspect someone at Adobe's been too d___ clever.

  • AS3 - External CSS and External text

    I'm going nuts here. I have successfully loaded text from an
    external file. I have successfully loaded styles from external CSS.
    Trace appear to confirm that both have loaded. My Problem is that I
    cannot get the styles to apply to the text.
    I thought that perhaps it was a sequence issue and have tried
    to make sure that the CSS loads before the HTML. I have also
    attempted to apply the style by using a button event (but did not
    include that code) just for testing but that did not work either. I
    did apply the same CSS to text typed in Flash and that was styled
    correctly - just to confirm that the CSS was valid.
    Anyone see what my problem is? Thanks

    I'm going nuts here. I have successfully loaded text from an
    external file. I have successfully loaded styles from external CSS.
    Trace appear to confirm that both have loaded. My Problem is that I
    cannot get the styles to apply to the text.
    I thought that perhaps it was a sequence issue and have tried
    to make sure that the CSS loads before the HTML. I have also
    attempted to apply the style by using a button event (but did not
    include that code) just for testing but that did not work either. I
    did apply the same CSS to text typed in Flash and that was styled
    correctly - just to confirm that the CSS was valid.
    Anyone see what my problem is? Thanks

Maybe you are looking for

  • Path and Name field in SPD 2010 Workflow for creating Doc Sets

    Hi Guys, Here's hoping you can help out and give a few pointers. I'm currently trying to implement what I thought was quite a simple workflow involving the creation of a Content Type (similar to Doc Set but with additional field) within an alternativ

  • Ios7.0.1 bluetooth connectivty with car stereo not working properly?

    I have updated my Iphone to Ios7.0.1  Before this update connection between my Iphone and car stereo was not an issue. Now the only way to play music through this device is to use the iphone. Select track, volume, Etc the hands free buttons on the st

  • Sound in a racing game

    Hi, folks. I'm developing a racing game in MIDP 2.0. I've added some wav sounds to the menu and other UIs, which seems to have a short delay on playing. Now, I've got another problem! How can I add sound to the race? I need to find a way to synchroni

  • Field catlog in V/03

    Hi, Can we add new field catlog in the list (V/03 - create table)? if yes how can we add? regards, Akshay

  • My email list was stolen to be used by spammers-very embarrasing

    ''Duplicate post, continue here - [/questions/778661]'' last summer my email list was ttolen by spammers for their own use-i feel like i have been violated and it is embarrassing to say the least-i deleted my entire email list at that time and starte