Error #2148 when loading image from ByteArray (not network or file)

Hi!
When I try to access bitmap data of Image loaded from ByteArray, I receive the following error:
Error #2148: SWF file file:///C|/blablabla..../MyFlash.swf cannot access local resource file:///C|/blablabla..../MyFlash.swf/[[DYNAMIC]]/2. Only local-with-filesystem and trusted local SWF files may access local resources.
I'm on Flash, not on AIR. And ByteArray contains PNG data which I prepare myself
I tried to do it with Image.load and loader.loadBytes - the error is the same. I tried to use Flex SDK 3.4, 3.5 & 3.6 - nothing helps.
When I add this image to my stage, it is displayed absolutely OK, but I still can't access bitmapData of this image - always got the same error.
Flash Player 10
Here are the samples of my code:
          public function onLoadComplete(event:Event):void
            var loader:LoaderInfo = event.target as LoaderInfo;
            var bmp:Bitmap = loader.loader.content as Bitmap; <-- here I received the error
            var bmpDat:BitmapData = bmp.bitmapData;
            this.bitmapData.copyPixels(bmpDat,new Rectangle(0,0,width,height), new Point(0,0));
            var loader:Loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
            loader.loadBytes(byteArray);
And another try
       var image: Image = new Image()
       this.addChild(image);
       image.addEventListener(FlexEvent.UPDATE_COMPLETE, onCompleteLoad2 );
      image.load(byteArray);
      public function onCompleteLoad2 (e:flash.events.Event):void
                 var image:Image=e.target as Image;
                 var bitmapData:BitmapData;
                 bitmapData=new BitmapData(image.width,image.height,true,0);             
                 bitmapData.draw(image); <-- here I received the error, while image is correctly added to the stage and displayed
What's wrong? It seems, the image loaded from byteArray is treated as local resource. How can I overcome it inside the code? Because this .swf is
run on different computers and I can't just add a flash security exception on every of them....
Please, help I spent, maybe 20 hours and still can't find the solution

I had the same problem, except I was reading in the image from the local disk using FileReference.  Anyway, my issue was resolved by using the
-use-network=false option on the command line of my compiler (I do all my development in the shell using 'vi' to edit and mxmlc to compile).
Ttry "-use-network=false" and see if that helps...
...bob...

