Fonts in Runtime CSS compiled as SWF do not render with setFormatOfRange() but works with setStyle()

Im having a requirement to load fonts at runtime and display them in a  RichEditableText, The text in the RichEditableText could have multiple  formats so I use the RichEditableText's setFormatOfRange() method to set  the font.
I use a CSS compiled as a SWF to load the fonts, Fonts render when the font is set via the -setStyle() method as demonstrated in the code below
Im using Flash Builder 4 with SDK version 4 to compile the app(Using the default Spark Theme).
Below is the CSS file (fontCSS.css)- You might need to copy fonts from the Widows Font folder for this in a fodler named fonts,
/* CSS file fontCSS.css*/
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@font-face{
    src: url("fonts/Articulate.TTF");
    fontFamily: "Articulate123";
    embedAsCFF: true;
@font-face{
    src: url("fonts/AGENCYB.TTF");
    fontFamily: "Agency123";
    embedAsCFF: true;
Right Click on the CSS file, in Flash Builder 4 and select "Compile CSS to SWF".
Run the MXML application below and you should see the issue Im trying to describe.
<?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/mx" minWidth="955" minHeight="600"
               creationComplete="application1_creationCompleteHandler(event)">
    <fx:Script>
        <![CDATA[
            import flash.utils.describeType;
            import flashx.textLayout.formats.TextLayoutFormat;
            import mx.collections.ArrayCollection;
            import mx.events.CalendarLayoutChangeEvent;
            import mx.events.FlexEvent;
            import mx.events.StyleEvent;
            import spark.events.IndexChangeEvent;
            private var swfLoader:Loader
            protected function application1_creationCompleteHandler(event:FlexEvent):void
                var cssEventDispatcher:IEventDispatcher=styleManager.loadStyleDeclarations("fontCSS.swf")
                cssEventDispatcher.addEventListener(StyleEvent.COMPLETE, onComplete);
            private function onComplete(event:Object):void
                fontList.dataProvider=new ArrayCollection(Font.enumerateFonts())
            protected function fontList_changeHandler(event:IndexChangeEvent):void
                var tlformat:TextLayoutFormat=new TextLayoutFormat()
                tlformat.fontFamily=fontList.selectedItem.fontName
                textEditor.setFormatOfRange(tlformat,0,5)
        ]]>
    </fx:Script>
    <s:layout>
        <s:VerticalLayout/>
    </s:layout>
    <s:Label text="Please select a font from the list below"/>
    <s:List id="fontList" change="fontList_changeHandler(event)">
    </s:List>
    <s:RichEditableText id="textEditor2"
                        fontSize="30"
                        fontFamily="{fontList.selectedItem.fontName}"    >
        <s:p>Hello -  fontFamily set via css binding</s:p>
    </s:RichEditableText>
    <s:RichEditableText id="textEditor"
                        fontSize="30"
                        >
        <s:p>Hello - fontFamily set via setFormatOfRange()</s:p>
    </s:RichEditableText>
</s:Application>
tried to use an external SWF with the fonts compiled in them Via AS3, that too dosent seem to work, The setStyle() also refuse the work with the below SWF
here is the AS3 project code for your reference
FontEmbedder.as
package
    import flash.display.Sprite;
    import flash.system.Security;
    import flash.text.Font;
    public class FontEmbedder extends Sprite
        public function FontEmbedder()
            Security.allowDomain("*")
        [Embed(source="/fonts/Articulate.TTF", fontName="Articulate123", embedAsCFF="true")] 
        public var articulateFont:Class;
        [Embed(source="/fonts/AGENCYB.TTF", fontName="Agency123", embedAsCFF="true")] 
        public var agencyFont:Class;
We ve been wrecking our heads off to figure out a solution for this. Ultimately decided to post a question here.
Your feedback will be highly appreciated.
Below are  snapshots of how the 2 fonts are rendered
Regards.

Hi Alex,
I did read through your blog the other day, This must have been thepost you were referring to,
http://blogs.adobe.com/aharui/2010/03/flex_and_embedded_fonts.html
The post is explanatory, but how would we implement this successfully wth code?
A working AS3 code example of your explanation would be more than helpful.
Regards

Similar Messages

  • .flv in .swf will not play in Firefox but works fine with IE.

    My .swf file plays fine in IE but will not play the .flv portion in Firefox.

    You forgot the /images path in the embed (you swapped name and src)
    src="mainflash1.swf" -&gt; src="/images/mainflash1.swf"
    name="/images/mainflash1" -> name="mainflash1"
    <pre><code>&lt;embed
    type="application/x-shockwave-flash"
    pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
    name="mainflash1"
    width="518" height="274"
    src="/images/mainflash1.swf"
    bgcolor="#FFFFFF"
    quality="high"
    allowscriptaccess="samedomain"
    &gt; &lt;/embed&gt;</code></pre>

  • Are Adobe Captivate swf files not compatible with IE8 or IE9 when inserted into RoboHelp projects?

    Hi,
    I've published Adobe Captivate swf files and then inserted them into my RoboHelp project. I then synced my RoboHelp project with our website and the videos within online help are not functioning in IE8 or IE9. They are only working in IE11.
    Thanks,
    Jaimie

    Hi there
    When a SWF plays in IE, it uses the Flash Player ActiveX control. I'm not 100% sure that different versions of IE would share the install. So if you have one version of IE on your machine, perhaps it either doesn't even have the control added in or it's the wrong version.
    One thing I would check in the browsers where the content seems to be missing is to right-click the blank area and see if you coax a Flash pop similar to below:
    Then note the version number.
    You may find that all that you (or others) need to do is ensure you have at least a specific version of the player/add-in installed.
    Cheers... Rick

  • I just downloaded FF4 and now my font size in Gmail is SO small. Not so with other websites. How can I fix this?

    I don't know how to adjust the font size just for Gmail. Other websites don't seem to be affected but Gmail is showing up unbearably small.

    You can use one of these extensions to set a default font size and page zoom on web pages:
    * Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    * NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • AIR App now crashes with AIR 15 runtime (did not crash with earlier versions of AIR)

    Hi,
    We've noticed our AIR application now crashes when the AIR 15 (the latest version available from Adobe) runtime is installed.  This did not happen with earlier versions of AIR.  The app does not crash when I debug in Flash Builder so I cannot identify the exact issue.  The app will crash EVERY time when running the .exe on Windows.  The crash happens on Windows XP and Windows 7.  The app does not crash on OS X.
    The message in Event Viewer says:
    Faulting application name: PhotoMambo.exe, version: 0.0.0.0, time stamp: 0x4eb75ae0
    Faulting module name: Adobe AIR.dll, version: 15.0.0.249, time stamp: 0x53fe5c69
    Exception code: 0xc0000005
    Fault offset: 0x0056fcdc
    Faulting process id: 0x3dc
    Faulting application start time: 0x01cfd110de4c8b50
    Faulting application path: C:\Program Files (x86)\PhotoMambo\PhotoMambo.exe
    Faulting module path: c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll
    Report Id: 49c106e0-3d04-11e4-9219-001c42d9a43e
    Please let me know if you'd like any additional information.  This is such a bummer that an AIR update renders our app useless in Windows.
    Thank you.

    I'm sorry this is happening.  Could you please open a new bug report on this over at bugbase.adobe.com?  When adding the bug, please include sample code or an application so we can quickly test this out internally.  If you'd like to keep this private, feel free to email the attachment to me directly ([email protected]). 
    Once added, please post back with the URL and I'll follow up internally.
    Previous versions of the AIR runtime can be found here: Archived Adobe AIR SDK versions

  • CSS file compiled into SWF...

    Hello,
    I have a problem with all my css files in my Flex project. I
    need them to be compiled into SWF because its the only way to load
    and switch them at runtime.
    I use a ClassReference to a custom programmatic skin in the
    css file:
    skin: ClassReference(
    "com.someawsomepackage.util.manager.SkinManager" );
    MY PROBLEM is that I HAVE TO place the various css file in
    the ROOT folder of my project so that the compiler can find and
    compile this classreference along with the css.
    I would like to place the css files into a style folder...
    But I will get a compile error if I do so.
    Anyone has an idea ? thx !

    did you try compiling them manually from the command line using mxmlc?

  • Use compc to compile flex runtime css files

    Can someone post a command line example of how to compile to
    a css file to swf for runtime skinning in flex ?
    Thanks,
    Firdosh

    Could you please share your swf and app.xml, packaging, your project (if possible) at [email protected]
    I will get a bug logged for this.

  • Loading font at runtime for TLF in Flex 3.3

    Hey flexers,
    I have an app that's using the Flex 3.3 SDK.  We pulled the text layout swc from Flex 4 and are using a text flow in our app.  Previous to this we had been using the old TextField.
    How do I go about loading in a font swf at runtime and getting a text flow to use it?  I've tried several things as posted on the forum and around the web and it never actually takes effect in the text flow.  Here are a couple questions I came up with along the way though:
    When I compile the font swf from the font css, do I need to have embedAsCFF=true?
    Should I be able to use StyleManager.loadStyleDeclarations() to load in the font swf?  When I do, I get the following error:
    VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.
    Any idea why or know how I would load in the font swf?

    Let me clarify a bit.  Here it says that I need to set embedAsCFF=true to use the font with FTE:
    http://help.adobe.com/en_US/flex/using/WS0FA8AEDB-C69F-4f19-ADA5-AA5757217624.html
    It's my understanding that in order to use embedAsCFF=true I need to be using the Flex 4 sdk.  However, when I convert the CSS to a SWF and attempt to load it into my Flex 3.3 app using StyleManager.loadStyleDeclarations() I get the error:
    VerifyError: Error #1014: Class mx.modules::ModuleBase could not be  found.
    It would appear it's because I'm attempting to load a font "module" that was built in Flex 4 into an app built in Flex 3.3.  Is it possible to load a Flex 4 module into a Flex 3.3 app?  Is there some other workaround?

  • Runtime css WHY BOTHER

    hi,
    there are a lot of blog posts and excellent documentation on using runtime css.
    however, none of them really address the *why*.
    the adobe docs say:
    "By loading style sheets at run time, you can load images (for graphical skins), fonts, type and class selectors, and programmatic skins into your Flex application without embedding them at compile time. This lets skins and fonts be partitioned into separate SWF files, away from the main application. As a result, the application's SWF file size is smaller, which reduces the initial download time. However, the first time a run-time style sheet is used, it takes longer for the styles and skins to be applied than if you load styles by using the <mx:Style>
    tag. This is because Flex must download the necessary CSS-based SWF file while the application is starting up or running."
    from what i gather:
    - it's good because i've separated my styling code from my application code. ok, fine. not critical tho.
    - reduces initial download time? fine. but I still can't display my app because I have to wait for the css swf to be download first and then be applied (which takes longer to apply at runtime)
    - takes more code to apply the style, when to apply it in the initialization phase, and how to avoid flicker of original halo style
    - i've seen a few posts on problems with css and modules
    do i need to swap css styles at runtime? no.
    but lets assume i want to change the style in the future to give it a fresh look. i could simply replace the css swf on the server and only that swf will be downloaded and updated in the users browser cache. correct? great. for all that architectural pain, i've saved them a few extra kilobytes of download time.
    and what about themes? the halo theme is the default and compiled into your app *regardless* of whether u use runtime css or compile time css. so u may as well build a theme swc to begin with.

    Some folks have apps that swap themes/skins at runtime sort of like Windows Media Player.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Difference with embedded CSS vs loading runtime CSS

    Hi,
    Move from embedded CSS to runtime CSS, but having some subtle differences.
    note the numeric stepper handles have default colors, this is with embedded css and what the client wants
    This one is runtime css note the handles are black.
    I had this in both before embedded and runtime CSS
    NumericStepper {
       fillAlphas: 0.6, 0.4, 0.75, 0.65;
       fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
       themeColor: #92de78;
    I added this to the runtime css and entered the style name for the numeric stepper but still no luck
    .numericStepper {
            fillAlphas: 0.6, 0.4, 0.75, 0.65;
            fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
            themeColor: #92de78;
    Any ideas complete css below. BTW my alerts are not using the runtime css as well yet embedded css works fine  
    @font-face {
    src:url("auth_module/poetica.swf");
    font-family: "Poetica Std";
    Application {
       backgroundImage: Embed(source="/images/bkg.gif");
       backgroundSize: "100%";
    NumericStepper {
       fillAlphas: 0.6, 0.4, 0.75, 0.65;
       fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
       themeColor: #92de78;
            .numericStepper {
            fillAlphas: 0.6, 0.4, 0.75, 0.65;
            fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
            themeColor: #92de78;
    Alert{
    color : #000000;
    title-style-name : "alertTitle";
    button-style-name :"alertButtonStyle";
    header-height:21;
    border-thickness: 1;
    drop-shadow-enabled: true;
    drop-shadow-color :#CCCCCC;
    shadowDirection:right;
    shadowDistance:7;
    background-color: #ffffff;
    corner-radius :6;
    border-style :solid;
    header-colors : #DDDDDD, #ffffff;
    footer-colors : #DDDDDD, #ffffff;
    border-color : #333333;
    .alertButtonStyle {
    color : #000000;
    .alertTitle{
    font-family :Verdana;
    font-size :10;
    font-weight :bold;
    text-align :left;
    color :#000000;
    .selectedBox {
    headerColors:#336633,#447744;
    borderColor:#447744;
    titleStyleName: "selectedHeaders";
    .legendBox {
    border-thickness: 2;
    border-style:solid;
    border-color: #93C789;
    .legendMask {
    stroke-color: #333333;
    stroke-width:2;
    shadow-color: #333333;
    .legendTitle {
    font-size :12;
    font-weight :bold;
    .accordionHeaders {
    font-family: "Poetica Std";
    font-size:14pt;
    color:#FFCC00;
    .copyrighttext {
    font-family: "Poetica Std";
    font-size:14pt;
    TextInput {
       color: #0b333c;
    List {
       color: #0b333c;
    CheckBox {
       themeColor: #92DE78;
       fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
       color: #0b333c;
    .piecharBackground {
    backgroundImage: Embed(source="/images/bkg.gif");
       backgroundSize: "100%";
       color: #93C789;
    DataGrid {
       color: #0b333c;
       rollOverColor: #92de78;
       selectionColor: #93C789;
       textRollOverColor: #cc3333;
       headerColors: #000000, #333333;
       headerStyleName: "mydataGridHeaderStyle";
    .mydataGridHeaderStyle {
       color: #92de78;
    ApplicationControlBar {
       highlightAlphas: 0.4, 0;
       fillAlphas: 1, 1;
       cornerRadius: 0;
       fillColors: #000000, #333333;
       backgroundColor: #000000;
       color: #93C789;
    CheckBox {
    color: #93C789;
    Accordion {
       fillAlphas: 1, 1, 1, 1;
       fillColors: #000000, #333333, #000000, #333333;
       selectedFillColors: #000000, #333333;
       themeColor: #92de78;
       textRollOverColor: #cc3333;
       headerStyleName: "myaccordionHeader";
       borderColor: #93C789;
       backgroundImage: Embed(source="/images/bkg.gif");
       backgroundSize: "100%";
       color: #92de78;
    .myaccordionHeader {
       color: #92de78;
    TabNavigator {
    tabStyleName: "myTabs";
    selectedTabTextStyleName: "mySelectedTabs";
    dropShadowEnabled: true;
    backgroundColor: #2e2e2e;
    borderColor: #93C789;
    .mySelectedTabs {
    color: #92de78;
    .backGroundPanel {
            backgroundImage: Embed(source="/images/bkg.gif");
       background-size:"100%";
       color: #93C789;
       textRollOverColor: #92de78;
       dropShadowColor: #92DE78;
    Button {
       fillAlphas: 1, 1, 1, 1;
       fillColors: #000000, #333333, #333333, #000000;
       color: #92de78;
       textRollOverColor: #cc3333;
       borderColor: #93C789;
       themeColor: #92de78;
    RadioButton {
       themeColor: #92DE78;
       fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
       color: #0b333c;
    CheckBox {
       themeColor: #92DE78;
       fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
    ComboBox {
       themeColor: #92DE78;
       fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
       color: #000000;
    DateChooser {
       headerColors: #000000, #333333;
       themeColor: #92DE78;
       headerStyleName: "mydateChooserHeaderStyle";
       fillColors: #ffffff, #cccccc, #ffffff, #eeeeee;
    VScrollBar {
       trackColors: #333333, #666666;
       themeColor: #000000;
       borderColor: #000000;
    Panel {
       borderColor: #000000;
       borderAlpha: 1;
       titleStyleName: "mypanelTitle";
       dropShadowColor: #000000;
       roundedBottomCorners: true;
       headerColors: #333333, #000000;
    .selectedHeaders{
    color :#000000;
    font-weight:bold;
    .windowStyles {
                color: #92de78;
            TitleWindow {
            color: #92de78;
            closeButtonSkin: Embed("/images/del_24.png");
                /* Set values from defaults.css to null. */
                closeButtonDisabledSkin: Embed("/images/del_24.png");
                closeButtonDownSkin:Embed("/images/del_24.png");
                closeButtonOverSkin:Embed("/images/del_24.png");
                closeButtonUpSkin: Embed("/images/del_24.png");

    The documentation says that a NumericStepper is composed of a TextInput and 2 buttons so I do understand why the buttons are getting styled the way they are.
    I added a Button and a NumericStepper to a text application using Embedded Styles and it did produce the Button style effect.  I took the Button out and of course the Numeric buttons were rendered as the default Flex style of off grey / white.
    Some of the Flex objects have additional style properties that allow you to style the individual components of the object however the NumericStepper does not seem to have that option.
    I think the only way around it would be to get the children of the stepper and style them individually
     var btn:Button = numericStepper.getChildAt(1) as Button;
    btn.setStyle("fillColors",["#ffcccc","#cccccc"]
    and do the same thing for child 2
    or extend the NumericStepper and override the style to be what you would like.

  • How can C++ code compile to .swf or .air

    I know that, at adobe max 2007, Scott Petersen has compile the Quake C/C++ Code to air application.
    Now I want to compile C++ Code to .swf, How and can Flex SDK help me?

    <div class=Section1><br /><br /><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;<br />font-family:"Calibri","sans-serif";color:black'>what we are trying to say is;<o:p></o:p></span></a></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:black'>Yes, adobe did work on a C++/SWF project but this isn&#8217;t a<br />public project and we&#8217;re not sure if it ever will be.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:black'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:black'>So far it&#8217;s only internal to Adobe not available to the<br />public, and it may or may not ever be made public</span><span style='font-size:<br />11.0pt;font-family:"Calibri","sans-serif";color:black'><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:black'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:black'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><br /><br /><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:<br />"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;<br />font-family:"Tahoma","sans-serif"'> xtaotao [mailto:[email protected]] <br><br /><b>Sent:</b> Saturday, September 13, 2008 2:22 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> Re: How can C++ code compile to .swf or .air<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new message was posted by<br />xtaotao in <br><br /><br><br /><b>Developers</b> --<br><br />  How can C++ code compile to .swf or .air<br><br /><br><br />you are not adobe, you cann't, adobe can. <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b6790b/5">How can C++ code compile<br />to .swf or .air</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b6790b!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • CSSStyleDeclaration / Runtime CSS

    Context:
    My framework loads CSS at runtime using SWF modules.
    Once my CSS module is loaded, I update the styles of my
    application
    using the mx StyleManager.
    My problem is the following:
    CSSStyleDeclaration.setStyle(styleProp:String, newValue:*)
    does not offer
    a way to delay the style update.
    The consequence is a lack of performance, because setStyle
    updates the whole
    display list each time it is called.
    Fortunately I found a workaround in my context (setStyle
    overloaded...)
    Note that
    StyleManager.clearStyleDeclaration(selector:String,
    update:Boolean) offers
    a way to delay the update.
    Is there any reason
    CSSStyleDeclaration.setStyle(styleProp:String, newValue:*)
    does not include an
    update parameter too ?
    Thanks.
    Thierry

    Hi,
    Great, simple example. I'm working on something similar; an
    application that loads runtime css.swf. When the loader and css.swf
    are online it works fine, and when the loader and the css.swf are
    offline it works fine. However when the loader is offline and the
    css.swf is online I get the following error. This situation is
    desired as it contracts me to use the 'live' styles while I do
    updates on my loader from my desktop. I can recopy my online
    css.swf to the offline as a workaround, but that is less desirable.
    I want to fix the issue so that the loader can be offline and the
    css.swf can be online. Typically in flash this type of operation
    (for everything except this css.swf workflow) works fine in my
    experience. As far as I can tell its because the css.swf does not
    'allow' itself, security-wise to be loaded. The css.swf has no as3
    scope of course (because its based in a *.css file) so I can't use
    Security.allowDomain('*'). Likewise it doesn't call a crossdomain
    automatically either.
    ERROR:
    Error: Unable to load style(SWF is not a loadable module):
    http://images50.neopets.com/style_set_manager/styles_EN_v1.swf.
    QUESTION:
    Anyone know how to get this to work? I'll check back to this
    blog daily, and post the solution here if I find it
    elsewhere.

  • How To register fonts at runtime in flex 4 ?

    Hi Guys
    I stuck in a problem .Actually i want to register fonts at runtime here is sample of code i am using :
    private function loadFont(url:String):void{
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, fontLoaded);
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);        
                loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
                loader.addEventListener(IOErrorEvent.DISK_ERROR, ioDiskHandler);
                loader.addEventListener(IOErrorEvent.NETWORK_ERROR, ioNetworkHandler);
                loader.addEventListener(IOErrorEvent.VERIFY_ERROR, ioVerifyHandler);
                loader.load(new URLRequest(url));
    //===============================================================================
    // funtion fontLoaded :: called after font loaded by loadewr class
    private function fontLoaded(evt:Event):void
    var fontLib:Class
    //trace("loaded " + "<<>> "+fontCounter);
    //FlexGlobals.topLevelApplication.fontArr[fontCounter];
    if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Arial") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontArial") as Class;
    //Font.registerFont(fontLib.Arial_2);
    Font.registerFont(fontLib._Arial);
    Font.registerFont(fontLib._Arial_bold);
    Font.registerFont(fontLib._Arial_italic);
    Font.registerFont(fontLib._Arial_bolditalic);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "A Little Pot") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontAlittlePot") as Class;
    Font.registerFont(fontLib._Alittlepot);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Book Antiqua") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontBookAntiqua") as Class;
    //Font.registerFont(fontLib.Arial_2);
    Font.registerFont(fontLib._BookAntiqua);
    Font.registerFont(fontLib._BookAntiqua_bold);
    Font.registerFont(fontLib._BookAntiqua_italic);
    Font.registerFont(fontLib._BookAntiqua_bolditalic);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Fine Hand LET") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontFineHand") as Class;
    Font.registerFont(fontLib._FineHand);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "NewBskvll BT") {
    fontLib =  evt.target.applicationDomain.getDefinitionByName("fontNewBaskerVille") as Class;
    Font.registerFont(fontLib._NewBaskervilleBt);
    Font.registerFont(fontLib._NewBaskervilleBt_bold);
    Font.registerFont(fontLib._NewBaskervilleBt_italic);
    Font.registerFont(fontLib._NewBaskervilleBt_bolditalic);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Segoe Print") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontSegoePrint") as Class;
    Font.registerFont(fontLib._SegoePrint);
    Font.registerFont(fontLib._SegoePrint_bold);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "SF Burlington Script SC") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontSFBurlingtonScriptSC") as Class;
    Font.registerFont(fontLib._SFBurlingtonScriptSC);
    Font.registerFont(fontLib._SFBurlingtonScriptSC_bold);
    Font.registerFont(fontLib._SFBurlingtonScriptSC_italic);
    Font.registerFont(fontLib._SFBurlingtonScriptSC_bolditalic);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Pica") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontPica") as Class;
    Font.registerFont(fontLib._Pica);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Signature") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontSignature") as Class;
    Font.registerFont(fontLib._Signature);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Verdana") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontVerdana") as Class;
    Font.registerFont(fontLib._Verdana);
    Font.registerFont(fontLib._Verdana_bold);
    Font.registerFont(fontLib._Verdana_italic);
    Font.registerFont(fontLib._Verdana_bolditalic);
    Font.enumerateFonts();
    } else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "SFBurlingtonScript") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontSFBurlingtonScript") as Class;
    Font.registerFont(fontLib._SFBurlingtonScript);
    Font.registerFont(fontLib._SFBurlingtonScript_bold);
    Font.registerFont(fontLib._SFBurlingtonScript_italic);
    Font.registerFont(fontLib._SFBurlingtonScript_bolditalic);
    Font.enumerateFonts();
    else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Paper Cuts") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontPapercuts") as Class;
    Font.registerFont(fontLib._Papercuts);
    Font.enumerateFonts();
    else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Sansation") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontSansation") as Class;
    Font.registerFont(fontLib._Sansation);
    Font.registerFont(fontLib._Sansation_bold);
    Font.enumerateFonts();
    else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Times New Roman") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontTimes") as Class;
    Font.registerFont(fontLib._Times);
    Font.registerFont(fontLib._Times_bold);
    Font.registerFont(fontLib._Times_italic);
    Font.registerFont(fontLib._Times_bolditalic);
    Font.enumerateFonts();
    else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "Handserif") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontHanSrf") as Class;
    Font.registerFont(fontLib._Handserif);
    Font.enumerateFonts();
    else if(FlexGlobals.topLevelApplication.fontArr[fontCounter].label == "WC RoughTrad") {
    fontLib =  evt.target.applicationDomain.getDefinition("fontWCRoughTrad") as Class;
    Font.registerFont(fontLib._WCRoughTrad);
    Font.enumerateFonts();
    //var xmlNode:XML = new XML("<font name='"+ FlexGlobals.topLevelApplication.fontArr[fontCounter].label +"' load='true'/>")
    //FlexGlobals.topLevelApplication.fontLoadStatusXML.appendChild(xmlNode);
    if(fontCounter < totalFonts-1) {
    fontCounter++;
    //FlexGlobals.topLevelApplication.taSetText.text += "\nloading "+ FlexGlobals.topLevelApplication.fontArr[fontCounter].label;
    this.loadFont(FlexGlobals.topLevelApplication.fontArr[fontCounter].path);
    It is working in flex 3 but not working in flex 4 .. Need help ..
    Regards
    Mohit

    Hi Flex harUI
    can u elaborate a bit more regarding . i didnt understand .actually i am using richeditable text area instead of textarea . this is the only difference apart from flex 3 and flex 4.
    Regards
    Mohit Verma

  • Compiling Multiple SWFs to Single SWF

    Hello All,
    I'm building out a Flash / Flex viewer and I'm looking for a tool / software that will recompile several to many SWFs into one SWF file.  I have an XML file and would like to load that into a compiler that would compile the SWFs into a single file. Please let me know your thoughts and thanks in advance.
    I appreciate your help.
    Rob

    Hello Kglad,
    I appreciate your reply to my post. I built an XML loader and have the ability to load the individual SWFs (decompiled PDFs) into the Flex viewer. I can view each page(SWF) in the viewer but by adding another SWF layer (XML Loader) I break the search functionality. I'm using PDF2SWF to convert the PDFs to SWFs. I would like to be able to manually add addendums to the converted SWF files via XML and then compile them into one "master" SWF that loads into the viewer. I would also like to be able to determine the order of the SWFs.
    Again, thanks for your help.
    Rob

  • Unused classes gets compiled into swf

    I am building a swc [MY.swc] component with compc. It is suppose to contain base functionality for MY.swf
    I need to include another (third party) swc [OTHER.swc] into my own swc. This other swc has a reference to mx.core.mx_internal and I suspect that it is this reference that in the end, when I compile MY.swf, results in that all mx classes (mx.*) and all spark classes (spark.*) is included in MY.swf (seen when decompiling)
    The difference in size between MY.swf with/without OTHER.swc is ~180kB.
    The only difference (when decompiling) MY.swc with/without OTHER.swc is that the first has a reference to mx.core.mx_internal
    Here is the compc part from my ANT task:
    <compc output="MY.swc">
    <include-sources dir="${project.root}/${SRC_ROOT}" includes="*" />
    <library-path dir="${project.root}/${LIBS_DIR}" includes="*" />
    </compc>
    Do you know if there is a problem with compiling a swc into another swc?
    Any other ideas why all mx and spark classes are included?
    Thanks!

    I solved my own problem:
    Needed to set append flag (in library-path) to false when building MY.swf
    <compiler.library-path dir="${project.root}" append="false">
      <include name="${LIBS_DIR}" />
    </compiler.library-path>
    Have not yet figured out exacly why, but it resulted in that the unused classes were not compiled.

Maybe you are looking for

  • Your account does not have access to the forums system.

    Greetings, My name is Jeff, I'm from Netwrix Corporation, which is a Microsoft partner. I have a problem with accessing Microsoft TechNet forum. After signing-in to my account: [email protected], I go to TechNet forum, and get a message that:  "Your

  • I know, another Time Machine help request

    I get the Time Machine back up error.  I recently purchased a Seagate GoFlex Desk external drive.  Time Machine seemed to recognize it right away.  The following morning I found the dreaded "Time Machine could not complete the backup.  Unable to comp

  • Quicksilver (2002) ram memory issues

    Morning all Recently I upgrade from a Quicksilver (2001) 733 MHz PowerPC G4 with 1.5 MB of Memory to a newer & faster Quicksilver (2002) Dual 1GB PowerPC G4 512 MB of Memory and have found a few issues between the two... I had through that I would be

  • Data inconsistency: Area 30 for value takeover is missing

    Hi Experts, I am trying to enter Asset Transaction: Asset Sale Without Customer (ABAON) but I am getting the error below: Data inconsistency: Area 30 for value takeover is missing Message no. AAPO105 Diagnosis According to its formula, depreciation a

  • HT5295 changing function of next and back buttons on podcast app

    is there a way to set the next or back functions to skip ahead or back 15 or 30 seconds?  So instead of going to the next track, when i would press the next button on a bluetooth device, the podcast would skip 30 seconds.