Jessica, 
 
> My problem is that it seems AS3 is always bumping 
> the img down to a new line unless it's the first item in the string. 
 
This behavior hasn't changed from earlier versions of AS. 
 
> Does anyone know any way around this other than calculating 
> the text length 
> and appending the icon clip afterwards? 
 
I don't believe there is any way to automate the placement of the image tag
without iterating over the textfield for character widths and line counts. 
 
You didn't say where your text is coming from (or how much there is) so it
is hard to know how practical a manual trial-and-error solution would be for
you. 
 
One possibility would be to manually place the image tag in the block of
text such that it is within the second to last line as it is displayed in
the textfield. Your image will still be right aligned. 
 
Or 
 
I am guessing from your use of the phrase "icon clip" that the images you
want to use are in the .fla library rather than external. That being the
case, what you can do is create a parent clip with the desired linkage name
that has a child clip with the actual image and an instance name 'icon'. The
idea here is to use the child clip's _x and _y properties to position the
actual icon image wherever you like. You will need to set the image tag's id
attribute (for the parent clip) in order to target the child clip's
properties. 
 
For example: 
 
textFieldName.someImageID.icon._x = -10; 
textFieldName.someImageID.icon._y = -10; 
 
The exact details regarding how this could be set-up depend on how you are
loading your text. 
 
Regards, 

-Keith 
http://keithreinfeld.home.comcast.net
 


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to