Archive
You are currently browsing the Scott Morgan blog archives
for October, 2007.
By scott
Yay Leopard arrived on store shelves on Friday!! The upgrade takes forever but in true apple style they have created a very nice update to OSX. However, if you visit a site that is using Flash and the FileReference.upload() in any browser running in Leopard you will not be happy. Not sure if Apple will need to push out an update or if Adobe will. Let’s hope it is Apple, we all know how much fun it is detecting plug-in minor versions and an OS version just to circumvent certain functionality. As it stands the multi-uploader on Flickr isn’t working any more (more here). I found a few others discussing this issue too. And then there is this thread discussing all the bugs found in Leopard, don’t these people have anything better to do with their weekends
By scott
It amazes me that people don’t know about describeType(). If you’re lazy, or as some developers call it, efficient, you always don’t have time, or really don’t feel like digging through half assed completed documentation to see what parameters a classes constructor accepts. Sounds like the perfect time to combine forces, trace() meet flash.utils.describeType(). The describeType() method returns an xml dump that contains all the details you’d ever need to know about any object that is passed in as a parameter.For example, let’s pretend this is our first time working with Flash (of course you could be working in Flex too), lucky us, we never had to use AS2 or AS1, we only heard our cubicle neighbors groaning about spaghetti code, and hidden code attached to buttons. Since this is our first time using Flash we don’t even know what a MovieClip is or what methods are available to us. One simple line of code will solve our ignorance.
trace(flash.utils.describeType(flash.display.MovieClip));
This one little line of code returns this to us in our output window (shortened for your scroll wheels sake):
<type name="flash.display::MovieClip" base="Class" isDynamic="true" isFinal="true" isStatic="true"> <extendsClass type="Class"/> <extendsClass type="Object"/> <accessor name="prototype" access="readonly" type="*" declaredBy="Class"/> <factory type="flash.display::MovieClip"> <extendsClass type="flash.display::Sprite"/> <extendsClass type="flash.display<::DisplayObjectContainer"/> <extendsClass type="flash.display::InteractiveObject"/> <extendsClass type="flash.display::DisplayObject"/> <extendsClass type="flash.events::EventDispatcher"/> <extendsClass type="Object"/> <implementsInterface type="flash.display::IBitmapDrawable"/> <implementsInterface type="flash.events::IEventDispatcher"/> <accessor name="scenes" access="readonly" type="Array" declaredBy="flash.display::MovieClip"/> <method name="stop" declaredBy="flash.display::MovieClip" returnType="void"/> <method name="nextScene" declaredBy="flash.display::MovieClip" returnType="void"/> <method name="play" declaredBy="flash.display::MovieClip" returnType="void"/> <accessor name="currentScene" access="readonly" type="flash.display::Scene" declaredBy="flash.display::MovieClip"/> <accessor name="currentFrame" access="readonly" type="int" declaredBy="flash.display::MovieClip"/> <accessor name="trackAsMenu" access="readwrite" type="Boolean" declaredBy="flash.display::MovieClip"/> <method name="gotoAndStop" declaredBy="flash.display::MovieClip" returnType="void"> <parameter index="1" type="Object" optional="false"/> <parameter index="2" type="String" optional="true"/> </method> <accessor name="currentLabels" access="readonly" type="Array" declaredBy="flash.display::MovieClip"/> <method name="willTrigger" declaredBy="flash.events::EventDispatcher" returnType="Boolean"> <parameter index="1" type="String" optional="false"/> </method> </factory></type>
The output window never looked so good. Methods, paramaters, superclasses, accessors, the amount of information that is returned is beautiful. I don’t know how many for in loops I wrote in AS2 just to try and figure out what methods were available in a custom class.One thing to note is that describeType() only shows public properties and methods, and will not show properties and methods that are private, package internal or in custom namespaces.If you have never looked at the flash.utils.* package, I suggest you do, there are some handy little utilities in there.
By scott
After 6 years with the same design it was time to retire my old website. Like any busy developer or company for that matter personal projects always get pushed a side. I figured since I am starting new in L.A. that I should finally get around to updating my Blog. And here it is. I rolled my own CMS for my previous site and blog, it worked great, but it was dated. So now, like many, I have switched to WordPress.
I will soon have my portfolio back up, this time I am going to try and do something a little bit cooler with it, and since I am a Flash/Flex developer I will probably do something using the aforementioned technologies. For those who can’t wait to see what I’ve worked on the old portfolio can be viewed here. Stay tuned and let me know what you think of the new site.
Props to the designers of this theme N.Design Studio and MangoOrangeâ„¢, I haven’t set up all the 301s for the old content, so if you have bookmarks you may see the old design rearing it’s ugly <head>.
By scott
I posted a question on the Papervision3D forum earlier this week and no one has posted an answer yet. It seems like a simple question but I have tried every possible method and property known to man and I can’t find a solution. The question I posted was:
“I have created a MovieMaterial and I placed it in a panel. By default the MovieMaterial is 106×76 and I have set animated = true on it. When my carousel rotates to a specific plane a swf is loaded into the MovieMaterial and I call gotoAndPlay(’in’) on the loaded swf. The animation plays but since the animation goes larger than 106×76 it is cropped. I am trying to get the effect of the animation busting out of the panel/material. How can I turn off the masking on the panel, or is the material masked? I have set allowAutoResize to true, and have tried almost every property and method available, what am I missing? “
Does anyone have an answer out there? Please! I love that I am able to work with Papervision again, hopefully soon I will be able to post some of the cool stuff I am working on. I thank you in advance if you know the answer.
By scott
Personally I think they are just psychological. A technical placebo if you will. I noticed tonight when I was shopping in “beautiful downtown Burbank” that they have updated a few of the pedestrian crossing buttons with fancy blinking buttons that beep when you push them. I still don’t think they do anything, I think the beep and blink is another psychological trick, In your mind, when you push a button, you expect something to happen, the old plunger style buttons didn’t do anything and left you wondering if anything was going to happen. This is probably my most bizarre posting just wondering if anyone has any proof that these things actually change the light quicker. Next week we’ll discuss the close door button on an elevator
By scott
Google defines Thermo as “Two bars or wires of dissimilar metals joined at one extremity which Couple develop a current (thermoelectric current) when heated.” I define it as a major accomplishment for Adobe that is reinventing the term “Deseloper“. Aral Balkan has posted videos from the sneak peak at Max, too cool.
This is a very early sneak peak, possibly even some smoke and mirrors, but still, Adobe has hit the nail on the head and may have finally beat the Flex Project workflow issues. Watching these videos do bring up a few questions.
Are Thermo projects bound to the original assets? If the developer are working on a project together and the designer changes something in the design will Thermo automatically update the MXML. Obviously within reason, but say the designer moved the Favorites album list above the top list. Whould Thermo recognize this and make the change without the developer intervention?
All of the styles appear to be inline in the demo, can they be extracted into CSS for runtime styling? For larger applications this is mandatory for projects that are multilingual or are available under multiple brands.
What about working the other way? Open MXML in Photoshop? I don’t know how many times I have had designers take a screengrab of something I am working on, hack it apart in Photoshop just to show me what they want. Obviously they could do some of this in Thermo but I doubt Thermo will have every tool that is available in Photoshop and if it is a quick change a designer doesn’t need to learn Thermo, they can make the change, hit Save and the workflow isn’t interupted. This would also allow designers to skin existing components or even a prototype that a developer whipped together to show a concept.
With other WYSIWYG development tools the code output is usually something I wouldn’t want to hang on my fridge. MXML is pretty clean but there are optimizations that can be applied to ensure quicker compilation and easier access via Actionscript. I hope this will be considered. In the end it is all compiled so the output is usually not an issue but as a developer I have opened many files a designer has created with a WYSIWYG applications and have almost fallen out of my chair.
I am sure I will have more questions as I let this sink in. Coming from a design/creative background developer/designer workflows are something I have worked on at most companies I have worked at. I think this is a huge step in the right direction. As long as Adobe doesn’t create a visual tool for creating business logic my job will be secure when Thermo hits the market
By scott
Maybe I am the only one out there who didn’t know this feature existed on a Mac but I stumbled upon it tonight. As a Flash Developer I am constantly watching the CPU usage when I am QAing my work. I am also constantly fighting for screen real estate.As developers we have all experienced memory leaks, have accidently forgot to delete intervals or even worse ENTER_FRAMEs, or have tried to implement an animation where the animator went a little crazy with some filters. Prior to Flex 3’s Profiler us Mac users had to open our Activity Monitor and try to jam it in the corner of the screen where we can see the browsers CPU Usage column through all the other windows open. Tonight I figured out how to show the CPU Usage in the dock.
- First open the Activity Monitor
- Right Click (or click and hold, or CTRL click) on the Activity Monitor icon in the dock and select ‘Keep in Dock’ (if it’s not already there)
- Right click on the Activity Monitor icon again and select the ‘dock icons’ menu
- From the ‘dock icons’ menu select the ‘Show CPU Usage’ item
- There you have it, a nice little visual representation of your CPU usage, it is even separated by cores (if applicable)
Like I said at the beginning of this post, a lot of you probably already knew this and stopped reading this post after the first sentence. However I do know there are a lot of developers switching to Mac, so this Bud’s for you…err…post’s for you.
By scott
Congrats to Randy Troppmann and his team at runningmap.com. Their awesome Yahoo Maps mashup was featured on the “The Lab with Leo Laporte” last week.
I got to know Randy while working at Yahoo on the map API. Randy is an excellent example of what can be done with a powerful API. Randy is very active in the Yahoo Maps discussion board where he is always helping other Flash developers with their API question. Great work Randy, from what you said to Leo it sounds like you have some exciting updates coming, were you hinting at a paid subscription service when you said “this level will always be free”? What won’t be free? Can I say I know another future millionaire?
By scott
I am loving the H.264 video capabilities of the latest beta Flash Player however I can not watch any videos on CNN.com anymore? It accuses me of having a Flash blocking plugin, as if…haha. Anyone else run into this? Hopefully this has been reported to Adobe, I’m sure i’m not the first Flash Developer news junky.