actionscript 3 - Text within an image is jaggy/broken - Adobe Flash -


this post have made on adobe forum...

i'm newish flash , i'm doing presentation part of university assignment.

my problem this. part of presentation have photo gallery uses thumbnail images buttons , ui loader load pop version of larger image webserver - per https://www.youtube.com/watch?v=peo_nt9hha0

the image created on photoshop. .jpg , has text within image describes underneath image about. text within photoshop set anti-aliasing 'smooth' , when test movie within flash, text underneath image looks fine - in photoshop.

however, when publish , upload .swf file webserver , view image through browser, text looks awful - jaggy , broken if makes sense.

any ideas why?

i given reply of...

if loading images dynamically have set smoothing property true after file(s) has been loaded. if don't have listener images finishing loading, need one, , event handler function assign smoothing property true each of them.

can creating actionscript listener , event handler function? have gallery movie clip buttons act clickable thumbnails. actionscript is...

btnimage1.addeventlistener(mouseevent.click, loadimage1);  function loadimage1 (event:mouseevent):void{ imagetxt.text = "a"; togglewindow.gotoandplay(2) } 

and ui loader displays larger image when thumbnail clicked

if (movieclip(this.parent).imagetxt.text == "a"){ var imgurl:string ="image url"; var myrequest:urlrequest = new urlrequest(imgurl); myloader.load(myrequest); } 

as indicated, should always turn smoothing on if image going scaled @ all. uses different scaling algorithm blurs pixels rather deletes them. take note substantially slower smooth, on modern machines shouldn't notice difference unless doing thousands of images @ once.

after instantiation, add event.complete handler loader.contentloaderinfo.

var myloader = new loader(); myloader.contentloaderinfo.addeventlistener(event.complete, loadercompletehandler); 

then in handler, can access bitmap , turn smoothing on.

function loadercompletehandler(e:event):void {     var image:bitmap = myloader.content bitmap; //loader.content typed displayobject, need cast bitmap     image.smoothing = true; } 

and should solve issue. may need add image object stage rather myloader object. don't think you'll have to, can't remember.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -