Here I am placing the syntax and example
for further details:
If this post answers your question of helps. Please mark it as such
Have you tried it.
Indeed, I have tried it, but it doesn't works. If I write some codes in the flash and use the frame lable, it works. But when I use the same code in flex, it doesn't work.
Recently I found that the code in embeded .swf files can not be used in flex project, if the .swf is loaded dynamicly (by Loader and URLRequest), then the code can be used. And if we compile the resource into swc file, and use the swc file as a lib, the code is still can be used.
After a lot of try, I resolve the problem by my self