tags:

views:

128

answers:

2

hi, I am developing a application using adobe air and flex .....i have a block of code which should not execute for sometime for example.

private function filewrite():void
{
//some code 1

//STOP EXECUTION

//some code 2

}

something like this should happen...is there any Thread concept in adobe air?....how do i do it using adobe air 2.........

A: 

Maybe a little more info about why? It looks like you're dealing with a big file write and you want to wait until it's done. Air provides you with asynch writes, and there's an event event you can listen for when it's done writing.

le dorfier
I am actually scanning the network using nativeprocess....since scanning takes some time to complete i want to delay further execution to avoid unnecessary conflits......
Hara Chaitanya
A: 

To answer your question directly there are no threads in AS, and therefore air. You will need to kick off your scan and somehow listen for it to complete, I'm not familiar with network scanning so I'm not sure how to listen for it. So to follow your example, your pseudo-code will need to be more like this:

private function filewrite():void
{
//some code 1
//add listener for code to complete
}

private function onListenerResponse():void
{

//some code 2

} 
invertedSpear