[flexcoders] Re: Dumb Newbie Question - Underlined Hyperlinks

2006-08-03 Thread karstendwolf
So this is interesting, You could enhance this snippet to put a 
tag around many links in a longer textfile like 

private var someHTMLText:String = "This is http://somewhere";>first link and http://overthere";>second link. And now some more text.";

public function rollOverLinks():void{
ti.htmlText=parseAndUnderline(someHTMLText);
}
public function rollOutLinks():void{
ti.htmlText= someHTMLText;
}
private function parseAndUnderline:String(textToParse:String) {
// do parsing, find hyperlinks and underline them here
…
}

If You encapsulate this in a custom component, You just would bind
Your text to the component and it would work like a standard Text
component and behave as expected.

Nevertheless I would like to have a RichHTMLText component which
supports CSS 2.0.

-karsten





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Dumb Newbie Question - Underlined Hyperlinks

2006-08-03 Thread karstendwolf
This is what Flex support wrote:

I hope this code solves the problem


http://www.adobe.com/2006/mxml";>






So this is interesting, You could enhance this snippet to put a 
tag around any link like 

public function rollOverLinks():void{
ti.htmlText=parseAndUnderline(someHTMLText);
}
public function rollOutLinks():void{
ti.htmlText= someHTMLText;
}
private function parseAndUnderline:String(textToParse:String) {
// do parsing, find hyperlinks and underline them here
…
}

If You encapsulate this in a custom component, You just would bind
Your text to the component and it would work like a standard Text
component and behave as expected.

Nevertheless I would like to have a RichHTMLText component which
supports CSS 2.0.

-karsten

--- In flexcoders@yahoogroups.com, "Darren Houle" <[EMAIL PROTECTED]> wrote:
>
> You can also do something like...
> 
> http://mysite.com/index.cfm";>#name#
> 
> It's really basic, but it works fine and the user gets the point.
> 
> According to the docs... all that happens by default with links is
that the 
> mouse turns to a hand, there's no hover, underline, etc. to let you
know 
> it's a link.  But you can use other tags to make it look like a
link.  My 
> undertanding is that the Flash Player supports the following tags (and 
> *only* the following tags) when embedding HTML in textareas, the
htmlText 
> property, etc:
> 
>  
> 
> Darren
> 
> 
> 
> >From: "swhitley02" <[EMAIL PROTECTED]>
> >Reply-To: flexcoders@yahoogroups.com
> >To: flexcoders@yahoogroups.com
> >Subject: [flexcoders] Dumb Newbie Question - Underlined Hyperlinks
> >Date: Wed, 07 Jun 2006 21:34:40 -
> >
> >Hello everyone.  I'm hoping this is super easy, but I can't find any
> >documentation on it.
> >
> >I'm working with Flex 2.0 Beta 3.  While using the TextArea control,
> >I'm posting an HTML hyperlink to the htmlText property.  The link
> >appears in the TextArea control and it works, but there's nothing to
> >show the user that it's a link.  Is there an easy way to force the
> >display of hyperlinks to blue and underlined in the TextArea control?
> >Is there another control that will display standard HTML?







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Dumb Newbie Question - Underlined Hyperlinks

2006-08-03 Thread karstendwolf
This is what Adobe support had to say (btw, wow, they answer feature
requests! cool!):


http://www.adobe.com/2006/mxml";>






So this is interesting, You could enhance this snippet to put a 
tag around any link like 

public function rollOverLinks():void{
ti.htmlText=parseAndUnderline(someHTMLText);
}
public function rollOutLinks():void{
ti.htmlText= someHTMLText;
}
private function parseAndUnderline:String(textToParse:String) {
// do parsing, find hyperlinks and underline them here
…
}

If You encapsulate this in a custom component, You just would bind
Your text to the component and it would work like a standard Text
component and behave as expected.

Nevertheless I would like to have a RichHTMLText component which
supports CSS 2.0.

-karsten






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Dumb Newbie Question - Underlined Hyperlinks

2006-07-17 Thread olivierdejonge
>... no flippin way to specify the links in a TextArea to be blue.

I have the same problem with external stylesheets. In Flex 1.5 there
was a way to attach a:hover, a:link style from an external stylesheet
to a TextField (this is not a TextArea!) with:

var textField:TextField;
var styles = new TextField.StyleSheet();
styles.load('myStyles.css');
...
public function onLoad(success):Void{
  if(success){
textField.htmlText = "hello world";
textField.styleSheet = styles;
  }
}

But now in 2.0 I can't find a good solution too. 'StyleSheet' has
become a 'stand-alone' class. The 'load()' function is gone, instead
there is a function 'parseCSS()'. I can't get it to work properly:

private var cssSource:String =
'myTest{color:"#ff";}a:hover{color:"#00FF00";text-decoration:"underline";}body{fontFamily:"ThesisBolPla";size:"11";color:"#FF";}.heading{fontWeight:"bold";color:"#FF3300";}';

private var labelText:String = "Hello
worldand welcome to the show.
  This is gonna be the arkText component";

var style:StyleSheet = new StyleSheet();
style.parseCSS(cssSource);
label = new TextField();
label.width = 200;
label.autoSize = TextFieldAutoSize.LEFT;
label.embedFonts = true;
label.background = true;
label.border = true;
label.multiline = true;
label.styleSheet = style;
...
label.htmlText = labelText;

What works fine on TextFields is:

var style:StyleSheet = new StyleSheet();
var aHover:Object = new Object();
aHover.color="#FFCC33";
aHover.textDecoration = "underline";
style.setStyle("a:hover", aHover);
label = new TextField();
label.width = 200;
label.background = true;
label.multiline = true;
label.styleSheet = style;

But you want to load a css externally and you want to use a TextArea.
I have asked this also to Matt Horn from Adobe, but he hadn't the
slightest idea how to solve this...






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Dumb Newbie Question - Underlined Hyperlinks

2006-07-16 Thread Mike Britton
I hate myself for this, but:

var link:String = "View Listing";

I can't find a way to change the link color through an external CSS
file though, and it's killing me.  You have to define the class like a
DOM object and there's no flippin way to specify the links in a
TextArea to be blue.





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/