Disable the error message box while loading an external movie with actionscript 3 - actionscript-3

I have a compiled swf file and a I can't edit it, but the movie is working fine (but gives an error message with a message box).
I am using it from an other movie (load with as3 code).
When the loader movie loads it the error message box appears.
I wonder is it possible to disable the errors while loading a movie with as3.
Here is the error in the message box:
"TypeError: Error #1009: Cannot access a property or method of a null object reference.
at motionsound11_fla::_all_29/motionsound11_fla::frame249()"
Yes. Here is the error message (editted my first post):
"TypeError: Error #1009: Cannot access a property or method of a null object reference.
at motionsound11_fla::_all_29/motionsound11_fla::frame249()"
And I don't want to decompile my movie. It becomes more complex when decompiled. Yes, for understanding the problem I did. But my first problem is disable the error message box.
Thanks so much.
Yes, You are right.
There is no error in a browser (with flash player plugin).
My project wont be in a browser. It will be an executable file (.exe) or .swf . So people who have "Adobe Flash CS3" on their computers will see the error in swf format file.
(i will add this information to my question : " The loader wont be on a web page. It will be used as .swf file or executable file" )
And your answer is acceptable. I will publish as html page not .exe or .swf. This will be more secure,dynamic and has no platform dependence.
Thanks.

I might be wrong here, but I'm not sure the release version of Flash player plugin would produce an error like that - are you running this in the debug plugin? What you could do is test on a box you know has never been used for development - it's possible the error simply won't appear when you deploy your application.
That said, any Flash developers who use your app might still see it!

Related

How to load swf created with flipbook maker into flash

I'm trying to load the swf created by 'flip book maker' into my project.
the files created by flipbook maker are
book.swf
framework.swf
I used the following code
var myLoader:Loader = new Loader();
var url:URLRequest = new URLRequest("book.swf");
myLoader.load(url);
addChild(myLoader);``
the framework.swf is linked with book.swf, so it cannot run alone.
When I run the movie it shows the Error #2032, Stream error to framework.swf
book.swf and framework.swf both are in the same directory.They are generated by flip book maker What I needed is to load the book.swf into my project at a particular frame. I need help in AS3 for this purpose.
How to fix it..?
please help me..!
Error #2032 means that your Flash application could not load the framework.swf for some reason (you know this already of course). What you need to find out is why. Possible reasons are: you have the wrong URL, the framework.swf is not in the place you expect, there are crossdomain restrictions on the file you are trying to access ( you did not state where frameworks.swf).
What I would suggest doing is using a web debugging proxy tool like Fiddler (http://www.telerik.com/fiddler) or Firebug (is a Firefox extension) and take a look at the http requests to get more information on your error. You may find out that frameworks.swf is not in the location you expect.
This is just a IOError event triggered by Adobe Flash. Most likely the file just isn't found. Check your path and make sure you place the .swf file in your bin-debug directory if you're doing this from within Adobe Flash Builder

swf file terminates automatically after publishing

I create app using flash cs 5.5. It works fine. Then I started using flash cs6. The app was running fine until today. It runs fine but the problem is when i tried to publish it, it start playing but after some time(about 30 secs), swf file terminates itself. There is no problem in using cs5.5. It's just when i tried to publish it, it runs and swf file is close itself. Do any one have any idea what might be the problem ?
When you say "the swf file terminates itself", are you talking about the standalone flash player? Normally if this happens, it's because an error was thrown, but if you're not using the debug player, you won't see it, it'll just close.
Download the debugger player here: http://www.adobe.com/support/flashplayer/downloads.html and run your swf in debug mode (so all the debug symbols are present and you get the most complete error message). This should give you an idea of what the error is, and where to go to fix it.
NOTE: to know if you're running in the debug player or not, right-click on the swf in the player, and if you see an option for "Show redraw regions", then it's the debug player

Issue loading external swf on main file with as3

Hi I'm new to Flash CS6 and and AS3 and I have been stuck on this iPad/Android restaurant menu I have been doing. I amm trying to load an external swf on my main swf but have been getting this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at cuisine/init()[C:\Users\PAO\Desktop\OZ\SWIPE\cuisine.as:32]
at cuisine()[C:\Users\PAO\Desktop\OZ\SWIPE\cuisine.as:22]
I got the code of the swipes from a tutorial I found online. in the different sections fo the menu I was planning to load different swfs because I couldn't get the code to work for all the sections at the same time.
like I said, I am new to as3 and I really don't understand all the coding so i'm really stuck at a dead end.
hoping a kind soul could help me get out of this rut. the files can be found here
It can be a bit unintuitive to load external SWFs, especially if you are new to AS3. If I remember correctly, a big problem can be that you need to wait for the ENTIRE swf to load before trying to access anything.
You should only try to access code from the external swf after the Event.COMPLETE event. see here for more info
I would also suggest use the Greensock loader instead since it's a bit simpler.
Hope that helps

Facebook ActionScript 3 API not working in FlashDevelop

I am writing a little test program, and I have a problem regarding the ActionScript 3 Facebook API (Graph_API_Web_1_8_1.swc).
I am using FlashDevelop, and I correctly added the SWC file to the "lib" folder.
I also imported the Facebook API correctly in my class file (the auto-finish function of FD recognizes all code from there).
BUT, once I start compiling my code, I get the following error:
Error: Access of undefined property Facebook
for each line of code, that includes a Facebook call (such as Facebook.init(...), Facebook.login(...) and Facebook.logout(...)).
I added a screenshot of my FlashDevelop setup to clarify things:
This is even more mysterious to me, since the AIR application with the FacebookDesktop API is running without any errors.
How do I fix this problem?
This has happened to me several times. Don't waste your time looking into which ActionScript 3 SDK SWC version or Flex SDK you are using. It's just a weird bug. Instead, do the following.
Close FlashDevelop
Create a completely new project
Add the Facebook SWC to library
Then it should work. If not, reboot. It happened to me several times. I hope this helps.

Preventing error from being thrown in child swf

I want to load user submitted swf files into a parent Flex application. I'll be loading the swf from a different sandbox and i will deliberately not be granting security access.
Often flash applications will have functions that try to access the stage, and in this case the child swf would throw an error because it would not have access.
I want to prevent such errors in the child swfs from causing actionscript debug error windows to pop up. Does anyone know if this is possible, with code in my parent app?
Flash Player 10.1 can do this!
http://blogs.adobe.com/cantrell/archives/2009/10/global_error_handling_in_air_20.html