Skip to content

Flash Development for native iOS iPhone

This came a quite a shock to me, since it seems so impervious to the wailing of developers and consumers alike, but Apple announced today via an official press release that it would be relaxing some of its iOS development restrictions. In a move toward greater transparency, it’ll also publish its App Store Review Guidelines for the first time.

To quote Apple:

We are continually trying to make the App Store even better. We have listened to our developers and taken much of their feedback to heart. Based on their input, today we are making some important changes to our iOS Developer Program license in sections 3.3.1, 3.3.2 and 3.3.9 to relax some restrictions we put in place earlier this year.

Sections 3.3.1, 3.3.2 and 3.3.9 of the iOS Developer Program license focused on using third-party tools to develop iPhone applications. One very noteworthy example of such a tool was Adobe’s Flash to iPhone packager, which it created to allow Flash developers access to the lucrative iOS market.

Read more…

Adding / Removing: days, month or Years to Date

private function addToDate(date:Date):Date {
   switch (period_cb.selectedLabel) {
     case "Day":
           var temp:Date = new Date(date.getFullYear(),date.getMonth(),date.getDate() + Number(valueDate_ti.text));
           break;
     case "Week":
           var temp:Date = new Date(date.getFullYear(),date.getMonth(),date.getDate() + Number(valueDate_ti.text) * 7);
           break;
     case "Month":
           var temp:Date = new Date(date.getFullYear(),date.getMonth() + Number(valueDate_ti.text),date.getDate());
           break;
     case "Year":
           var temp:Date = new Date(date.getFullYear() + Number(valueDate_ti.text),date.getMonth(),date.getDate());
           break;
   }
   return temp;
}

valueDate_ti is a text input that accept numbers to add to the date,
period_cb is a ComboBox, which selects the cycle time: Day, Week, Month, Year;

Google Chrome embraces Adobe Flash

<mx:Everything /> has the story:

What a great day. While many of the Apple kool aid drinkers are eagerly awaiting the arrival of their so called Flash death machine known as the iPad, Adobe and Google have announced Flash Embrace. Flash Embrace is a commitment by Google to include the Flash Player in the distribution of its Chrome Browser. So, the lines are further drawn in the sand. Google vs Apple enter into another round and as someone who makes his living on the Adobe Flash Player, I am glad to have Google on the side of the Flash Player.

The question is, how long will it be before I can put my Google gPad on my desk next to my Android based Nexus One.

Handling Yes | No Confirmation Alert messages

A clean way to create a Yes | No confirmation popup with handling the user’s choice would be coded as follows:

Alert.show("Are you sure you wish to Deactivate this Spot?","Confirm Deactivate", Alert.YES | Alert.NO, this, deactivate, null, Alert.NO);

private function deactivate(e:CloseEvent):void {
    if (e.detail == Alert.YES) 
       // They clicked on Yes
}

Actionscript Snippets Crowd sourcing Application

//aSnippet enables you to keep all of your frequently used code snippets (As3, As2, Js, PHP, HTML, MXML…)  in one place that’s accessible from any computer.

You can share your code with other visitors and use what they post, too.

Directly from inside Adobe Flash or  the Desktop AIR Application.

To get the AIR application, http://asnippet.com/blog/ or simply Try it online: http://asnippet.com/blog/?page_id=21

The have a community of developers and you can also add your own snippet. This is a great help in a thriving community of Actionscript developers.

Session Management in Flex – SharedObject

We’re trying to implement a simple Session Management for our end-users to be able to reload the page after signing in to stay signed in.

I did this by utilizing the SharedObject, which can store information on the users computer, regardless if they close the browser or went to a different site.
To create a SharedObject (cannot use the new keyword), and hence is instantiated like so:

private var _so:SharedObject = SharedObject.getLocal("member");  // member here is the name of the cookie stored on the clients computer

To add some parameters to the object stored, you simply:

_so.data.userFirstName 	= obj.response.firstName; // obj.response.firstname comes from the server after a user signed in

To read from the shared Object located on the users computer:

trace(_so.data.userFirstName) // as you can tell it’s the same way to read, as it is to write.



 

Sorting an Advanced DataGrid with Grouping Collection

This took a while for me to solve. I wanted to group my rows by name and sorted by date for each group collection. Much thanks to Sameer Bhatt as he deserves the credit for finding this clean solution.
So I have an ArrayCollection:

[Bindable] private var siteTrafficData:Array = [ // dummy data
{absoluteUniqueVisitors:"164630", avgPageViews:"2.5900", bounceRate:"29.4400", change:"0", date:"2009-12-07", id:"972900", name:"www.site1.com", newVisits:"51.9800", pageViews:"480718", timeOnSite:"216.4000", visitorsPerDay:"195716", visits:"158716"},
{absoluteUniqueVisitors:"166841", avgPageViews:"2.5400", bounceRate:"29.0600", change:"1.85", date:"2009-12-09", id:"972940", name:"www.site1.com", newVisits:"52.0600", pageViews:"480913", timeOnSite:"211.3900", visitorsPerDay:"189674", visits:"189224"},
{absoluteUniqueVisitors:"166841", avgPageViews:"2.5400", bounceRate:"29.0600", change:"1.85", date:"2009-12-05", id:"972960", name:"www.site1.com", newVisits:"52.0600", pageViews:"468544", timeOnSite:"216.4520", visitorsPerDay:"289224", visits:"219734"}];

An Advanced DataGrid which groups the rows by the name. Read more…