Set your textFormat to a textField, not to a string.

Change the last block to

texteCliquable_inst.text = pre1+pre2;
texteCliquable_inst.setTextFormat(0,pre1.length-1,style1);
texteCliquable_inst.setTextFormat(pre1.length
,texteCliquable_inst.text.length,style2);
delete style1;
delete style2;

Check the documentation for setTextFormat for details.

~Arul Prasad


On 3/27/06, Laurent CUCHET <[EMAIL PROTECTED]> wrote:
>
> Good morning,
>
> I need to get multiple link with a dynamic text
> There is 2 var : var1 and var2, 2 styles : style1 and style2
>
>
> Why this syntax doesn't work, have you got an idea ??
>
> Thank you
>
> Laurent
>
>
> var pre1="Click here ";
> var style1 = new TextFormat();
> style1.url = "http://www.macromedia.com";;
> style1.font = "Verdana";
> style1.italic = true;
> style1.size = 17;
>
>
> var pre2="or Click here";
> var style2 = new TextFormat();
> style2.url = "http://www.flash.com";;
> style2.font = "arial";
> style2.size = 12;
> style2.bold = true;
>
>
> pre1.setTextFormat(style1);
> pre2.setTextFormat(style2);
> texteCliquable_inst.text = pre1+pre2;
> delete style1;
> delete style2;
>
>
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to