FLAws

Flash CS4 library symbol preview wonky Thursday, December 10, 2009

Here’s what it looks like when I click on symbols in the library in CS4..

Those could be symbols of cars, monkeys, baseballs..  it doesn’t matter.  I get horizontal lines. 

It’s been this way for a while and I’ve just been avoiding the inevitable reinstall and kind of enjoying the little bit of chaos that this brings into my workspace.  It’s time for it to end though.  I need to see what I’m about to drag out onto the stage instead of it being a surprise.  heh.  My library is a box of chocolates.. I never know what I’m going to get until I drag it to the stage.




bullets with color in Flash Friday, November 30, 2007
A small issue with Flash Player 9 shows up when you do this AS2 code:

styles = new TextField.StyleSheet();
styles.setStyle(".green", {fontSize: '24px', color: '#00CC00'} );
//styles.setStyle(".almostblack", {color: '#010000'} );

this.createTextField("theField_txt", 1, 10, 10, 300, 300);
theField_txt.multiline=true; theField_txt.html = true;
theField_txt.styleSheet = this.styles;

var theHTML='<ul><li>stuff</li><li>some green text: <span class="almostblack"> </span><span class="green">Green!</span></li><li>more stuff</li></ul>'

theField_txt.htmlText = theHTML

will show up like this:



If you uncomment the almostblack style then the green bullet will look black.


If you make the almostblack style color really black 000000 instead of almost black, then the bullet will be green.

I'm assuming this will get fixed at some point and when that happens the almostblack hack won't really do anything other than be extra code that needs to be removed.
If/when it gets fixed then any pretty colored bullets made by doing this
var theHTML='<ul><li>stuff</li><li> <span class="green"> </span>black text with a green bullet</li><li>more stuff</li></ul>'
will suddenly be black.

there's also this
var theHTML='<ul><li>stuff</li><li><span class="green"> </span>black text with a black bullet</li><li>more stuff</li></ul>'
which makes a jumbo sized black bullet.

Images in a Flash text field or TextArea Sunday, June 04, 2006
Just a note to self sorta.. the text field and TextArea in Flash almost can't be used if you want to display images in them via standard HTML text. It seems so easy. You have some HTML text that contains a little IMG tag. Flash should act like a browser and display the image and the text in a normal, predictable way. But it doesn't.

I'm testing with Flash Player 8, the SWFs were published for 8. This issue has been around forever.. I've beat on it with a big hammer quite a few times in order to find a workaround, and was hoping it was fixed. But nope. To see a bit of history --- see
here from 2004 on flashmx2004.com
and here where Aral found himself in TextArea hell back in 2004
and here on livedocs
and here on flashkit
and here on Sepiroth.it

Most folks are upset about the TextArea component, but I include the old text field, as you can see below it doesn't act like it should.

Here's just one example.. The Flash Player 8 [edited to add also seeing this with Flash Player 9] should be smart enough to see that the textField and TextArea are only 190 pixels wide and the image is too.. so text should wrap down below the image instead of just partially disappearing off to the right of it. [edited to add clarification.. the two examples below are in Flash. The top one is a TextArea and the bottom one is a text field. The problem is you see "ront of a wall" below the images and the rest of the text is hidden away somewhere to the right of the image.]



code in the SWF:
myTextArea.text = '<img src="http://oddhammer.com/blog/images/samplenewsimage.jpg" width="190" height="102" />Guys in front of a wall';

myTextField.htmlText = '<img src="http://oddhammer.com/blog/images/samplenewsimage.jpg" width="190" height="102" id="myimage"/> Guys in front of a wall';

Here's the same thing in plain old HTML..



guys in front of a wall

<table width="190" border="1" cellspacing="0">
<tr>
<td width="190"><img src="/blog/images/samplenewsimage.jpg" width="190" height="102" />guys in front of a wall </td>
</tr>
</table>

Note that the browser realizes that text can't be beside the image so the text is moved below the image. As you saw above, Flash would do that weird sortawrapping thing.

And it's not so much that the Flash Player 8 is broken, but it doesn't handle images in HTML the same way a browser would. For instance, if you have a bunch of HTML that contains images via the IMG tag and they happen to have align="bottom"... look out. It's going to get ugly. Flash Player 8 only supports "left" and "right". Things like baseline, top, middle, bottom, etc. are just tossed.
I've tested with Flash Player 9 (published for Flash Player 8 though since it'll be ages before I can publish for 9) and see the same thing.

So you can use Flash to display images and text in a somewhat HTMLish fashion if you are careful and creative with the old BR tags and "& nbsp;"s. You can trick Flash into putting images wherever you want. Just hope you don't have a ton of standard HTML text with images that needs to get displayed dynamically in Flash.

And here's some info (added to LiveDocs, yes) that might be of interest...
myTextField.htmlText = '<img src="sampleimage.jpg" width="190" height="102" id="myimage"/>';
trace("width of image = "+myTextField.myimage._width); // width of image = 190


I'm hoping somebody can come along with an easy solution..
Flash opens the wrong panel - time for a coffee break! Friday, February 17, 2006
Just a note about a little bug I see in the Flash8 IDE. It's been around for quite a while. I remember seeing Keith Peters pointing it out after MX2004 came out, but haven't seen much else mentioned about it.

Here's what it does.. say you're trying to streamline your production so you make some cool custom panels for your IDE.. you drop the SWFs for those into your "WindowSWFs" folder here (example path for a windowsXP box)
C:\Documents and Settings\{yourusername}\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\WindowSWF

That custom panel is then listed in the Flash IDE under Window>Other Panels> menu.
(That's just freakin awesome. I can't tell you how much time I've saved over the years with this one little feature. )

Now, the fun stuff. Lets say you have 5 SWFs in that folder for 5 different panels. In the "Other Panels" menu they show up as:
WindowSWF_1
WindowSWF_2
WindowSWF_3
WindowSWF_4
WindowSWF_5

Once this bug hits you never know what you'll get when you select WindowSWF_1 from the menu.. it might be the _3 panel, or maybe _4 opens.. and you can try opening all of them but you'll get duplicates of some and so never see that one you really need to use. It's kind of like Russian roulette when it starts.

I'm not sure what triggers it.. but once it starts it's locked in there and happens consistently. What fixes it? For me a reboot seems to do the trick until it strikes again. I probably hit this once a week or so.. so not a huge, major pita..

Again, it's been reported long ago, so just letting folks know that if you do hit this.. just reboot.. go get coffee.. wink
Page 4 of 6 pages « First  <  2 3 4 5 6 >