Friday, April 2, 2010

blinking reload

Hi, I have this funky reload script to pull fresh data from a mysql database connector.

Some people mentioned using a push command but I have no idea how to implement that. If anyone could take a look that would be great!

thanks

%26lt;?xml version=''1.0'' encoding=''utf-8''?%26gt;

%26lt;mx:WindowedApplication xmlns:mx=''http://www.adobe.com/2006/mxml''layout=''absolute'' width=''1920'' height=''1080''

creationComplete=''dbTimer()'' borderColor=''#797979'' backgroundGradientAlphas=''[1.0, 1.0]'' backgroundGradientColors=''[#636363, #9A9A9A]'' color=''#F3F3F3''%26gt;

%26lt;mx:Script%26gt;

%26lt;![CDATA[

import mx.controls.Text;

import mx.controls.Label;

import mx.collections.ArrayCollection;

import mx.rpc.events.ResultEvent;

[Bindable]

private var omArray:ArrayCollection

private function resultHandler(event:ResultEvent):void

{

omArray = event.result.response.data.row;

}

import flash.utils.Timer

import flash.events.TimerEvent

import flash.display.Sprite

private function dbTimer():void

{

inventoryService.send();

var mTimer:Timer=new Timer(1000,10)

mTimer.addEventListener(TimerEvent.TIMER_COMPLETE,Comple);

mTimer.start();

}

private function Comple(e:TimerEvent):void

{

inventoryService.send();

dbTimer();

}

]]%26gt;

%26lt;/mx:Script%26gt;

blinking reload

I'm not at work right now, so I hope this isn't a pressing matter, but maybe I will dig this post up to the top for other people to help you.?I'll be of more assistance once I get to work tomorrow, but just wanted to mention a styling thing:

It's widely accepted to import everything at the top of your script.?This makes code more readable, and can help with organization.?However, your way is certainly acceptable as well.

I'll answer your question (hopefully) later tomorrow.

blinking reload

Thanks!

I can rearrange those import commands no problem.

No comments:

Post a Comment