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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:15:26+00:00 2026-05-22T16:15:26+00:00

I have a flash (AS2.0) application with a function that i need to trigger

  • 0

I have a flash (AS2.0) application with a function that i need to trigger from a html form link
The flash function only runs a gotoAndPlay(‘label name’);
So my HTML is
<a href="" id="flashTrigger" />

and my flash function is

  
function myFunction(){
  gotoAndPlay("myLabel");
}

Anyone know either how I can fire the flash function from the html link tag, OR run a “gotoAndPlay” from a Javascript function

Iv looked around and only seem to find how to fire a javascript function from flash

Here is the code I have so far – Im prob doing something stupid
Flash:

ExternalInterface.addCallback( "myExternalMethod", this, myFunction );

function myFunction(){
gotoAndPlay("fade");
}

Javascript

function executeFlash()
{
  getObjectById("myFlashID").myExternalMethod(); 
}

function getObjectById(objectIdStr) {
        var r = null;
        var o = document.getElementById(objectIdStr);
        if (o && o.nodeName == "OBJECT") {
            if (typeof o.SetVariable != undefined) {
                r = o;
            }
            else {
                var n = o.getElementsByTagName(OBJECT)[0];
                if (n) {
                    r = n;
                }
            }
        }
        return r;
    }

$(function() {

    $('#WhatDoesmean').click(function(){
        executeFlash();
    });

});

I have set myFlashID to the id of:
initial ‘Object tag’
and IE only ’embed tag’

EDIT:
At the moment I am targeting the flash object fine, it’s the external (flash side) function which is not working
– error message, myExternalMethod is not a function

  • 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-22T16:15:27+00:00Added an answer on May 22, 2026 at 4:15 pm

    I have managed to crack the problem by using SWFObject

    Accessign the flash objects method was easy through SWFObject.js, however it just wasnt working without it. Not sure why though.

    All the above suggestions work with SWFObject.js, but none seemed to work without it

    Cheers for everyones suggestions

    Andy

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

Sidebar

Related Questions

I have a Flash application that is hosted from within a Drupal page. Some
I have a Flash AS2 application that is made up of many SWF files.
I have a Flash program that loads AS2 and AS3 SWF files dynamically with
I have a large codebase that targetted Flash 7, with a lot of AS2
I have a flash movie that loads images dynamically from an xml file. I
I have a flash movie that runs fine in FF, Opera, Safari but not
I have a flash player that loads in some additional features from flash files
I have flash (AIR) application running on a single controlled system (there is only
I have completed a simple contact form using Flash CS5 and AS2. Instead of
i need to disable automatic url encoding in flash as2 because i have URL

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.