1 Reply Latest reply on Nov 5, 2007 2:11 PM by Peter deHaan

    Styles applied to TextArea htmlText

    cxf02 Level 1
      Hear is the external css file named star.css
      ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------
      .featureheader { font-family: tahoma; font-size: 14pt; color: #ffffff; text-decoration: none; background-color:#999999; font-weight:bold;}
      .featuretitle { font-family: verdana, arial, sans-serif; font-size: 8pt; color: #000000; text-decoration: none;}
      .featuretext { font-family: verdana, arial, sans-serif; font-size: 8pt; color: #000000; text-decoration: none;}
      P { font-family: verdana, arial, sans-serif; font-size: 14pt; color: #ffffff; text-decoration: none; background-color:#999999; font-weight:bold;}
      LI.featuretext { font-family: verdana, arial, sans-serif; font-size: 8pt; color: #000000; text-decoration: none; margin-bottom:6px;}
      button {font-family: verdana, arial, sans-serif; font-size: 8pt; color: #000000; text-decoration: none; margin-bottom:6px;}
      ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------
      Here is my test TextArea
      ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" x="40" y="51">
      <mx:Style source="star.css" />

      <mx:TextArea id="ta" x="0" y="0" width="80%" height="100%" textAlign="left" condenseWhite="true" wordWrap="true" editable="false">
      <mx:htmlText >
      <![CDATA[<p >Key Features:</p><p class="featuretext"><ul><li class="featuretext">There’s plenty of lockable storage in the form of a15-gallon trunk and a pair of color-matched 9.3-gallon side bags; that’s 33.6 gallons total.</li><li class="featuretext">Ergonomically designed bucket-type seats with plush,wrap around passenger backrest for unbeatable long-range comfort.</li><li class="featuretext">Industry’s premier rider support package includes a five-year, unlimited mileage warranty and 24-hour roadside assistance program.</li><li class="featuretext">The Royal Star Venture S gets chrome accents to the front end.</li><li class="featuretext">This fully loaded luxury touring machine comes with everything serious riders need,including a four-speaker sound system/CBradio/intercom CD-compatible sound system and a powerful and smooth V-four engine.</li></ul></p><p class="featureheader">Engine:</p>
      <p class="featuretext">
      <li class="featuretext">79cubic-inch liquid-cooled,V-four tuned to put outclass-leading power — 97hp @6000 rpm and maximum torque at 89 ft.-lb. @ 4750 rpm —for incomparable touring performance.</li>
      <li class="featuretext">Fourheated 32mm Mikunicarburetors with TPS delivers eamless throttle response and greater power across the entire rev range.</li>
      <li class="featuretext">Compact design, dual-intake system enhances performance without sacrificing fuel tank capacity.</li>
      <li class="featuretext">Large-capacity radiator ensures superior engine cooling for maximum efficiency.</li>
      <li class="featuretext">Single-axis internal counter balancer reduces engine vibration.</li>
      <li class="featuretext">Wide-ratio, five-speed transmission with 5th-gear overdrive geared for both highway passing power and lower-rev cruising speeds.</li>
      <li class="featuretext">Maintenance-free hydraulic clutch.</li>
      <li class="featuretext">Smooth, low-maintenance shaft drive.</li>
      <li class="featuretext">Four-into-two exhaust system puts out a throaty exhaust note and creates a long, low profile that’s easily customizable.</li>
      <p class="featureheader">Chassis/Suspension:</p>
      <p class="featuretext">
      <li class="featuretext">High-integrity,single-backbone frame with solid engine mounting and29-degree caster angled delivers quick, responsive steering and excellent handling.</li>
      <li class="featuretext">Class-leading long wheelbase(67.1-inches) provides exceptional roomy ergonomics for great rider control and comfort.</li>
      <li class="featuretext">Air-adjustable telescopic front fork designed with29-degree caster angle and5.5 inches of travel smooths out the bumps and adjusts for varying load capacities.</li>
      <li class="featuretext">Air-adjustable link-type rear suspension features a vertically mounted single shock with 4.1 inches of travel for outstanding long-distance ride quality.</li>
      <li class="featuretext">Large-diameter front and rear disc brakes with sintered pads provide strong, linear stopping power.</li>
      <li class="featuretext">Wide,fork-mounted fairing,windshield, wind deflectors and frame-mounted lower cowling's offer outstanding weather protection.</li>
      <li class="featuretext">Full-sized floating-type rider and passenger floorboards reduce vibration and are positioned for optimal long-distance comfort.</li>
      <p class="featureheader">Additional Features:</p>
      <p class="featuretext">
      <li class="featuretext">Incomparable fit and finish includes flawless paint with extensive chrome and brushed stainless steel accents a swell as deep, valanced steel fenders.</li>
      <li class="featuretext">6-gallon fuel tank with low-fuel warning light ensures outstanding long-distance touring range.</li>
      <li class="featuretext">Large, powerful 12V60/55-watt remote-adjustable halogen headlight maximizes night time visibility and cuts a stylish profile.</li>
      <li class="featuretext">Separate cigarette lighter-type DC outlets for both rider and passenger.</li>
      <li class="featuretext">Ignition switch with integrated steering lock mounted to front of fuel tank for extra convenience.</li>
      <li class="featuretext">Vintage-style console and instrument panel features:digital speedometer,odometer, dual tripmeters,fuel tripmeter, clock, fuel gauge, cruise control, TPSself-diagnosis, speed sensor,and neutral, high beam, turn signals and low oil level indicator lights.</li>
      <li class="featuretext">Electronic cruise control switch located on right handlebar controls for ease of use.</li>
      <li class="featuretext">Handlebar-mounted 40-channelCB radio with dual antenna for CB and AM/FM radio.</li>
      <li class="featuretext">Single-point audio control system for AM/FM radio,cassette and intercom is CDchanger-compatible and headset-ready.</li>
      <li class="featuretext">Four-speaker (14 watts per channel) system with automatic, speed-regulated volume control to help hear over wind noise.</li>
      <li class="featuretext">Two-way rider/passenger intercom system.</li>
      <li class="featuretext">Huge,15-gallon rear trunk with easy, one-touch opener can hold two full-faced helmet sand includes a lined interior storage pouch.</li>
      <li class="featuretext">Color-matched hard-shell saddlebags each feature handy, one-touch openers and spacious 9.3-gallon storage with interior pouch.</li>
      <li class="featuretext">12V18AH maintenance-free battery ensures easy, reliable starting.</li>
      </p>]]> </mx:htmlText>



      The html works just fine, but no styles are being applied. I have scoured the help files and tried loading them from swf files, using action script with FLASH-like loading into text objects. Nothing works. I can get styles to work on individual components, but I cannot get them applied to individual elements within the HTML in a TextArea. This is a biggie for me, as I will be spydering html from manufacturer's web sites, then chunking it into hml snipets wrapped in simple tags for FLEX, finally wrapping them up into xml for FLEX to display using the embedded styes.

      If I have to replace styles with more html, this transformation process will be extremely complex and hard to maintain in sync with my customers (motorcycle dealers) manufacturer's sites. I am using the FLEX shopping cart application as the basis for my education and the next generation application that my company will release, so the examples of applying css are getting well known to me. however, this problem seems to require either a simple DOH! moment to fix, or it is more pervasive. This is the site if anyone is interested. Be aware, it is in eary bloating stage. It will have to be trimming down considerably before release. Also, there is only a single brand of bikes as that effort is yet to be tackled after the present issue is dealt with.