Problem solved.
These two links helped a lot to solve my problem:
http://www.spikything.com/blog/index...s-in-pure-as3/
http://blog.creonfx.com/adobe-flex/e...script-project