|
|
|
[
Permlink
| « Hide
]
Paul - [10/27/08 10:15 AM ]
I am seeing the same issue with some text fields that are within movieclips that are meant to be clickable...
This is the same text string for both textFields...in one it appears screwed up...in the other...its fine...this time the autoSize is not the issue...because autoSize is turned off for both textFields...the blue text field is multiline the white text field is single line...any help?/?
Would you be willing to provide me answers to a few questions? Are these text fields part of a AS2 compiled swf? Where does the data in these fields get populated. In the screen shots you attached. How do I get to that page?
The textfields in the Screen shots are part of an AS2.0 compiled swf...the data is read in from XML into arrays upon load...upon certain user interaction there are popup MCs that appear on stage...these contain the textFields in question...the textFields are MCs within these popup MCs..then populated using AS code in the actions frame of the popup MC....for example emailMC.emailText.text = _root.someArray[x];
You can view this in action...click a booth on stage...and you will see the screw ups...the e-mail and web fields in both the available booth popup, and the rented booth popup are both autoSize = true; multiline = false; and I also put border and background to true...in the profile and category sections of the rented booth popup...the text fields are set to autoSize but their multiline feature is set to true... http://www.expocad.com/fx1.2a/default.html I'm having the same problem, the difference is that my project is built using Flex Builder 2, with actionscript 3. My code goes,
var tf:TextField = new TextField(); ... ... tf.autoSize = TextFieldAutoSize.LEFT; tf.htmlText = "some text ..."; It worked fine on Flash player 9, but "not always" on 10. Some TextFields are clipped. One workaround I've found - albeit not perfect - is to disable auto-sizing attribute after setting the text. var tf:TextField = new TextField(); ... ... tf.autoSize = TextFieldAutoSize.LEFT; tf.htmlText = "some text ..."; tf.autoSize = TextFieldAutoSize.NONE; Then most of the clippings (except some minor ones) are gone. Our application was having the exact same bug. It is definitely a Flash 10 error as the issue never occurred prior to updating. After a good chunk of testing I was able to determine that when autosize was set to true the textfield was allocating exactly 8 pixels less than the text to be used needed. Below is the function when this bug was occuring (I was able to code a workaround) and so far this is the only project where this issue popped up (all of our text fields are autosized). The offending application can be found at http://www.bryant.edu/wps/wcmresources/tour/ . The two buttons affected were the ones with the text "CAMPUS MAP" and "CHOOSE A TOUR". We have passed along a fixed swf to the client so I do not know if you will see the Kludge or the original.
//Text field oddity\\ private function makeButton(mcClip:MovieClip, sLabel:String, sID:String):Void { mcClip.createEmptyMovieClip("_mcBackground", mcClip.getNextHighestDepth()); mcClip.createTextField("_txt", mcClip.getNextHighestDepth(), 0, 0, 0, 0); mcClip._txt.text = sLabel; mcClip._txt.autoSize = true; mcClip._txt.embedFonts = true; mcClip._txt.selectable = false; mcClip._txt.antiAliasType = "advanced"; //setButtonText creates a TextFormat object of "frontViewSelectorFontColor" color and applies it to the mcClip._txt textfield. setButtonText(mcClip._txt, _global.oSettings.getSetting("frontViewSelectorFontColor")); //START Kludge var nTextW:Number = mcClip._txt._width; nTextW = mcClip._txt._width; var nTextH:Number = mcClip._txt._height; nTextH = mcClip._txt._height; mcClip._txt.autoSize = false; mcClip._txt._width = nTextW + 8; mcClip._txt._height = nTextH; //END Kludge } Me too, i had this problem when i upgraded to Flash Player 10. I did everything but nothing seems to fix it.
What I did was downgraded to Flash Player 9 and informed my ALL client NOT to get Flash Player 10. I simply dont get it... how could they release a player with a very obvious BUG... dont they have any QA on this? or any QA at all ? Tons of text effects they say... whats the use of text effects if the text is broken LOL I have the same issue using amfphp for delivery. I would have to say this is an urgent issue. If Charles Liss needs any information to help resolve this issue I'd be more then willing to offer it up. Our user base of 10.0 flash users has grown to 40%. This is effecting our business.
Does anyone have simple, reproducible code they can share? I'm not able to easily reproduce the issue, plus www.gamarena.com seems to be fixed and http://www.expocad.com/fx1.2a/default.html is 404. Thanks.
Trevor,
Below is a reduced version of where I was experiencing the error. I created a new .fla specifically to test it and was able to reproduce the bug. Now granted this new test .fla cannot simulate the complexity of nested movieClips in the actual application which was having the bug, but this is good as it shows the bug at its most basic/uncluttered form. What you will see when you launch the link below is two "buttons" (plain text fields because I'm lazy). Their text should read: _mcButtonOne = "I AM THE ALL POWERFUL BUTTON ONE" _mcButtonTwo = "I HATE BUTTON ONE" Notice that in ButtonOne the "E" is cut-off and in ButtonTwo the "NE" is clipped. Link to Bug: http://www.layingthegroundwork.com/AnyTour/BugSquish.html //Code in BugSquish.fla first frame\\ createEmptyMovieClip("_mcMain", getNextHighestDepth()); var oInit:Object = {target:_mcMain}; var acBug:LetsFindABug = new LetsFindABug(oInit); // End Fla Code\\ // Begin Class "LetsFindABug.as"\\ class LetsFindABug { private var _target:MovieClip; function LetsFindABug(oInit:Object) { for (var sProp:String in oInit) { var value = oInit[sProp]; if (value != undefined) { this["_"+sProp] = value; } } createClipTree(); drawButtons(); } private function createClipTree():Void { _target.createEmptyMovieClip("_mcButtonOne", _target.getNextHighestDepth()); _target.createEmptyMovieClip("_mcButtonTwo", _target.getNextHighestDepth()); } private function drawButtons():Void { makeButton(_target._mcButtonOne, "I AM THE ALL POWERFUL BUTTON ONE"); _target._mcButtonTwo._x = _target._mcButtonOne._width + 10; makeButton(_target._mcButtonTwo, "I HATE BUTTON ONE"); } private function makeButton(mcClip:MovieClip, sLabel:String):Void { mcClip.createEmptyMovieClip("_mcBackground", mcClip.getNextHighestDepth()); mcClip.createTextField("_txt", mcClip.getNextHighestDepth(), 0, 0, 0, 0); mcClip._txt.text = sLabel; mcClip._txt.autoSize = true; mcClip._txt.embedFonts = true; mcClip._txt.selectable = false; mcClip._txt.antiAliasType = "advanced"; //setButtonText creates a TextFormat object of "frontViewSelectorFontColor" color and applies it to the mcClip._txt textfield. var nColor:Number = 0x000000; setButtonText(mcClip._txt, nColor); } private function setButtonText(txtClip:TextField, nColor:Number):Void { var oFomt:TextFormat = new TextFormat(); //"Arial_embed" is an embedded font located in the library of typeface Arial oFomt.font = "Arial_embed"; oFomt.size = 10; oFomt.color = nColor; txtClip.setTextFormat(oFomt); } } Thanks Nathan!
I've reduced the code to the following (with the inclusion of the embedded Arial_embed font in the library): with (createTextField("tf", 0, 0, 0, 0, 0)){ antiAliasType = "advanced"; autoSize = true; embedFonts = true; text = "BUTTON ONE"; setTextFormat(new TextFormat("Arial_embed", 10)); } Each of those properties must be set for the bug to be reproduced. Additionally the result is inconsistent based on the text used. Very few iterations of the text provided demonstrated clipping. The shortest I could find was "BUTTON ONE", though I'm sure other strings would also cause it to occur. The inconsistency could make this a little tricky but we'll definitely look into it. [Edit] The results above actually only apply to Flash Authoring. Different results are visible in the current web player which is in fact a later version than that which ships with CS4. Trevor,
I created two new Swfs using your syntax. They are: http://www.layingthegroundwork.com/AnyTour/BugSquishLite.html http://www.layingthegroundwork.com/AnyTour/BugDemo.html I noticed your implementation varied in a few ways. First you hard coded a depth value for the textfield. Second the textField was not a child of a movieClip. Third there was only one text field present. None of these should have any significance, but then again this bug seems to have more permutations than the common cold. In neither SWF was the bug encountered again. SWF breakdown: BugSquishLite has four lines of buttons. First line is two implementations of your syntax. Second line each textfield is created with getNextHighestDepth(). Third line the textFields are children of a created clip "_mcMain" depth is hard coded. Line four textFields are children of _mcMainTwo and depth is generated via getNextHighesdepth(). I was surprised to see the bug not occur as line four is functionally the same as my first SWF created earlier today. Bizarre indeed. BugDemo is just a utility to attempt and find certain strings that would create the bug. First line is your syntax second line is the same syntax as line four from SquishLite. I cannot find any string to cause the bug. Both .fla files are attached for reference. I am using CS3 thus my only way to test FP10 issues is via a web browser. Hi,
I was able to find a work around for this bug. basically you set up your textfield, then enter an empty text for the textfield... then at the last step, enter the actual text for your textfield. var textfield = new TextField(); textfield.autoSize = "left" textfield.multiline = ... ... ... textfield.htmlText = ''; // note: empty string ... ... textfield.htmlText = "Now this will work." // now enter your actual string here Hope this helps. I have found this issue as well.
I recently upgraded to FP10, and my old project was Flex 3/AS3 and the text fields are all strange. I am experiencing the same "cutoff" mentioned here, but I am also getting unnecessary line breaks. Moderators, I believe this issue is related to the issue I submitted earlier last month: FP-1051, http://bugs.adobe.com/jira/browse/FP-1051. The only difference being, I used the Text component in Flex, but it appears to be a TextField problem. Here we also have the same problem. Lots of texts that are auto sized are cut off, which affects a lot of our components and thus also the satisfaction of our customers. This started since Flash Player 10. We are using Flex 3.2 SDK but have also replicated the issue within Flash Authoring. We are hoping Adobe will fix this asap!
Here's a quick way to fix this problem:
myTextField.autoSize = "center"; myTextField.width = myTextField.width+5; This is one nasty little bug. I spent hours trying to find a workaround, including all of them stated above.
Changing the anti-alias from anti-alias for readability to anti-alias for animation solved the problem for me. I had the problem with a font that was already embedded in the library (because it s dynamically assigned to dynamically created textfields in the project). Other fonts worked just fine. Adobe, can you please provide us with an update on this issue? It is a pretty big issue and I feel like we are kept in the dark here.
FP 10 vs FP 9 using ActionScript 3. Compiled in Flash CS4 for FP 9.
I'm using a MovieClip with a dynamic TextField on its stage having about 90 glyphs or so embedded. I then script the TextFields dynamically at run time. I tried Jan Verstreken's workaround to no avail. Switching the dynamic TextField within the MovieClip to have an anti-alias type for animation did nothing. The magenta border is visible because I specified to show the border of the TextField to illustrate the clipping effect. These TextFields do not explicitly set autoSize. Also, note that the first chat bubble TextField appears fine. But after a tween to scaleX & Y to 0, then tween to scaleX & Y of 1, the discrepancy results in FP 10. All resulting TextFields show the first line, cut off at it's specified width, and show the last word of the populated htmlText for the TextField. Hope this helps, Adobe. Please fix asap. Special thanks for making the Creative Suite CS4 software. What beautiful software. Cheers! I discovered this same bug after completely ruling out my own code as an issue.
The only fix I found was to increase the margin (right side) by as much as 7 pixels. This seems to let the character being cut off display completely. I don't like this fix it would be much nicer to simply have autosize include all the characters with no cut off. I have the same problem that I see in screeshots above. The probleme appear only on firefox. The problem appear when i set width and autoSize(left in my case) in a same multiline textfield. I fixed it setting autoSize to TextFieldAutoSize.NONE.
Cheers, David. Thanks Jigman! You workaround (http://bugs.adobe.com/jira/browse/FP-777#action_219483) worked for me :)
Hope Adobe fixes this ASAP because so many applications depend on this feature for menus, positioning etc. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||