Search the web
Sign In
New User? Sign Up
flexcoders · RIA Development with Adobe Flex
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Loading style sheets at run time   Message List  
Reply | Forward Message #120328 of 149659 |
Re: Loading style sheets at run time

Hi

Let me clear what is MyTextArea. This component is copied from
<mx:RichTextEditor/>, so that user can format each character of
MyTextArea's text.

For a testing purpose I have create one more component TempTextArea
based on TextArea, and put it inside Card component. And when user
change font I am updating fontFamily of TempTextArea using following
setter method
public function set _font(val:String):void{
this.setStyle("fontFamily",val);
}

And TempTextArea is working correct.

I think there is something wrong in MyTextArea, as it uses all method
of RichTextEditor.mxml and have following function to update styles of
TextArea

public function setTextStyles(type:String, value:Object = null):void
{
//I have removed lines which are not related to my issue
var tf:TextFormat;
var beginIndex:int = this.getTextField().selectionBeginIndex;
var endIndex:int = this.getTextField().selectionEndIndex;
.........
tf[type] = value;
..........
this.getTextField().setTextFormat(tf,beginIndex,endIndex);
}




Fri Jul 25, 2008 7:21 am

kaushal_bshah
Offline Offline
Send Email Send Email

Forward
Message #120328 of 149659 |
Expand Messages Author Sort by Date

I have created few fonts css and compiled them into swf to load them at run time. There is one custom component Card, is placed into a Module and this Module...
kaushal_bshah
Offline Send Email
Jul 24, 2008
10:05 am

Are you embedding fonts? Or just setting the font family? What kinds of selectors are you using to tell MyTextArea about its font? What does MyTextArea...
Alex Harui
alex_harui
Online Now Send Email
Jul 24, 2008
5:51 pm

Alex, Thanks for quick response. Following are the answers to your questions. 1. Yes I have embed each fonts in .swf, and use following css @font-face { src:...
kaushal_bshah
Offline Send Email
Jul 25, 2008
5:31 am

2. Bseides the @font-face, you must have some way of specifying in CSS to use the "Ad Lib" font. What does the relevant CSS look like? 4. What happens if...
Alex Harui
alex_harui
Online Now Send Email
Jul 25, 2008
6:51 am

Hi, I have to embed fonts into my application. I have .swf font files. I have to use these swf files as an array in a combo box, so that the user can select...
saatreddy
Offline Send Email
Aug 13, 2008
6:11 pm

I think you will need to contact the provider of the chart component to determine how to work with their API. ________________________________ From:...
Alex Harui
alex_harui
Online Now Send Email
Aug 13, 2008
7:44 pm

Hi Let me clear what is MyTextArea. This component is copied from <mx:RichTextEditor/>, so that user can format each character of MyTextArea's text. For a...
kaushal_bshah
Offline Send Email
Jul 25, 2008
7:21 am

RichTextEditor may block setting of styles using setStyle as it expects the markup to describe the font properties. This may not be a module problem. Try it...
Alex Harui
alex_harui
Online Now Send Email
Jul 25, 2008
6:17 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help