html data in a string make clickable html link AS3/Flex -


i have scenario string html data, not html data it's email (outlook) saved html file , dropped in string.

now string needs formatted html document , should clickable link in datagrid. when click on link, html document should pop-up , should gave me nice html page readable normal users. hope it's bit clear want o_0.

i don't know start.

you can download example html here: http://www.mediafire.com/?b2gfwymw70ynxir

thanks!

---edit

hopefully can explain little bit better. need create link , when click on html page. string variable has html data in it, precise, source data of html example above. example: public var html:string = source_code_of_example_file;

the entire source code of html page in variable html. need make link , when click on it, html page (as pop-up) on fly.

you can use htmltext property , specify css perform proper formatting:

<mx:textarea id="resourcetext" height="100%"  width="100%"             stylename="resourcetext" editable="false"              stylesheet="{resourcestylesheet}" htmltext="{html}"/> 

to read in style sheet declare in model:

public var resourcestylesheet : stylesheet; 

it gets read in external file:

private function loadcss():void {               var urlloader:urlloader = new urlloader();    urlloader.addeventlistener(event.complete, csscompletehandler);    urlloader.addeventlistener(ioerrorevent.io_error, ioerrorhandler);     try {      urlloader.load(new urlrequest("folder/base-html.css"));    } catch (error:error) {      alert.show("unable load requested document.");    }             }  private function csscompletehandler(event:event):void {   // convert text style sheet.   var stylesheet:stylesheet = new stylesheet();   stylesheet.parsecss(urlloader(event.currenttarget).data);   // set style sheet.   model.resourcestylesheet = stylesheet; }  private function ioerrorhandler(event:ioerrorevent):void {   trace("ioerrorhandler: " + event); }    

this model, make sure resourcestylesheet bindable when use (i set bindable variable on view set model value.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -