Mozilla eats “@” for breakfast
Posted on March 10, 2008 by inEar
Filed Under Flash Hacks, Flash Tips | Leave a Comment
I found this weird little bug today.
If windowmode is set to transparent, Mozilla don’t register the altGr+2 as “@”. (I have not tested other characters with AltGr ). Only fix is to remove the wmode-param. So remember this when you need that html background-image under your flash and the same time register a email-adress.
Thanks god for google!
Stopped by the pop-up blocker in your browser?
Posted on March 7, 2008 by Jörgen
Filed Under AS3, Flash Hacks, Flash Tips | 2 Comments
I used the navigateToURL(new URLRequest(www.whateverURL.com),”_blank“)
But when I tried it my browser just activates the pop-up blocker sign… not very god…
So after some trial and errors I found out the if I use the External interface it works great on my explorer and Firefox.
Here is my example: ExternalInterface.call(”window.open”,”www.whateverURL.com”);
Missing video frames
Posted on February 20, 2008 by Dave
Filed Under Flash Tips, Video | Leave a Comment
Trying to import a video into Flash IDE and place it on the timeline (need it there to work with graphics layers etc on top of it). However, Flash generally seems to want to screw up the video by changing timings in it, i e dropping frames here and there. The quick solution is to just update the video file in the library. The second time its imported it seems to be alright. It’s kinda annoying anyway since each time you import it it takes a few minutes.
Note: The video is an AVI without any compression.
import external classes at runtime!!
Posted on February 13, 2008 by Jörgen
Filed Under AS3 | Leave a Comment
A new thing about AS3 is the ability to import external classes at runtime!!Yes it’s true. You can use Loader() to import the swf and then when the swf is loaded you can get all the classes in the swf file through the “event.target.applicationDomain.getDefinition([class name]) as Class” thingy … I’m not sure where or when to use this cool technique… but if you are used to share library things in your projects this is the thing for you. I’ll used this technique to import fonts at runtime…
Here is an article about it!
Where’s the mouse at
Posted on February 12, 2008 by Dave
Filed Under Flash Hacks | Leave a Comment
An odd thing I stumbled upon. Don’t know if you would file it as a bug. Apparantly you can hide the mouse with Mouse.hide() even when the mouse is outside the flash area. This simple flash show how you coudl easily annoy people by using Mouse.hide() in an onEnterFrame loop. Even when the mouse pointer is outside the flash area it will hide and just flicker when ju move it (tried it in FireFox and IE).
Can’t think of any thing useful to do with this “feature” though, except for annoying people.
Why do you never learn
Posted on February 8, 2008 by Dave
Filed Under Flash Tips | 2 Comments
That dynamic text fields can’t be masked by graphics, only by movieclips, is a well known fact. Never the less, it’s still utterly annoying.
Even though you’ve been through it a thousand times you still can’t get it in your head and spend way too much time trying to understand why that text field you are trying to access can’t be reached. Just to find that you in your haste have masked it with a shape instead of movieclip.
Iterate XML nodes
Posted on February 8, 2008 by Dave
Filed Under Flash Tips | Leave a Comment
In AS3 working with XML seems so much easier. But AS2 is still a part of the every day.
Always seem to forget and change how I parse XML, found this that I really don’t why I haven’t used before (at least I don’t think I have).
A really simple way to iterate through an XML objects childnode:
trace(theNode.nodeName)
}
Flash player 9 version issues
Posted on January 31, 2008 by Dave
Filed Under AS3 | Leave a Comment
Flash 9 is a great player and AS3 is really amazing. But crucial differences between different versions of the 9 player drives me crazy. For exampel… 9.0.47 and later can have linked movieclips placed later than the first frame on the stage timeline and then you can uncheck the export in fist frame box in the linked panel. Previous versions of the 9 player refuses to recognize linked movieclips if they aren’t exported in the first frame.
You can of course do so and then just use a loader swf for the site, but it is still an annoying issue.
Also… previous versions of flash 9 in combination with wrong browser makes event handling for root.loaderinfo buggy.
root.loaderinfo is as I see it essential for preloading an AS3 site and since the events doesn’t seem to trigger as they should I’ve ended up using some “old” enter frame approach instead using the enterFrame handler to check for loaderinfo status.
More on fonts and localization
Posted on January 31, 2008 by Dave
Filed Under Flash Tips, Font related | Leave a Comment
Why do they put the characters in different places in a fonts character map?
There is probably some good reason for it for someone… for me it is just trouble. Bought a Baltic font and thought it would work great, but somehow the Baltic specific characters were on different positions in the character map than Flash assumed. The only solution I found was to remap the characters the way flash wanted it useing Fontographer.
Font embedding troubles
Posted on January 31, 2008 by Dave
Filed Under Flash Tips, Font related | Leave a Comment
Why can’t localization and embedding fonts be as simple as one would want it.
Embedding a font in the library (new Font) to get the complete font may seem like a good enough solution. But no… you just can’t embed the whole typeface, just the characters that matches the current system at compile time. Sooo annoying. Even though you have a rich OpenType font with characters for all your languages.
Read somewhere that Flex can use some unicode range to embed characters at compile time, but Flex just isn’t my thing (too fond of my timeline), at least not yet.
My solution:
1. Place a textfield on stage and in it, embed all characters you need.
2. Create a movieclip with the textfield and export it for runtime sharing. Export the swf.
3. Create another FLA that includes the movieclip you previously made through “import for runtime sharing”. Export swf.
4. In your application FLA, load the swf you created. Now you can use the font, set it with either CSS or TextFormat. (I prefer CSS for localization).
One thing though, the font you import… you can’t have a textfield anywhere in your application FLA that has that font set in the IDE (you set your textfilelds font through actionscript). If you do… nothing will show up.
This solution seems good enough in both AS2 and AS3.
« Previous Entries Next Entries »