Great post about how to create an OLAPCube object in Actionscript. Very usefull when you keep it mind that you increase the query performance by only addings the levels and informations you need for your query.
Click here
Posts mit dem Label AS3 werden angezeigt. Alle Posts anzeigen
Posts mit dem Label AS3 werden angezeigt. Alle Posts anzeigen
Dienstag, 25. März 2008
Dienstag, 20. November 2007
Get data from a WebService
Getting data from a webservice is pretty easy, but the first time I had the problem that the ResultEvent object had two different definitions, one when there is only one line in the table and the second when there is more than one line in the table.
When the query returns only one line the type of the event.result object is ObjectProxy, if the query returns more than one line the definition is an Array.
I can check this with a very simple static function that I put in an utility class. The function looks like this:
Now when you getting data from a webservice you only have to do things link this:
When the query returns only one line the type of the event.result object is ObjectProxy, if the query returns more than one line the definition is an Array.
I can check this with a very simple static function that I put in an utility class. The function looks like this:
public static function IsObjectArray(obj: Object): Boolean
{
var className: String = ObjectUtil.getClassInfo(obj).name;
if (className=="mx.collections::ArrayCollection"){
return true;
}
return false;
}
Now when you getting data from a webservice you only have to do things link this:
private function getSomeDataFromMyWebservice(event: ResultEvent): void{
if (event.result){
if (.IsObjectArray(event.result)){
for each(var item: Object in event.result){
}
}else{
//event.result is from type Object.
}
}
Samstag, 6. Oktober 2007
Custom preloader
Like a lot of people I wanted to add my own preloader in my application. In my google searches I found a very helpfull post from Ted Patrick here. In some ways it was a very good explanation about how the whole thing works but something was missing... the progress bar!
Here is my custom preloader example. Hope this while help.

Some stuff need to be added. for example the percent progress label. If someone is quicker than I to implement it please post a link in the comments.
PS: Right click and select "View Source..." to see how the things are working together.
New Sample with progress percent here
Here is my custom preloader example. Hope this while help.

Some stuff need to be added. for example the percent progress label. If someone is quicker than I to implement it please post a link in the comments.
PS: Right click and select "View Source..." to see how the things are working together.
New Sample with progress percent here
Abonnieren
Posts (Atom)