Action script not working

I have made an animation with as 3.0. When I use the In program viewer the frames repeat like they are supposed to. Works just the way I want. When I export the file to a swf it plays through the frames without seeing the action script. IE and my flash playing program both wont use the actionscript. Is there something I dont know?