Similar Messages

  • Error 1 when loading data from flat file

    Hi,
    I am working on BW 3.5 when i was loading flat file it is giving error 1 when loading external data can anyone solve and mail to me this email id [email protected] .

    Hi,
    I have done correctly but even error 1 data loading from external file is coming, i just clicked on that and it came like this, Error 1 when loading external data,no invalid data like arthematics operations,But file accessing and path is correct.
    Message no. RSAR234
    Diagnosis
    Error number 1 occurred when loading external data:
    1. Error when reading the file (access rights, file name, ...)
    2. File size or number of records does not correspond to the data in the control file
    3. Error when generating the IDoc
    4. File contains invalid data (errors with an arithmetic operation or data conversion)
    Procedure
    Check whether you have the required access rights and whether the data in the control file is correct (file names, record length, number of records, ...). Correct the data in the control file if necessary and check the data file for invalid data (values of the wrong type, values in the wrong format for conversion exit,...). Check whether the file has headers that have not been specified.
    Thanks
    Sunitha

  • Security Exception when loading image from other host

    Hi,
    I have a signed webstart application, with 'all-permissions' set, which displays HTML in an JEditorPane.
    The displayed HTML code contains an image tag which wants to load the image from another host. This results in a security exception.
    I thought 'all-permissions' allows everything. Is there a workaround?
    TIA
    Chris

    signing your app and specifying <all-permissions> in the security tag of the jnlp file will grant all permissions to all code loaded by the JNLPClassLoader.
    In some cases your app or an extension it includes contains it's own classloader which dosnt extend SecureClassLoader, and so code loaded by that classloader will not be run with all-permissions when a SecurityManager is installed by Java Web Start. If this is the case you can get around this by calling:
    Systerm.setSecurityManager(null).
    To see what the specific cause in this case, you would have to post the exception thrown.
    /Andy

  • Error message when donloading images from camera....?!?!?

    I have been trying to import images from my Canon Rebel digital camera and am having some issues. I was having trouble with iPhoto which is why I purchased this great program. At first, the images were downloading fast and furious with Aperture but now I am having some of the same issues that I was having with iPhoto. It is taking forever and a day to import my RAW images and now I am getting an error message with almost all of my photos. It stalls out on them (and the red light stops flashing on my camera as if they aren't communicating) and then I get the message that there was "a problem downloading that image" and this error code: (ICA download error -609).
    This is extremely frustrating!! HELP!
    iMac   Mac OS X (10.4.6)  
    iMac   Mac OS X (10.4.6)  

    You're loading straight off the camera?
    Be sure the camera isn't shutting itself off in the middle of the transfer. It may auto-turn-off after a minute.
    I'd really suggest you use a card reader. You can get a USB2 CF reader which will be 10x faster than direct camera download for like $20. I can't fathom why anyone would use direct-from-camera in lieu of a reader, unless they were doing tethered shooting.

  • Error FAGL_SKF008 when loading data from 0FI_GL_8 infosource

    Hi,
    I am loading data into an infocube, from 0FI_GL_8 infosource.
    We have connected ECC-P with BI-D and BI-P.
    When loading data into BI-D works Ok, but when loading data into BI-P, the next error message appears:
    "No authorization for displaying statistical key figures in General Ledger"
    "FAGL_SKF  8"
    I cheked ST22 and SM21 in ECC-P and there is no error message.
    I cheked rfcuser in ECC-P and it has SAP_ALL.
    any ideas???

    Do a comparison of the Authorization Objects assigned to the account for your BI-D extractions and that for BI-P. Since the source system is the same and the authorizations are there for BI-D, it sounds as if there's gaps in the Authorization Object assignements for one or more of the Profiles assigned to the system account for BI-P.
    The other thing would be to create a test account that looks like the system account for BI-P, logon with that account, do an RSA3 extraction test and if it fails get a screenshot from tcode SU53 to see what Authorization Objects are missing to be authorized to hit that data.
    Edited by: Dennis Scoville on Jul 17, 2009 12:43 PM

  • Srollpane scrolls when loaded data from XML, not when loaded data from ASP

    Hi,
    I load into scrollpane a swf, which has a dynamicly loaded
    data. If I use the XML file, it works (the scrollbar is visible),
    but if I use a asp file, which creates xml, it doesn't work (the
    scrollbar is not visible). Any ideas?

    Hi,
    let say I have a A.swf and a B.swf. In A.swf I have a
    scrollpane in to wich the B.swf is loaded. Below is the code in
    B.swf. If I load the data from a asp file, the scrollbar in the
    scrollpane is not visible, but if I use the xml file, the scrollbar
    is visible.
    What I've meant is that I think that Flash gets the same form
    of data, no matter if I use the asp or xml, because the asp creates
    the same xml form as I use in the xml file. I hope this makes any
    sense.

  • Error Handling when excel vba code does not find the file

    Hi Below is my code:
    file1 = Dir("Q:\Budget\Historical Budgets\" & new_dept_folder & "\*.xls*")
    col = 2
    col_new = 3
    Application.DisplayAlerts = False
    While (file1 <> "")
            filename = Left$(file1, 6)
            ' Open the newly selected workbook
            Set wb = Workbooks.Open("Q:\Budget\Historical Budgets\" & new_dept_folder & "\" & file1)
            udds = filename & " - " & wb.Sheets("Budget").Range("J1").Value
            ThisWorkbook.Sheets(1).Cells(1, col).Value = udds
            For x = LBound(data_new) To UBound(data_new)
                wb.Sheets("Budget").Select
                Range(data_new(x)).Select
                Selection.Copy
                ThisWorkbook.Sheets(1).Cells(x + 5, col_new).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
            Next x
             ' Close the current workbook
            wb.Close SaveChanges:=False
            On Error GoTo Errhandler
            Set wb_old = Workbooks.Open("Q:\Budget\Historical Budgets\" & old_dept_folder & "\" & file1)  
    <--- Need Error handling on this line (i.e. if I get error here)
            For x = LBound(data) To UBound(data)
                wb_old.Sheets("Budget").Select
                Range(data(x)).Select
                Selection.Copy
                ThisWorkbook.Sheets(1).Cells(x + 5, col).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,   SkipBlanks:=False, Transpose:=False
            Next x
            Application.CutCopyMode = False
            ' Close the current workbook
            On Error Resume Next
            wb_old.Close SaveChanges:=False
    Errhandler:
            For x = LBound(data) To UBound(data)
            ThisWorkbook.Sheets(1).Cells(x + 5, col).Value = 0
            Next x
            ' Select the next file in the dir array
            file1 = Dir
            col = col + 5
            col_new = col_new + 5
    Wend
    Everytime I run the code the errhandler which I don't need. Could you please help me on this.
    Regards, Hitesh

    Hi,
    You could check whether the file is exist, then open it.
    If Dir(path)<>”” Then
    There are three On Error Statements, On Error GoTo <line>, On Error Resume Next and On Error GoTo 0.
    More information, please refer to:
    # How to Use "On Error" to Handle Errors in a Macro
    https://support.microsoft.com/en-us/kb/141571?wa=wsignin1.0
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • When capturing images from a Nikon D600, they show in Bridge, but when clicked to load into CS6,an error message says that it is the wrong type of document, even jpeg files. This is a NEW frustration.

    When capturing images from a Nikon D600, they show in Bridge, but when clicked to load into CS6,an error message says that it is the wrong type of document, evne jpeg files. This is a NEW frustration.

    Nikon raw files would open up in Adobe Camera Raw and so should jpegs.
    If you select one in Bridge and give the command "Ctrl r" (Windows), what happens?
    Also what is the version of ACR in the title bar?
    Gene
    Note: unmark your question as "answered". the green balloon next to the subject shows it as "solved".

  • Loader will load images from another server, but then we get error on Bitmap operation

    I'm developing an app that currently is using Loader to get images from another server.  This shouldn't currently work since we are still waiting for the owner of that server to put a crossdomain file in place.  However, it does work -- sort of .
    Loader can load the images fine, without an error.  But then the app has a feature in which we are making a larger duplicate of the image to display in a sidebar, we do this in this manner:
    var myBitmap:Bitmap = Bitmap(loader.content);
    and when this runs we get a Flash player security error 2122, sandbox violation.
    So while I'm hoping all this will fix itself when the crossdomain.xml file is put in place, I'm confused as to why we only get the sandbox error when we make a Bitmap from the image, and not when we initially try to retrieve the image.
    (Incidentally: is there a better way to make a "copy" of an image loaded by a Loader, and then change its width and height for simultaneous display in another part of the stage?  I don't need to change its actual dimensions -- I just need to change its display width and height.)
    Thanks!

    The sandbox allows viewing, not editing from another server without a crossdomain.
    So, when you try to load it up, it loads it, but "read-only" and gives you an error when you try to "edit" it by making a new Bitmap out of it.
    This should resolve itself once that crossdomain is in place.
    ||EDIT||
    I just realized I should clarify my statement a little more.
    When you load images from another server without a crossdomain, it allows the load for display only.  When you try to load data, it will fail.  This is because, XML data, or some other type of data is editable by default, and images are only viewable by default.  So, the image fails when you try to convert it into an editable form.

  • "****Error from PSA****" error message when loading InfoCube

    Hi all,
    I am getting the following error message when loading transaction data to an InfoCube.
    ***Error from PSA***
    This is not MD or Hierarchies (like previous messages in the forum)
    Please advise.
    Thanks,
    Miki

    Hi Miki,
    Before just loading data into the infocube. Catchup PSA table and see the data into it.
    Then u may find the solution.
    But as ronald said this shouldnot be the complete error statement.
    bye.

  • "Error occurs when loading transaction data from other model" - BW loading into BPC

    Hi Experts,
    I'm having a problem with my data loading from BW, using the standard Load InfoProvider Selections data manager package.
    If I run for a period without data it succeeds (with warning) but if there is data to be extracted I get the following error:
    Task name CONVERT:
    No 1 Round:
    Error occurs when loading transaction data from other model
    model: AIACONS. Package status: ERROR
    As it runs ok when there isn't data it appears there is something preventing the movements of data out of the cube itself, rather then a validation issue.
    Has anyone encountered similar or have any ideas as to the problem?
    Best,
    Chris

    Hi Vadim,
    It's not specific to the transformation file as I have tried with others for the same BW cube and get the same result.
    We get a warning when we try and validate the transformation file:
    "Error occurs when loading transaction data from other model".
    This only appears in the validation pop up and doesn't throw up any warnings about the transformation file itself.  The validation log says:
    Validate  and Process Transformation File Log
    Log creation time
    3/7/2014 16:09
    The result of validation of the
      conversion file
    SUCCESS
    The result of validation of the
      conversion file with the data file
    FAIL
    Validation Result
    Validation Option
    ValidateRecords = NO
    Message
    Error occurs when loading transaction data from other model
    Reject List
    I can't find any errors anywhere else.
    Best,
    Chris

  • Error occurs when loading transaction data from other model

    Hello Experts, I am trying to validate my transformation file and I can see peculiar behaviour of the transformation file. Even though the transformation file is not complete/  complete with all the mappings, i am getting the same error as above.
         I can see options, mapping and conversion sections are validating successfully and throwing the above error.
    Incomplete Transformation File
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = ,
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT= 10
    ROUNDAMOUNT=
    *MAPPING
    CUSTOMER = *NEWCOL (NO_CUST)
    Validating the transformation files
    Validating options...
    Validation of options was successful.
    Validating mappings...
    Validation of mappings was successful.
    Validating conversions...
    Validation of the conversion was successful
    Creating the transformation xml file. Please wait...
    Transformation xml file has been saved successfully.
    Begin validate transformation file with data file...
    [Start test transformation file]
    Validate has successfully completed
    ValidateRecords = YES
    Error occurs when loading transaction data from other model
    Validation with data file failed
                           I am getting the same error with complete transformation file also. Please let me know where I am doing the mistake or is it a system error?
    Thanking you
    Praveen

    Hi,
    By
    *MAPPING
    CUSTOMER = *NEWCOL (NO_CUST)
    you want CUSTOMER to receive a fixed string "NO_CUST"?
    If so use,
    *MAPPING
    CUSTOMER = *STR (NO_CUST)

  • Error occurs when loading transaction data from other cube

    Hi Gurus,
    I'm currently working on a Transformation File for loading Transactional Data from BW to BPC but a error message is displayed "Error occurs when loading transaction data from other cube". I have already checked permissions for my user, double checked my transformation file and the dimensions, made all conversion files needed and the message has not changed.
    Can anybody help me to solve this problem?!
    Thanks a lot & Best Regards,
    HH

    Hi,
    Here, the Transformation File & Conversion File. I have already tested both with another different InfoCube and they work but no for the one needed.
    *OPTIONS
    FORMAT = DELIMITED
    HEADER = YES
    DELIMITER = ,
    AMOUNTDECIMALPOINT = .
    SKIP = 0
    SKIPIF =
    VALIDATERECORDS=YES
    CREDITPOSITIVE=YES
    MAXREJECTCOUNT=
    ROUNDAMOUNT=
    *MAPPING
    Category=*NEWCOL(ACTUAL)
    P_0BASE_UOM=0BASE_UOM
    P_0BUS_AREA=0BUS_AREA
    P_0COSTCENTER=0COSTCENTER
    P_0FUNDS_CTR=*NEWCOL(null)
    P_0GL_ACCOUNT=0ACCOUNT
    P_0LOC_CURRCY=*NEWCOL(MXN)
    P_0MATL_TYPE=*NEWCOL(null)
    P_0VENDOR=0VENDOR
    P_DataSrc=*NEWCOL(UPLOAD)
    P_ZMATERIAL1=0MATERIAL
    P_ZMATERIAL2=*NEWCOL(null)
    P_ZMATL_CLASS=*NEWCOL(null)
    P_ZMATL_TESP=*NEWCOL(null)
    P_ZRATIO=*NEWCOL(KF_inpmdInt)
    Time=0CALMONTH
    SIGNEDDATA=0TOTALSTCK
    *CONVERSION
    Time=Time_conv.xls
    EXTERNAL     INTERNAL
    201101          2011.JAN
    201102          2011.FEB
    201103          2011.MAR
    201104          2011.APR
    201105          2011.MAY
    201106          2011.JUN
    201107          2011.JUL
    201108          2011.AUG
    201109          2011.SEP
    201110          2011.OCT
    201111          2011.NOV
    201112          2011.DEC
    Thank you for taking at glance to the files.
    Best Regards,
    HH

  • The table with Name of 'Table Name' does not exist.An error occurred when loading the Model.

    The table with Name of 'Table Name' does not exist.An error occurred when loading the Model.
    We get this error when we try to check the properties of an analysis server using SQL Server Management studio(right click the instance name
    and check properties). We have resolved this issue twice by Stopping the SQL Server analysis service,removing db folders from Analysis Server Data folder and starting the services back on. The db folder that we removed was advised by the BI team.
    The SQL Server Analysis Server is 2012 SP1

    Hi RB_ORIPW,
    The table with name of 'XXX' doesn't exist.
    An error occurred when loading the model(Micorsoft.AnalysisServices)
    If I understanding correctly, you encounter the error randomly, now what you want it that avoid this issue completely, other than stop the services, detele the db filder and restart the services, right?
    The error might be caused by that the data file is corrupted. However, we cannot give you the exact reason that cause this issue. You can troubleshoot this issue by using the Windows Event logs and msmdsrv.log.
    You can access Windows Event logs via "Administrative Tools" --> "Event Viewer".  SSAS error messages will appear in the application log.
    The msmdsrv.log file for the SSAS instance that can be found in \log folder of the instance. (C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Log)
    Here is a blog about data collection for troubleshooting Analysis Services issues, please see:
    Data collection for troubleshooting Analysis Services issues
    Besides, here is fix that describe the similar issue, and it was fixed in Cumulative Update 7 for SQL Server 2012 SP1, please refer to the link below to see the details.
    http://support.microsoft.com/kb/2897263/en-us
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Firefox does not open at all - error message when loading firefox 'The instruction "0x0000000" referenced memory at "0x0000000". The memory could not be "written". Click on OK to terminate the program in English

    I cannot open firefox at all. I have removed and re-installed but it has made no differenct. I just get an error message when loading firefox - as follows - 'The instruction "0x0000000" referenced memory at "0x0000000". The memory could not be "written". Click on OK to terminate the program.
    Can anyone help me sort this out? If I log in as someone else Firefox works?
    == This happened ==
    Every time Firefox opened
    == the computer shut down unexpectedly ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    You can o a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

Maybe you are looking for