Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5947905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:01:53+00:00 2026-05-22T17:01:53+00:00

I have a HTML box and load a local html file from the project.

  • 0

I have a HTML box and load a local html file from the project.
In this HTML file I use jquery and I want to load an image from my user directory.
I see the image from my user directory but jquery doesn’t works.
I get this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at crop/onLoaded()[/Flex Bundle/workspace/crop/src/crop.mxml:119]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.html::HTMLLoader/onCompleteTimer()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()

But if I load an image from the app workspace, everything works fine (I see the image and Jquery works).

Is this a policy problem? The error says that is a “null object reference” problem, but this can’t be true…

Any ideas?

Damian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:01:54+00:00Added an answer on May 22, 2026 at 5:01 pm

    My Solution for copying a file from the application directory to a self defined directory:

    Vars:

    private var fileName:String = 'config.xml';
    private var workingDirectory:String = 'MyNewAppDir';
    
    1. Short and simple:
    var f:File = File.applicationDirectory.resolvePath(this.fileName );
    f.copyTo( File.documentsDirectory.resolvePath(this.workingDirectory+"/"+this.fileName));
    

    OR 2. Long and complicated:

    /**
     * read content
     */
    var file:File = File.applicationDirectory.resolvePath( this.fileName );
    var read:FileStream = new FileStream();
    read.open(file, FileMode.READ);
    var content:String = read.readMultiByte( read.bytesAvailable, "utf-8") ;
    read.close();
    
    /**
     * save content
     */
    var write:FileStream = new FileStream();
    write.open( File.documentsDirectory.resolvePath( this.workingDirectory + "/" + this.fileName ), FileMode.WRITE );
    write.writeMultiByte( content, "utf-8" );
    write.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The light box pops up, but doesn't load the image. I have hacked this
I have a html form which have a select list box from which you
I have this html page which is very simple, it contains a text box
I have a box built via html borders. I want to connect the bottom
I have the following multi-select box in a HTML form, where user can select
I have a form in a .html files where input/select box looks like this
I have a page that I load a select dropdown box but I want
So I have a light box that's dynamically loaded from a common.js file. (Legacy
I'm using the overlay jquery from here: http://flowplayer.org/tools/overlay/index.html Within my overlay I have a
To add box-shadow to a HTML element, I currently have to do this: box-shadow:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.