Pssst wana see Apollo IO examples? Get your Pocket book now!

Filed under: Flex — Wrote by Campbell on Saturday, March 3rd, 2007 @ 11:46 pm

A mate hinted this to me earlier today. Im not sure if it was already out but hey share and share alike I say. Sorry this may be posted somewhere else but Ive not seen it.

Oreilly have printed the Apollo for flex developers pocket book writen by Mike Chambers, Robert and Jeff (sorry could read last names off the small image. Great you even notice there is a link to a sample chapter titled:  Chapter 4: Using the File System API (PDF Format).

"var stream:FileStream = new FileStream( )
stream.open(file, FileMode.WRITE);
stream.writeUTFBytes("This is some sample text.");
stream.close( );"

Cool go check it out if you didnt know about it. 

Incedently its cheaper to by one book from Amazon if your not in the states, but if your buying a couple for your developers cause your a nice development manager, then head to the Orielly store as you get 3 for the price of two.

Free CPU cooker! AS3 smoking

Filed under: Flash — Wrote by Campbell on Saturday, March 3rd, 2007 @ 12:36 pm

Yep heres the working swf from my previous post…..I could chuck random wind etc in but now I have a new project I will outline in a new post. 

WARNING: this probably will make you machine chug ;)

I tried to make it a small fire so it would step slowly but you can make smoke clouds 10x the size…haha you could blow on your mic and the cloud get bigger! 

http://blog.xsive.co.nz/flex_source/smoke_generator/ 

Flex on Rails not a dream any more!!!

Filed under: Flash, Flex, Ruby on Rails — Wrote by Campbell on Friday, March 2nd, 2007 @ 6:06 pm

Have you played with Ruby on Rails? if not well theres no helping you….. (just jokes). But there are alot of nice features. Today lets take a look at ActiveRecord. What it does is on startup of the website it maps database tables to the Class objects (Models in MVC) in its code. From there on in you have methods like Cat.find(:all) which will go find all the cat rows in the Cats table database and return them. Thats it no more code!!  How about matching to sql conditions?  Well, Cat.find(:first, :collar_color => 'blue'). nice!!

So how cool would it be if flex could do this to a database. Well Mark from WebOrb showed me it can. With that little code!!! Mark has basically mapped alot of the cool functionality of ActiveRecord from ROR into their Flex Data Services package. Very cool! Ok so where is it? Well its still in the works but very close and you will be able to add code like:

<mx:DataGrid dataProvider="{ActiveRecords.Order.findAll()}"
   <mx:columns>
     <mx:DataGridColumn dataField="OrderID"  />  
     <mx:DataGridColumn dataField="CustomerName" />
     <mx:DataGridColumn dataField="BillDate" /> 
     <mx:DataGridColumn dataField="ShipDate" />
   </mx:columns>
</mx:DataGrid>

What this basically is, is a data grid that will ask ActiveRecord to go and find all the Orders in the database, and populate the datagrid with them. Hang on i hear you say….what about Async callbacks, when the data has loaded. Well seeing databinding is available in flex that method can return an empty Array collection and when the data is recieved the datagrid will update. No more addEventListener(……… But dont worry you still have them there for use if you want to update the UI. But its AMF packets here so the packets are binary data and pretty quick.

Ok cool so what about all those Order objects we have in the datagrid, what can they do now? Well through the majick of data binding and ActiveRecord you can just have another datagrid below that updates automatically as items are selected in the first:

<mx:DataGrid dataProvider="{otherDataGrid.selectedItem.addresses}">
  <mx:columns>
    <mx:DataGridColumn dataField="OrderID" />
    <mx:DataGridColumn dataField="OrderDate" />
    <mx:DataGridColumn dataField="RequiredDate" />
    <mx:DataGridColumn dataField="ShippedDate" />
    </mx:columns>
</mx:DataGrid>

And that would populate the second datagrid with all the addresses for an order for each click on the first datagrid. And thats all info in the database.

So how does it work?  Well you set up your database model as you would any other application, hit the WebOrb Control panel and allow it to inspect the database tables. It will then generate a code base for you to place in your Flex application. Dont worry there are empty stubs for extending with your own functionality which never get over-written when you update the generated code.

Much much much more cool things are in the pipline but this blog post is getting a tad long. So heres what you need to start to find out more information

WebOrbs blog

Also if your lucky enough to be going (or even have tickets too) Flex 360:

"Also, if you are attending the 360Flex conference, I will be demonstrating WDMF during my session next Monday between 4:00 and 5:20 in the Integration track." – Mark Piller

Stay tuned I will be updating with more soon. 

The closest thing to being a New Zealand Resident; join NZFXUG

Filed under: Flash — Wrote by Campbell on Thursday, March 1st, 2007 @ 5:24 pm

So you cant get residency in New Zealand? Or haven't ever tried? Why bother, now you can join the New Zealand Flex user group and Im sure its just as good.

Check out the newly created http://www.fxug.org.nz/ 

Looks pretty with web 2.0 gradients and large fonts. I think it looks pretty sex-c so let me know if it doesn't work on your browser (Mac users looking in your direction) There still needs to be some work done on the content and we still have to have our first meeting. 

The User Group was founded by Ross Phillips and Kia Koenig and myself, and it should become the first point of contact for Flex developers in NZ. We're going to hold regular meetings in Wellington and Auckland.

 

Apollo is coming, Run for your lives, Timeframe Apollo Camp??? [My Guess]

Filed under: Flash — Wrote by Campbell on Thursday, March 1st, 2007 @ 10:24 am

Mike Chambers just posted that Apollo Alpha!!! will be out on labs soon. Knowing how Adobe operate I think it will pretty much be the same time, if not just after Apollo Camp. Its just how Adobe work. So keep an eye on the labs site around March 16th, 2007.

So might be time to plan some time off to play if your into that sorta thing. Hahaha I will be [G33k emoticon]! 

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -