Adobe Dreamweaver Forums



Last 10 THreads :         Select Checked Out Files Within Folder (Last Post : ben_bloom - Replies : 0 - Views : 1 )           »          Library is missing names from splitter bar (Last Post : a_hayman - Replies : 4 - Views : 5 )           »          pop up blocker jacking my login (Last Post : JoeyD1978 - Replies : 3 - Views : 4 )           »          Help with navigation (Last Post : Jiva Mukta - Replies : 0 - Views : 1 )           »          Why is this not working!!! (Last Post : Boxing Boom - Replies : 3 - Views : 4 )           »          CSS: Mystery IE and Firefox issue (Last Post : Codesonic - Replies : 0 - Views : 1 )           »          Update scrollbar on text area? (Last Post : Handycam - Replies : 0 - Views : 1 )           »          debugger causing browser to crash (Last Post : thmunson - Replies : 4 - Views : 5 )           »          Passing variable between components (Last Post : Amy Blankenship - Replies : 3 - Views : 4 )           »          Flash Slide Presentation and CS4 motion tween (Last Post : pivovar - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: ,



Reply
  #1 (permalink)  
Old 08-27-2008, 05:15 PM
mlech0
 
Posts: n/a
Diggs:
Default styleName vs CSS

we have a flex project with many html UITextFields. The issue is getting the
style correct. At preset, text fields are getting their styles from class
attributes. For example, if we have an XMLList like this:
<p class='norm'> This is <a href='event:do something'>Test</a></p>
the text field is assigned a styleName of .norm from our application css. I
have tried to rather assign a styleSheet to the UITextFields, but the only way
i can get fonts to embed is if i use the application's css which gets fonts
from a swf:
@font-face
{
src:url('fnt/Fonts.swf');
font-family:'font1';
}
So, while styleName embeded the fonts well, the problem is getting things like
the anchor to cooperate, and worse, lists ([LI] tags) At times, we have
multiple paragraphs and/or lists all in one html UITextField. We need to apply
more than just one styleName to the fields. However, as i said, if we try to
assign a styleSheet to the text field we get empty textFields. It seems the
only way to get any formatting is by using styleName.

I am aware we could litter our markup with <font face='font1' color='#ffffbb'>
but that seems a bit of a hack. Can someone give some direction of how to use
css, styleNames, and or both to a UITextField? Attached is my method for
creating the textfield

and yes, i have scoured forums and help files.
thanks

private function doTexts(layout_txts:XMLList,content_xml:XMLList):v oid
{
for(var i:int=0;i<page_content.text_copy.length();i++)
{
var eachElm:XML=layout_txts[i] as XML;
var id:String=eachElm.@id as String;
var _x:Number=eachElm.x ;
var _y:Number=eachElm.y ;
var _w:Number=eachElm.width;
var _h:Number=eachElm.height;
var tf:UITextField= new UITextField();
var
style_name:String=page_content.text_copy[i].children().attribute('class');

if(style_name=="")
{
style_name='norm';
}

with(tf)
{
styleName=style_name.toString();
autoSize=TextFieldAutoSize.LEFT;
if(_x != undefined) x=_x;
if(_y != undefined) y=_y;
wordWrap=true;
mulitline=true;
embedFonts=true;
if(_w != undefined) width=_w;
if(_h != undefined) height=_h;
selectable=true;
}
var vs:XMLList=page_content.text_copy[i].children().(namespace());
tf.htmlText=cleanHTML(vs);

addChild(tf);
var txmetrx:TxMetrx= new TxMetrx();
var wordObjects:Array=getWordObjects();
txmetrx.addTargetWords(wordObjects);
txmetrx.addTextField(tf)
txmetrx.place=tfmc;
txmetrx.addEventListener(TxMetrxEvent.MOUSE_OVER,w ordFoundEvent_OVER)
txmetrx.addEventListener(TxMetrxEvent.MOUSE_OUT,wo rdFoundEvent_OFF)
}
}



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-28-2008, 07:21 AM
adobenewsbot
 
Posts: n/a
Diggs:
Default Re: styleName vs CSS

Adobe Newsbot hopes that the following resources helps you. NewsBot is experimental and any feedback (reply to this post) on its utility will be appreciated:

All Classes (Flex Gumbo):
mx.rpc.xml, Encodes an ActionScript object graph to XML based on an XML schema. ...... Please submit feedback to the open-source Flex SDK Forum

Link: http://livedocs.adobe.com/flex/gumbo...s-summary.html



Disclaimer: This response is generated automatically by the Adobe NewsBot based on Adobe [L=Community Engine]http://community.adobe.com/ion/search.html[/L].
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 07:53 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk