OK so your developing an application and you need a video component for Flex? Well do not go past GO go straight FLVPlayback 2.5. Back in late 2007 I was evaluating Flex with FMS 2 using Flex's video component. I must admit the Flex 2/3 video component is pretty average compared to standard of the other components in the Flex component framework. Simple video functionality was missing in the standard component and to do anything average just required too much effort. It made more sense to use Flash's video component to create a quick video player.
I'm not much of a designer but watching a design college skin FLVPlayback just look so effortless. To say I'm impressed with what FLVPlayback can do is an understatement. I know there have been a few blogs of using FLVPlayback so I'm not going to show an example (See Flex Examples). Also there is plenty of documentation with component itself. One little cool thing that I wanted to point out is to resize the component to the video's correct/preferred size.
In the below example you can see how you can resize your component to play the video in it's preferred size. Note this excerpt highlights that you resize your component after the video is loaded.
private var vid:FLVPlayback = new FLVPlayback();
private function onCreationComplete():void
{
...
vid.addEventListener( fl.video.VideoEvent.READY , readyToPlay);
...
}
private function readyToPlay(e:fl.video.VideoEvent):void {
...
this.width = vid.preferredWidth;
this.height = vid.preferredHeight; // Add the skin's control bar height
...
}
If more detail is required I will added it but this should be enough for the concept.
Saturday, April 4, 2009
Sunday, February 8, 2009
Yip I'm off to Webstock
Well I was thinking this year it was about time I attended a local web conference. I've been to webDU and MAX but never the local one... and it doesn't get much more local than being in your home town. The conference has a range of presenters (local and international) coming from various backgrounds. It will be really interesting to hear what some of these people have to say. Sometimes you can get a bit close minded about things (methodologies, technologies, & products) and this type of conference sheds light on what other people are doing. There is so much happening in the Adobe space one could happily ignore the others.
For more information about webstock 2009.
Oh I see there is a card trading game ...I wonder if Agent K is on the case.
Update: I'm just attending the conference (February 19-20) and not any of workshops.
For more information about webstock 2009.
Oh I see there is a card trading game ...I wonder if Agent K is on the case.
Update: I'm just attending the conference (February 19-20) and not any of workshops.
Sunday, February 1, 2009
Flex Bulider 3.0.2 update does not update AIR projects 1.0=>1.5
Well I updated my Flex Builder plugin from 3.0.1 to 3.0.2 looking to get all the goodness of AIR 1.5 and Flash Player 10. You might be thinking I'm a bit late on the scene with the update being out for about 3 months now but there appears to be a bug with the updater in Eclipse (See Matt Chotin's comment at 30 Jan). Anyhow I installed the update to find my AIR projects not doing anything when I run or debug them. Almost like they were crashing straight off the bat. I created a new AIR project to see if the updater had screwed my system but no the new AIR project worked fine. I then added the 3.0.1 SDK back in since 3.0.2 was the new default and set the project to use it I had no problems. This didn't sit right with me that my AIR projects couldn't use the updated SDK and AIR runtime. I had a look around and noticed the the XML config file for the AIR application was 1.0 I changed it to 1.5 and set the SDK to 3.0.2. The project ran and debugged fine now...
So what does this mean? If you change your SDK the Flex plugin does not update your AIR app config file to the correct version of AIR. Must admit I would expect if you complied an app with a previous version of the 3.0.* SDK that it would still run in the AIR 1.5 runtime. I think there is a little more to this story but I'll leave it here for the moment.
So it appears that changing your SDK version does not update your AIR config file so how to fix?
Change the second line in your myapp-app.xml file from:
<application xmlns="http://ns.adobe.com/air/application/1.0">
To:
<application xmlns="http://ns.adobe.com/air/application/1.5">
So what does this mean? If you change your SDK the Flex plugin does not update your AIR app config file to the correct version of AIR. Must admit I would expect if you complied an app with a previous version of the 3.0.* SDK that it would still run in the AIR 1.5 runtime. I think there is a little more to this story but I'll leave it here for the moment.
So it appears that changing your SDK version does not update your AIR config file so how to fix?
Change the second line in your myapp-app.xml file from:
<application xmlns="http://ns.adobe.com/air/application/1.0">
To:
<application xmlns="http://ns.adobe.com/air/application/1.5">
Sunday, January 11, 2009
AIR String concatenation bug
Well the other day I was doing some file IO to tidy up some CSV files. I was trying to do this quickly and just was using a String to stored the data before writing it to file. I'm sure your thinking I should be using stream for this and I would agree with you. But at the time I didn't believe there would be an issue with the data size. Then I found my fairly simple AIR app crashing quite badly. OS X kill the app because of the following error.
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0
As you can see this is far from nice and most importantly this is a operating system error not a native AIR/AS3 error. So what is causing this fatal error? Well just concanate two large strings you will get this. I created a dummy programme to show the issue.
var myStr:String = new String("1");
for ( var i:int = 0; i < 100; i++) {
myStr = myStr + myStr;
}
On my machine it completed to the 29th loop before failing. So it could handle 2^29 but no larger.
Can you protect your app from this with a try/catch statement? No. This is a real pain in the neck. It's not like I'm writing the app in C/C++ where you can drive your app into the wall because you the developer are managing memory. With ActionScript I would expect the Flash player/runtime to return an error and not crash since it is managing memory.
I will add this as a bug or vote for this fix if it is already entered.
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0
As you can see this is far from nice and most importantly this is a operating system error not a native AIR/AS3 error. So what is causing this fatal error? Well just concanate two large strings you will get this. I created a dummy programme to show the issue.
var myStr:String = new String("1");
for ( var i:int = 0; i < 100; i++) {
myStr = myStr + myStr;
}
On my machine it completed to the 29th loop before failing. So it could handle 2^29 but no larger.
Can you protect your app from this with a try/catch statement? No. This is a real pain in the neck. It's not like I'm writing the app in C/C++ where you can drive your app into the wall because you the developer are managing memory. With ActionScript I would expect the Flash player/runtime to return an error and not crash since it is managing memory.
I will add this as a bug or vote for this fix if it is already entered.
Thursday, December 18, 2008
Centaur language features welcome
Well as new ColdFusion Centaur is in the forge being crafted by Adobe developers with all sorts of goodies I rub my hands with glee. I'm really happy to finally see you will be able to define components in cfscript! Also getters and setters making the fold which are well overdue! Will be interseting to see how much closer they make cfml and cfscript since for a long time cfscript has been left out in the cold.
Bolt out of the ColdFuion blue comes a new IDE which I hope will kick ass when developing apps. Adobe did a great job with the Flex IDE and I'm expecting the same developer benefits to come availialbe to ColdFusion. Yeah we've had CFEclipse which really leveraged Eclipse developer features but never cut the mustard for me. For too long Dreamweaver was really the best CF editor and it wasn't a good editor for developing applications. So I'm wishing and hoping that Bolt will be amazing!
These are great features but they are so overdue it is not funny. I'm almost certain if we had an IDE and the language features in this release in 6.1 ColdFusion developers would be developing very differently today. Perfect example is the poor cfinterface tag which seems to constantly underfire. Though it's not that the concept of interfaces is bad and I really like them. Just that there is not enough development tools to support it in current shape of CF but if we had some more language features and tools to hook into them I doubt there would the debate there is. Though as the saying goes "Better late than never..."
Bolt out of the ColdFuion blue comes a new IDE which I hope will kick ass when developing apps. Adobe did a great job with the Flex IDE and I'm expecting the same developer benefits to come availialbe to ColdFusion. Yeah we've had CFEclipse which really leveraged Eclipse developer features but never cut the mustard for me. For too long Dreamweaver was really the best CF editor and it wasn't a good editor for developing applications. So I'm wishing and hoping that Bolt will be amazing!
These are great features but they are so overdue it is not funny. I'm almost certain if we had an IDE and the language features in this release in 6.1 ColdFusion developers would be developing very differently today. Perfect example is the poor cfinterface tag which seems to constantly underfire. Though it's not that the concept of interfaces is bad and I really like them. Just that there is not enough development tools to support it in current shape of CF but if we had some more language features and tools to hook into them I doubt there would the debate there is. Though as the saying goes "Better late than never..."
Sunday, November 30, 2008
After thoughts on MAX
Well I'm back home after my whirlwind tour to MAX San Francisco. Overall I really enjoyed MAX a lot. It was great meeting other developers, managers, CEO's, Adobe staff, and talking about projects they are working on. There are some really interesting problems out there being solved. The only thing which I was let down with is difficulty level in some of the sessions I attended. I was expect "Advanced" to be advance instead I found it more at the beginner to intermediate level. I spoke with Adobe user group people and they suggested I should go use the community groups like 360|Flex for real advance session. Though I was speaking with Michael Labriola and he had some wise words on this matter to deep dive into the Flex framework to really understand it. So in the future I'll be making some posts on my deep dive into Flex.
I had an amazing time at MAX and was well worth my effort.
I had an amazing time at MAX and was well worth my effort.
Thursday, November 6, 2008
Gumbo CSS Advanced Selectors are wicked
Well I was looking at the 360 MAX sessions and saw an item of interest on Advanced Item Rendering. As you do when your surfing the net I had a quick look at Joan Lafferty's blog and saw another interesting post about the new CSS Advanced Selectors in Gumbo. I had a read through and it is wicked the power the Advanced Selector now gives you. This really comes into it's own since now you can style hierarchically instead of globally. I see this taking CSS skinning to a new level for the skinning community.
A brief example of the difference below but for more go to CSS Advanced Selectors
If you wanted all Buttons in a VBox to be blue and all other Buttons to be red.
In Flex 2/3
You could do something like
A brief example of the difference below but for more go to CSS Advanced Selectors
If you wanted all Buttons in a VBox to be blue and all other Buttons to be red.
In Flex 2/3
You could do something like
Button {
color: #FF0000;
}
.VBoxButton {
color: #0000FF;
}
In Gumbo you can do thisButton {
color: #FF0000;
}
VBox Button {
color: #0000FF;
} As you can see you don't need to create a hash class selector. I'm really looking forward to using the advance selector feature!
Subscribe to:
Posts (Atom)

