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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:06:15+00:00 2026-06-11T12:06:15+00:00

As I understand, ActionScript is used mostly to control graphical output on Flash websites:

  • 0

As I understand, ActionScript is used mostly to control graphical output on Flash websites: such as Flash based games.

However, I would like ActionScript to perform tasks not related to graphical output. Tasks, which for browser compatibility reasons, are more suitable for ActionScript: such as file upload.

Is it therefore possible to use ActionScript instead of JavaScript or to accomplish tasks that are not possible with JavaScript, such as file upload?

Are the following possible?

  • Run ActionScript on HTML Button Press?
  • Send information to ActionScript from HTML/JavaScript?
  • Process information without any graphical output in ActionScript?
  • Ouptut information from ActionScript to HTML/JavasScript?

I wish to know, if ActionScript can do what I wish.

I will have a picture of the right functions to call.

  • 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-11T12:06:16+00:00Added an answer on June 11, 2026 at 12:06 pm

    ExternalInterface is your friend:
    http://help.adobe.com/nl_NL/Flash/CS5/AS3LR/flash/external/ExternalInterface.html

    Some tips when using ExternalInterface:

    • set allowScriptAccess to “always” in the html embed code
    • make sure the flash has an id in your html code

    Some simple examples:

    1. Grab a value from javascript to flash

    // actionscript 3 code
    if (ExternalInterface.available)
    {
      var url:String = ExternalInterface.call("document.location");
    
      // output to textfield
      var t:TextField = new TextField();
      addChild(t);
      t.text = url;
    }
    

    2. Call a function with parameters from flash

    // actionscript 3 code 
    if (ExternalInterface.available)
    {
       var result:String = "Flash rocks"
       ExternalInterface.call("alert", result);
    }
    

    3. Call from javascript a function with parameters to Flash:

    // javascript
    window.onLoad = function()
    {
       document.getElementById('flashId').doSomething("javascript rocks");
    }
    

    .. and

    // actionscript 3
    
    if (ExternalInterface.available)
    {
       ExternalInterface.addCallback("doSomething", handleSomethingFromJavascript);// links js function to as3 function
       function handleSomethingFromJavascript(value:String):void
       {
          // output to textfield
          var t:TextField = new TextField();
          addChild(t);
          t.text = value;
       }
    }
    

    You can do lots of stuff between flash and javascript, as you can see the intergration is almost painless! The only note is that within flash ExternalInterface is not available, so you have to test in browser. You can make a transparent Flash object using wmode="transparent". You cannot use display:none or visibility (css) because then the flash isnt executed or acts slower. To make sure it keeps running, place it position:fixed (css) on the page in a corner or something. Browsers make flash object run in a sort of sleep mode (slower) when out of screen or when inactive (ie in an inactive tab)

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

Sidebar

Related Questions

Please understand: I am a total beginner at Actionscript and anything like Actionscript, and
I'm trying to get an actionscript code used in a Flash CS5 example and
I would like to do some Flash development on my MacBook, utilizing the Flex
I would like to locally save an XML file with ActionScript, as a temp
I would like to bind a variable from my ActionScript to a property of
in an attempt to see and hopefully understand actionscript's garbage collector, i've set up
I have been trying to understand the way ActionScript's events are implemented, but I'm
I understand I can create an enum like this: public enum MyEnum { ONE(1),
I understand what weak tables are. But I'd like to know where weak tables
I understand the way Mealy state machines work - the output logic is now

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.