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

  • Home
  • SEARCH
  • 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 8012843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:27:30+00:00 2026-06-04T19:27:30+00:00

This is the AS3 part: import flash.net.FileReference; import flash.events.Event; import flash.external.ExternalInterface; import flash.system.Security; Security.allowDomain(

  • 0

This is the AS3 part:

import flash.net.FileReference;
import flash.events.Event;
import flash.external.ExternalInterface;
import flash.system.Security;

Security.allowDomain( "*" );

// file reference:
var file:FileReference = new FileReference();
ExternalInterface.addCallback( "bFile" , choose );

function choose():void{
    ExternalInterface.call( "alert( 'browse' )" );
    file.browse();
}

HTML part:

<object width="1px" height="1px">
<param name="movie" value="./ftest/uploader.swf">
<embed width="1px" height="1px" allowscriptaccess="always" id="uploader" src="./ftest/uploader.swf">
</object>

JS part:

$( "#uploader" )[ 0 ].bFile();

UPDATE: – [ The action called via clicking on a button ]

$( "#uploader" )[ 0 ] returns the object (just as if I used getElementById).

When triggered, alert is thrown with “broswe” in it, therefore, I know choose() is called.

But it gets no further.

I get these lines in every browser’s console: Uncaught Error: Error calling method on NPObject.

Could you help me figure out what is wrong here?

  • 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-06-04T19:27:33+00:00Added an answer on June 4, 2026 at 7:27 pm

    Believe your problem is security related, the browse method must be called in direct response to a user interaction (KeyboardEvent or MouseEvent). Read the specific detailed section in the docs about this:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference.html#browse()

    The part from the docs I’m referencing:

    In Flash Player 10 and Flash Player 9 Update 5, you can only call this method successfully in response to a user event (for example, in an event handler for a mouse click or keypress event). Otherwise, calling this method results in Flash Player throwing an Error exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is part of an XML file I retrieve using AS3 E4X: <links> <link>
How to pass information in this flow: Flash(AS3) -> PHP, using XML -> Database(mysql)
This is for a game in a flash AS3 only project. the player controls
I am new to Flash and AS3. I have a DataGrid like this Item
I'm a Flash(AS3) newbie and this is just a little experiment of mine. I'm
We have a Flash app (AS3). This is a desktop application that runs in
I'm kinda new in flash and as3 so this may not be as difficult
My AS3 Flash loads some file that is a JSON with some special characters
I'm having a little confusion when distinguishing this in an as3 file lets say
Hey guys I'm not sure how to write this in AS3, but basically I

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.