Archive for August, 2006
XrayLogger, or the connector for the Xray debugging console, for AS3 has an alpha code release. You can find it here.
Xray is a nice open source project found on OSFlash.org. The definition of Xray from the OSFlash.org site:
Xray (The AdminTool) is a “snapshot viewer” of the current state of your Flash application without impacting the performance or the file size of your application. Xray’s true nature is to look into the very guts of the Flash application and dissolve the 2d myth you see on screen to a 3D tangible entity you can truly crawl through.
Xray is brought to you by Blitz Labs.
John Grden is the creator but others have contributed to the project in different ways. I think with the new Flex 2 UI Xray version there was some confusion on if Xray had an AS3 connector. This caused some pressure for John to create one. I went ahead and download the XrayLogger for AS3 connector and got it working without too much trouble.
This is a promising project and I am excited to see it further the support for AS3/Flex2. Fine grain object introspection and snapshot views as the app is running might be less troubling then debug mode of the Flex Builder. You wont get breakpoints but a lot of time I do not know what I want to debug until I see the problem and would like a quick way to narrow it down realtime instead of assigning a bunch of breakpoints and stepping through them. Nothing is a silver bullet, but either way this will be a great tool to debugging or state viewer tool in the Flex 2 arsenal.
Oh yeah, download the XrayLogger for AS3 and give John some feedback.
August 31st, 2006
The document for Flex 1.5 Panel attribute titleStyleDeclaration is a little mis-leading. But to much of my surprise I found a nice tidbit in the description of the titleStyleDeclaration. There is a default styleName for this attribute, which contridicts other statements on the Panel documentation page.
The default value is “windowStyles”.
Here is what it says in the top part of the documentation:
titleStyleDeclaration="Default value is undefined, which causes the title bar to have white bold text.“
And here is what it says in the Property Detail area:
Style declaration name for the text in the title bar. The default value is windowStyles, which causes the title to have bold text.
Between the windowStyles and the ControlBar style I was able to control the text color of the Panel’s header and controlBar, as well as not affect any text coloring inside the Panel component.
August 30th, 2006
I didn’t think much of my use of ASDoc when I created my Flex 2 / FMS ConnectionMonitor component. But I guess usage of the ASDoc is not straight forward and some people might want an example of how to use it.
You’ll find the ConnectionMonitor Component’s source and sample ASDoc documentation located here.
1. Grab the source and deploy it in a folder (ie: C:\renaun_com_FMS).
2. Make sure asdoc.exe in your cmd prompt path
3. Open an cmd prompt and navitgate to the src folder in download folder. (ie: C:\renaun_com_FMS\src)
4. Here is the command
C:\renaun_com_FMS>asdoc -output docs -doc-sources ./com -source-path ./com -external-library-path “c:\renaun_com_FMS\bin\RIALogger.swc” -main-title “Renaun Erickson’s Flex/FMS ConnectionMonitor” -footer “Coypright 2006 Renaun Erickson (http://renaun.com)”
5. You should see the documentation in the C:\renaun_com_FMS\src\docs folder.
For explanation on the parameters used look at http://labs.adobe.com/wiki/index.php/ASDoc:Using_ASDoc
Hopefully this makes sense. The quirks I had was that in the src folder there is a com and a scriptlib folder. I wanted asdoc to only look in the com folder for source files to document, thus I had to use ./com in the -doc-sources and -source-path parameters. And I ended up using -external-library-path instead of -library-path because of errors. (Error: Unable to resolve a class for ResourceBundle: logging.) I was then informed I needed to use += to resolve the -library-path errors.
After more testing I got -library-path to work with the command below, had to put “” around the whole -library-path part (thanks Brian):
C:\renaun_com_FMS>asdoc -output docs -doc-sources ./com -source-path ./com “-library-path +=c:\renaun_com_FMS\bin\renaun_com_Logger.swc” -main-title “Renaun Erickson’s Flex/FMS ConnectionMonitor” -footer “Copyright 2006 Renaun Erickson (http://renaun.com)”
August 24th, 2006
Validating forms are not my favorite thing to do in Flex 2. A lot of the process seems quite tedious. It is a big improvement over Flex 1.5, but typically you have to create the validators and then create a function to see if all the validators are valid/invalid.
It seems the simple approach to validation would be to have the Form be aware of the Validators and provide and easy Bindable way of providing the state of validity for the Form.
Typical Approach (One Validator):
- Create Form
- Create Validator
- Add valid/invalid event listeners
- Create valid/invalid method handler that sets the button.enabled property
Typical Approach (More than One Validator):
- Create Form
- Create Validator
- Add Bindable isValid flag
- Add different valid/invalid event listeners for each Validator or pass a identifier along in the generic function.
- Create different valid/invalid method handler and set a Bindable isValid flag variable. Or create a generic function with a lot of switch cases to set the event’s proper valid and then check if all flags are valid.
- Bind isValid flag to Submit button’s enabled property
Simple Approach:
- Create Form
- Create Validators
- Bind Form.isValid property to Submit button’s enabled property
This is exactly what the AdvancedForm component provides. You still have full control of the Validators, but it provides a simple approach to constraining Form submission.
You’ll find the AdvancedForm component on the Adobe Flex Exchange or under the components folder on my site.
August 23rd, 2006
The Flex 2 / Flash Media Server 2 (FMS) Connection Monitor component provides real time stats on a FMS connection. The detailed stats include latency, up bandwidth, and down bandwidth. Connected a Camera instance to the class also monitors FPS.
Here is a screenshot of the FMS and Flex components in action. Its pretty basic but is meant to be extend for somone’s specific needs.
This does show how to use Flex 2 with FMS. There is a README in the source which you can find here.
August 22nd, 2006
The AdvancedForm component has been updated to provide a simple approach to Validation. The AdvancedForm now looks for any Validators present in the same document scope. It then tracks any Validators valid or invalid change. It also exposes the “isValid” property that is set to True if all Validators in the same document scope are valid.
To see the updates in action nativate to:
http://renaun.com/flex2/AdvancedForm/
You’ll find a form with a “Submit Data” and a “Reset Form” button. The example has two Validators on the firstName and lastName TextInput controls. If you fill in the two name fiields the “Submit Data” button will become enabled, as its bound to the new “isValid” AdvancedForm property. Also a side note on reseting the form, the AdvancedForm does disable all Validators before reseting any fields and then enables the fields after the reset. This is to keep the action of Reseting any of the fields to cause the Validators to fire any events.
You’ll find the updated AdvancedForm component page here:
http://renaun.com/blog/flex-components/comp-advancedform
August 12th, 2006
Have you ever tried to figure out all the configuration parameters of mxmlc?
Continue Reading August 9th, 2006
As a member of the Las Vegas Adobe Users Group I am proud to annouce our celebration for Flash’s 10th birthday.
Please come join the group on August 15th, 2006 if you are in the Las Vegas or Henderson area. You can find more information at VegasAUG.org.
The offical Adobe page is located at http://www.adobe.com/products/flash/special/flashanniversary/
You’ll find a special offer on Flash 8 DVD Training for only $19.99 if you buy a copy of Studio 8 or Flash 8 Professional.
Some other user groups around the world have already celebrated the birthday. Here is some pictures from the Istanbul’s user group.
You can also find some awesome old flash work located at http://www.thefwa.com/flash10/
NOTE: Although the adobe site says we are meeting on August 14th, it is actually Tuesday August 15th that we are meeting. Check VegasAUG.org for update to date info. Please come and join us.
August 8th, 2006
The code in my “My Adobe Flex Ad Idea” uses Flickr to display a few images in a banner area under the term “Random Image Accelerator”, which in term is a play on RIA. The source code is available and in particular uses some of Adobe’s ActionScript 3.0 Libraries.
I finally had some time to create a very basic tutorial about Adobe’s ActionScript 3.0 Libraries, which you can find here.
I’ll be trying to add more tutorials, be them short or long, in the future.
August 4th, 2006
I upgraded my blog last night and it seems to have sent some of my posts out to MXNA again. Sorry for blasting of old posts.
August 4th, 2006
Previous Posts