567 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Referred between 10 and 49 users
  • Sold between 10 000 and 50 000 dollars
iamdok says

It seems that each time I develop a project I run into a new bug or inconsistency with regard to Flash CS3 ’s handling of text/embedding/css etc. This is despite an almost identical setup for each! Very strange.

Anyway, this time the probelm is that I’m using CSS styled dynmic text (paragraph), in which there are hyperlinks. I’m giving the links a general style and the hover a different color only (no size change or font change). When I rollover these links in the live swf, the other text in the paragraph around the links jump or shift, just like as if the rollover state text requires less space than when its normal style.

Anyone come across this before?

Some further details: AS3 , Flash CS3 , html text is in XML file. Textfield has autosize left applied and has a fixed width. Font is embedded, CSS therefore calls this font specifically rather than a font family. P tags, a tags and a hover are all same font size, same font. The only difference is the color.

Thanks, Donagh

8119 posts Community Moderator
  • Attended a Community Meetup
  • Community Moderator
  • Has been a member for 6-7 years
  • United Kingdom
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
  • Contributed a Blog Post
  • Beta Tester
  • Bought between 50 and 99 items
+4 more
MSFX Volunteer moderator says

Its a bug, i’ve had this so many times and see it quite alot on the templates here :( I dont think theres much you can do to get around it…

567 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Referred between 10 and 49 users
  • Sold between 10 000 and 50 000 dollars
iamdok says

Hey MSFX ,

I’ve had this same setup many times, or perhaps minro differences and I’ve never come across this bug before. So there must be something that can be done. I just have to tweak a few thing and see what happens.

Cheers for the reply.

4136 posts
  • Bought between 1 and 9 items
  • Brazil
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • Sold between 5 000 and 10 000 dollars
tsafi says

This issue is from early version of flash coming back to 2000 it’s a sure flash bug like the U.K man state.

Its more to do with the font type that apply this bug issue with CSS I didn’t find a better solution yet, i saw once P&K talk about a solution but i cant remember when was it or if it was my imagination.

Also I find that by using the indent function (left/right margin) it keeps the text in boundary and it will help to keep the roll over in place. Sample not a full code
// fmt.font              = _Arial.fontName;
/******************************
* "XML Attribute\TextHelper" 
This will override the CSS
and add on the xml for 
more easy life  
 *******************************/
fmt.leftMargin        =_leftMargin;                  
fmt.rightMargin       =_rightMargin;                  
fmt.letterSpacing     =_letterSpacing;                
fmt.leading           =_leading;                         
return fmt;

Also set you AntiAliasType.NORMAL since Using AntiAliasType.ADVANCED makes copy on render

567 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Referred between 10 and 49 users
  • Sold between 10 000 and 50 000 dollars
iamdok says

Hi tsafi,

Thanks for your reply. Nothing is working, so I think I’ll have to just say goodbye to the hover style, and hope the hand cursor and link tag style on their own are enough. Quite annoying.

I’m hopeing that the CS5 text framework will fix this nonsense once and for all.

Donagh

5277 posts The Dude Abides
  • United States
  • Exclusive Author
  • Has been a member for 5-6 years
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
+5 more
CodingJack says

I assume your using an image in your html text right? Here’s one solution:

First set your text field’s auto-size:

txt.autoSize = TextFieldAutoSize.LEFT;

Then add a few extra pixels to the “hSpace” property of the image tag:

<img src="image.jpg" hspace="10" />

The default “hSpace” is 8 pixels but in a project I did I was able to get rid of the bad behavior by bumping it up to 10. But try adding more until it works.

Not the best solution but it worked for me once.

1955 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Netherlands
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
Emroni says

Had this many times before too. Changing the anti-alias for the textfields did make a difference.

567 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Ireland
  • Referred between 10 and 49 users
  • Sold between 10 000 and 50 000 dollars
iamdok says

Hi guys,

CJ , I’m not using an image in the html textfield, text only.

Enroni, I’ve tried changing the AntiAliasing of the textfield and it’s not making any difference.

I saw a hack solution via google about inserting non-breaking spaces into the hyperlink, but that didn’t work either.

Thanks for the attempts, anyway.

Donagh

2479 posts Premium Scripts, Plugins and Themes
  • Bought between 10 and 49 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 6-7 years
  • Interviewed on the Envato Notes blog
  • Microlancer Beta Tester
  • Referred between 200 and 499 users
+1 more
LucidStudios says

if “Auto kern” is checked then uncheck it.

3744 posts
  • Won a Competition
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Spain
  • Referred between 200 and 499 users
+5 more
pezflash says

I remember someone posting a solution for this here, around 2 months ago, maybe more. Tried to search for it in the forums, but well, we all know is not the best search engine for a forum…

by
by
by
by
by
by