ockey now continue the previous tutorial we will try to discuss about a tag (link) in textflow TLF, ... please understand and be understood
ockey melanjutkan tutorial sebelumnya sekarang kita akan mencoba membahas tentang tag a (link) dalam textflow TLF,...
3.Tag <a>...</a>
Tidak ada perubahan dalam tag ini ,..seperti pada text html yang terdahulu pada textflow juga dapat menerapakan tag <a>...</a>
sebagai tempat untuk menyisipkan nama situs atau URL berikut cara penggunaannya
//Main.as
package
{
import flash.display.*;
import flash.events.Event;
import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
import flashx.textLayout.events.FlowElementMouseEvent;
/**
* ...
* @author Ricko
*/
public class Main extends MovieClip
{
public var tes:MovieClip = new tesgambar ;
public var tFlow:String = '<TextFlow whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><a href="http://blog.pustakaflash.com/2012/10/pengenalan-tlf.html" >ini coba tes link</a><img float="start" source="phie.jpg" height="61" width="61"vspace="50"hspace="50" />Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. <a href="http://blog.pustakaflash.com/2012/10/pengenalan-tlf.html" >ini coba tes link</a>Mirum est notare quam littera gothica, quam nunc putamus parum<img source="phie.jpg" height="30" width="30"/> <img source="phie.jpg" height="30" width="30"/><img source="phie.jpg" height="30" width="30"/><img source="phie.jpg" height="30" width="30"/><img source="phie.jpg" height="30" width="30"/>claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum<span color="#33ff00" fontSize="18">quick </span><img source="phie.jpg" height="80" width="80"vspace="50"hspace="50" /><span fontWeight="bold">brown fox jumps over the </span><span color="#ff0000">lazy</span><span> dog.</span></p></TextFlow>';
public var tlfTxt:TLFTextField = new TLFTextField();
public function Main():void
{
if (stage)
{
init();
}
else
{
addEventListener(Event.ADDED_TO_STAGE, init);
}
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
tlfTxt.border = true;
tlfTxt.tlfMarkup = tFlow;
tlfTxt.wordWrap = true;
tlfTxt.width = 300;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 0;
addChild(tlfTxt);
}
}
}
atau jika anda terbiasa dengan timeline script
//Primitive script or timelineScript
import fl.text.TLFTextField;
import flash.text.TextFieldAutoSize;
import flash.events.Event;
var tFlow:String = '<TextFlow whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><a href="http://blog.pustakaflash.com/2012/10/pengenalan-tlf.html" >ini coba tes link</a><img float="start" source="phie.jpg" height="61" width="61"vspace="50"hspace="50" />Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. <a href="http://blog.pustakaflash.com/2012/10/pengenalan-tlf.html" >ini coba tes link</a>Mirum est notare quam littera gothica, quam nunc putamus parum<img source="phie.jpg" height="30" width="30"/> <img source="phie.jpg" height="30" width="30"/><img source="phie.jpg" height="30" width="30"/><img source="phie.jpg" height="30" width="30"/><img source="phie.jpg" height="30" width="30"/>claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum<span color="#33ff00" fontSize="18">quick </span><img source="phie.jpg" height="80" width="80"vspace="50"hspace="50" /><span fontWeight="bold">brown fox jumps over the </span><span color="#ff0000">lazy</span><span> dog.</span></p></TextFlow>';
var tlfTxt:TLFTextField = new TLFTextField();
tlfTxt.border = true;
tlfTxt.tlfMarkup = tFlow;
tlfTxt.wordWrap = true;
tlfTxt.width = 300;
tlfTxt.autoSize = TextFieldAutoSize.LEFT;
tlfTxt.x = tlfTxt.y = 40;
addChild(tlfTxt);
By Ricko nada di Pustaka Flash terima kasih telah membaca :) Penerapan Textflow dalam paragraph(Insert Link)
facebook
twitter
google+
fb share