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 6033537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:29:50+00:00 2026-05-23T05:29:50+00:00

I would highly appreciate any help in getting this issue resolved. I have been

  • 0

I would highly appreciate any help in getting this issue resolved. I have been at it for two days now and have not been able to resolve this issue. I am trying to call an AS3 function from JavaScript via ExternalInterface API which is simply not working at all. If I to call a JavaScript function form html loaded swf, it works beautifully.

I am following this tutorial:
http://www.viget.com/inspire/bi-directional-actionscript-javascript-communication/

I am using swfobject to load the swf into a div.

JavaScript code:

<script type="text/javascript">
swfobject.embedSWF("testRun.swf", "myContent", "550", "400", "9.0.0");

function getFlashMovie(movieName) 
{
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    return (isIE) ? window[movieName] : document[movieName];
}

function callFlash(flash) 
{
    //alert(flash);
    getFlashMovie(flash).sendToFlash();         
}   
</script>

AS3 Code:

import flash.external.*;
import flash.events.*;
import flash.text.*;

JAVASCRIPT WILL CALL SENDTOFLASH WHICH THEN INVOKES THE INIT FUNCTION

ExternalInterface.addCallback("sendToFlash", init);

function init():void
{
var txt:TextField = txtField();
txt.appendText("LOOK AT ME!!!");
addChild(txt);
}

function txtField():TextField
{
var txt:TextField = new TextField();
txt.x = 25;
txt.y = 25;
txt.width = 200;
txt.height = 150;
txt.border = true;
txt.text = "INIT ";
return txt;
}
  • 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-23T05:29:51+00:00Added an answer on May 23, 2026 at 5:29 am

    After hours and hours, I have managed to resolved the issue. There was nothing wrong with my code, the culprit was flash player security settings on my local machine. Instead of just adding the swf to my trusted sites with the flash play settings, I included the entire folder, and now it works like a charm.

    This is how I changed the settings:

    You can go about two ways of changing the settings:
    1. when you open the html file, flash player global security box pops open
    2. Open the html file, right click and select the ‘Global Settings…’ option from your context menu.

    Once the setting panel is open, you will see four tabs:

    Storage | Camer and Mic | Playback | Advanced

    Go to ‘Advanced’ tab
    Click on “Trusted Local Settings…”
    Click on “Add…”
    Click on “Add Folder…”
    Locate the folder where you files such as the html and swf are.
    Click on “Confirm”
    Click on “Close”

    And then close the Flash Player Global Settings panel

    Now open your html file, if it is already opened then refresh your browser. It all should work now

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

Sidebar

Related Questions

I have hit a road block on this and would highly appreciate if someone
I am semi-frustrated with this Yii CGridView problem and any help or guidance would
What, in your opinion (although I would highly appreciate articles / books on related
I am new to Sharepoint therefore don't know much - any help would be
I don't know if a solution exists but it would be highly desirable. I'm
Would it not make sense to support a set of languages (Java, Python, Ruby,
Would the following SQL remove also the index - or does it have to
I have a listview in which I am getting values from base adapter.what I
I have been working Quartz framework in my grails project with lib called quartz-all-1.7.3.
I have this line of code I use for SEO purposes. The only thing

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.