header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Poornima
Points:0
Posts:0

12/1/2010 1:35:28 AM

Title: Error ....... give solution ASAP


I used the custom preloader class of this example...........................

but getting following error... Please give me solution ASAP

SecurityError: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.
at flash.display::Loader/_loadBytes()
at flash.display::Loader/loadBytes()
at preload::CustomPreloader()[C:\Adobe Flash Builder 4 Plug-in\LawPadPDA\src\preload\CustomPreloader.as:49]
at mx.preloaders::Preloader/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:253]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1925]
at mx.managers::SystemManager/initHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2419]



1
Poornima
Points: 0
Posts:0
12/1/2010 1:56:01 AM



I am using Flex4 and receiving the above mentioned action script error.............................

And also how to make rectangle width and height increased so that it fits my entire application.......
i tried changing the below

bgSprite.graphics.drawRect(0,0,200,200)

TO

bgSprite.graphics.drawRect(0,0,1024,600)...but does not work ...
is that i have to chage swf file width and height??

Please provide me with solution ASAP

Thanks and Regards

2
Brad
Points: 750
Posts:0
12/1/2010 2:37:22 AM



you can set the loader context to true like this

myldr = new Loader();
var ldrC : LoaderContext = new LoaderContext(false,new ApplicationDomain(ApplicationDomain.currentDomain));
myldr.load(new URLRequest("mySwf.swf"), ldrC);


3
Poornima
Points: 0
Posts:0
12/1/2010 3:02:58 AM



Hi Brad,

Thanks for the quick reply..............

i will try it out & get back to u............

And also how to make rectangle width and height increased so that it fits my entire application.......

i tried changing the below

bgSprite.graphics.drawRect(0,0,200,200)

TO

bgSprite.graphics.drawRect(0,0,1024,600)...but does not work ...
is that i have to chage swf file width and height??

Please provide me with solution ASAP

Thanks and Regards

4
Poornima
Points: 0
Posts:0
12/1/2010 3:10:22 AM



Sorry when i tried the above solution............
i came across other error
Plz provide me solution ASAP

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at spark.components::WindowedApplication/enterFrameHandler()[E:\dev\4.0.0\frameworks\projects\airspark\src\spark\components\WindowedApplication.as:2350]


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 6+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions