Uncategorized
Fix for when Flex and your debug flash player won’t connect for a debug session
Wednesday, August 6th, 2008 | Uncategorized | 3 Comments
Luckily this guy wasted hours finding a fix to this strange issue so I didn’t have to. Right click on the swf and click on “debugger” in the flash context menu (if the “Where is the debugger or host application running?” pop up isn’t already open). Select the “Other Machine” radio box button and type in “127.0.0.1″. Voila. Why does this work when “localhost” was already selected by default? No idea but i’ll be getting something done tonight. Thank you guy and your blog.
If this doesn’t solve your issue and your using Firefox 3 check out this Jira.
How to launch Flex debug session via keyboard shortcut on mac (part deux)
Wednesday, July 30th, 2008 | Uncategorized | 2 Comments
So continuing on this post I took a gander at Flex > Preferences > Keys to get my command-f11 key working… with success! Under the list of keyboard shortcuts about halfway down the “>Category<” column is Run/Debug. The command “Run Last Launched” is mapped to Command-F11 as it should be but under the “When” column it is set to “In Windows”. Not sure what all “In Windows” entails but I edited this shortcut adding a new “When” to this shortcut found under the drop down list called “Editing Flex Source” and bam, functional command-f11. Sure beats the kung-fu move of a keyboard shortcut mentioned in my last entry.
How to launch Flex debug session via keyboard shortcut on mac
Tuesday, July 29th, 2008 | Uncategorized | 6 Comments
 
OMG. For over 2 years I’ve launched Flex by mousing over to the little bug icon and clicking. I’ve done it so often its become second nature. All because I took one look at this cryptic glyph sequence, tried to guess..tecute it, then gave up to pretend this shortcut didn’t exist.
After a brief stint back in the Flash IDE–instantly returnign to hitting command-enter to debug, I came back to Flex with the determination to slay this gnarly shortcut sequence once and for all. And here’s the secret:
That up arrow icon is shift. Thats an easy one. The bizzare serif-X-with-one-leg-missing glyph represents alt/option. Yeah I don’t understand that either. Then there’s the letter “D” and “F”. Naturally, hitting all 4 together does nothing. But wait, see the slight excess kerning between those 2 letters? Thats a space. It means let go of the current key combination before hitting the next letter. And there it goes.
Why 4 keys in 2 combinations just to debug your project? Seams a little absurd for one of the most important and common shortcuts. Is every other normal key combination really taken? Really? I’m using the Eclipse plugin version of Flex btw, but I assume its the same with the stand alone.
Did anyone else have trouble with this? Don’t make me feel stupid and annoyed all by myself :P
UPDATE: Figured out how to get the more straight forward command-f11 shortcut working here
Serious (and seriously obscure) bug with flash embed code redirects and variables in IE
Thursday, July 24th, 2008 | Uncategorized | 4 Comments
Haven’t been posting too frequently, been pretty busy at KickApps working on the Widget Studio. I’d like to write about it in another entry at another time but for now I’d like to help expose a pretty vicious bug we’ve encountered during the course of developing this app.
The Widget Studio is a Flex based WYSIWYG widget generator who’s end product is embed code for widgets. The embed src points to a server side redirect that returns our main SWF file with some variables appended to it. These variables have to be dynamic to pass things like the build version number (cache control) and refferal url to the swf. After much debugging we realized if querystring variables are appended to the redirect in <embed src=”"/> then variables attached to the swf from inside the redirect do not get passed to the SWF in IE. After much googling, these are the only 2 entries we could find on the matter:
MSDN forum post
JW Player (?) forum post
If both appended-to-redirect and inside-redirect variables are neccessary, the only viable answer is a rest style architecture to pass variables to your SWF (assuming, like in our case, the appended-to-redirect variables can’t be moved to flashVars as they are used by the redirect script itself)
Event.INIT and Event.COMPLETE don’t fire when loading an unpacked swc
Thursday, July 24th, 2008 | Uncategorized | No Comments
Cleaning out the wordpress there were a few posts I hadn’t finished. This one is mainly a for-future-reference for myself.
I’ve been doing some run-time class loading involving loading SWF files into the same ApplicationDomain as the container via Loader then using getDefinitionByName to access new instances of the loaded classes. I was perplexed that the INIT and COMPLETE events weren’t being dispatched and found some info here.
SecurityError: Error #2000: No active security context.
Thursday, July 24th, 2008 | Uncategorized | 1 Comment
Always interesting to throw an error that has only 4 obscure results in google.
Using setTimeout with navigateToURL:
var urlRequest:URLRequest = new URLRequest(”http://google.com”);
setTimeout(navigateToURL, 1000, urlRequest, “_blank”);
Generates:
SecurityError: Error #2000: No active security context.
at global/flash.net::navigateToURL()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at <anonymous>()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
A work around is to wrap the call in an anonymous function:
setTimeout(function():void { navigateToURL(urlRequest, “_blank”); }, 1000);
Fix for Eclipse tab reordering “feature” (MRU tab positioning policy)
Tuesday, March 18th, 2008 | Uncategorized | No Comments
I love using Eclipse for my day to day but I hate how it automatically re-orders my tabs. It looks like other people view the Eclipse “MRU” tab positioning policy as a burden as well.
If you know what I’m talking about and want your tabs to remain where you put them, try installing this Eclipse plugin made to do exactly that: Extended VS Presentation plugin
Its got some other really nice features but check it out and see for yourself.
Conditional breakpoint: enterDebugger()
Sunday, January 13th, 2008 | Uncategorized | No Comments
Here’s a handy tip I recalled reading about but never really learned to appreciated until recently. You can run the package level function flash.debugger.enterDebugger anywhere in your code to break out into the flex debugger pragmatically. If you’ve ever had to step through the same break point repeatedly in the same debug session you can just throw this in an if statement instead and save some time and frustration.
Hello World!
Monday, December 24th, 2007 | Uncategorized | No Comments
So I’ve been planning to put up a flash related blog for some time. Hopefully it’ll be as useful as I’ve found some other developer blogs. Here we go!