You need this like a hole in the head

Tag: Flash CS5

Flash mystery error 1046: InstanceInfo

I was working on a Flash component today and it started throwing this exact error at me after I cut-and-pasted some of the designer’s assets into the FLA:

1046:Type was not found or was not a compile-time constant: InstanceInfo

I couldn’t figure it out. I didn’t have any symbols, actionscript, or instance names of “InstanceInfo.” I wasted nearly an hour tracking down this issue only to find out that it was another damn TLF Textfield BUG! Does anyone actually use the TLF Textfield? It’s nothing but trouble for me.

Enough ranting. The problem was that the designer had accidentally created a few TLF Textfields in a separate FLA, which I pasted into my FLA. Unfortunately, my document was set to publish to Flash 9, which doesn’t support TLF Textfields. The really annoying thing was that I didn’t get a warning from Flash when I pasted in the assets and the IDE gave me a cryptic and useless compiler error.

Luckily, the fix is simple. Open up the publish settings and click on the Flash tab. The IDE will then finally flag the TLF Textfields as a problem and show you a warning popup. If you want to change your publish settings to Flash 10, click “cancel” when the popup appears. If you want to keep your settings where they are, click “ok” and flash will convert your TLF Textfields to Classic Text. Save your FLA and you’re done!

I’ve been to busy to post much here lately, but I thought that this might actually save someone else a small headache.

Flash CS5: How do I get my timeline frames to zoom out?

This is a strange one… I was working in Flash CS5 the other day and I somehow zoomed in to my timeline frames and couldn’t get them to zoom out. I did some Googling and found lots of people with the same problem, but no solution.

scroll mouseWell, if you’re like me, you use a scroll mouse, where the scroll wheel is actually a clickable middle button. Most 3D modelling programs actually use this middle mouse button, but a lot of programs do not, so it’s easy to forget about it.  It turns out that I had accidentally clicked the mouse wheel while I was using it to scroll through the timeline. So, to get it to zoom back out, I had to click and hold the mouse wheel down while scrolling in the timeline.

This seems like one of those weird “features” that Adobe added to Flash even though nobody asked for it. You’re much more likely to do this accidentally while quickly clicking around than you are to ever use this feature.  This would be a useful feature on the stage, but it doesn’t work on the stage – just the timeline. Huh?

Overall, though, Flash CS5 is a MASSIVE improvement over CS4. If you haven’t upgraded yet, you should. It’s still a little less stable and a bit slower than CS3, but the workflow improvements are great.

Flash CS5: TLF textfield bugs (or TLF WTF?)

So, I just upgraded to Flash CS5 and I have to say that it sucks slightly less than CS4. The IDE layout changes are for the better (unlike CS4) and it *seems* faster. But, I ran into a weird bug with one of the new features in Flash CS5: The new TLF textfield causes problems with externally loaded SWFs.

Here’s the scenario: I have a main SWF that loads another SWF at runtime. I’m using some code that I cut-and-pasted from another project to load the SWF, so I know it works. But, in my new CS5 project, it throws runtime errors whenever I try to access a public function of the loaded SWF. It can’t access any of the public methods and it keeps telling me they don’t exist. I try loading a different SWF and no problems. Huh?

In my debugging, I also noticed that when I traced the numChildren of my loaded SWF, it was wrong. It said I had 2 children when I could see that there were 4. I added another one to the timeline. It still said there were 2 children. Even weirder is that when I traced these 2 children, Flash told me that one of them was a Loader (it wasn’t). Again, I tried the same test on another SWF and it was ok.

The problem turned out to be 2 textfields that were in my loaded SWF. Flash CS5 set them as TLF Text when I created them. This is apparently the new default. The TLF text fields were breaking my loaded SWF. If I removed them, everything went back to normal. I changed the textfields from TLF Text to Classic Text and everything worked. I probably spent over an hour tracking this down.

Once I figured out what was causing the issue, I did some Googling and found this:
Flash CS5 TLF Engine Causes Errors With Loaded SWFs.

Anyway, this is a long winded way of saying be careful about using the TLF Text in Flash CS5. Oh, and…
Adobe, you suck.

Powered by WordPress & Theme by Anders Norén