Skip to main content
July 14, 2010
Question

Fire Custom Event in as3

  • July 14, 2010
  • 1 reply
  • 1832 views

Hello All,

I have an variable of type boolean , and I want to fire event when I change the value of this variable , how can I do that in AS3

Thanks in Advance

This topic has been closed for replies.

1 reply

Inspiring
July 14, 2010

Hi

//*************************//

import flash.events.Event;

var _boo:Boolean = false;

public function set SetBoolean(pVar):void

{

     _boo = pVar;

     this.dispatchEvent(new Event("Event Type"));

}

//*************************//

May be it helps...

Thanks

Bala.S

July 14, 2010

Thank you for your help

I have tried this solution but it doesn't work with me

may be I have so explain my proplem in more details

I have two XML files , the first file has some configration options I want to load for my Project , and I want to make sure that I have load them before loading the second file that will have the data

I have define the loader and handle the onComplete event and parse the first file and make some operations and when I call the function that will load the second file after the last operation of the handler of the first file it load it more than once

and If I call it after the calleng of the first file haldler it call it once but it doesn't execute the operations

Thanks in Advance

July 14, 2010

I have solved my proplem

It was my fault , I was declare only one private url loader in my class and use it to load the two files

when i make it a local variable inside the function it works

Thanks and Sorry for disturbance