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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:51:49+00:00 2026-05-17T19:51:49+00:00

I have a SWF file emedded withing a HTML page. Trying to do a

  • 0

I have a SWF file emedded withing a HTML page. Trying to do a simple operation – go to and play certain frame in SWF using javascript. I’m using ExternalInterface to do this but for the life of me can’t get the two to communicate.

I add all the code but when clicking on the link which calls javascript, it says my flash object is undefined?

Here’s the ActionScript code:

import flash.external.*;

function getFromJavaScript(frame:int):void 
{
 gotoAndPlay(frame);
}

ExternalInterface.addCallback("sendtoFlash",getFromJavaScript);

Here’s the javascript:

function getFlashMovieObject(movieName){
if (window.document[movieName]){
    return window.document[movieName];
}
if (navigator.appName.indexOf("Microsoft Internet")==-1){
    if (document.embeds && document.embeds[movieName])
        return document.embeds[movieName];
}
else{
    return document.getElementById(movieName);
}
}

function sendtoSwf(numb)
{
  var flashMovie = getFlashMovieObject("tour-flash");
  flashMovie.sendToFlash(numb);
}

And here is the embedded SWF:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="335" id="tourFlash" align="middle">
<param name="movie" value="/media/Assets/Flash/tourFlash.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="/media/Assets/Flash/tourFlash.swf" width="600" height="335">
  <param name="movie" value="/media/Assets/Flash/tourFlash.swf" />
  <param name="quality" value="high" />
  <param name="bgcolor" value="#ffffff" />
  <param name="play" value="true" />
  <param name="loop" value="true" />
  <param name="wmode" value="window" />
  <param name="scale" value="showall" />
  <param name="menu" value="true" />
  <param name="devicefont" value="false" />
  <param name="salign" value="" />
  <param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
  <a href="http://www.adobe.com/go/getflash">
 <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
  </a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

Any ideas? I’m totally stumped! For an example of problem, have a look here: http://www.onehealthfitness.com.au/get-started/virtual-tour.aspx

Thanks 🙂

  • 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-17T19:51:49+00:00Added an answer on May 17, 2026 at 7:51 pm

    Seems like you are using the wrong value in the getFlashMovieObject(“tour-flash”) call, there is no object named “tour-flash” in your code, is there?

    Besides that, I would recommend that you add a mute button, so a visitor can turn of the sound. I tend to leave pages that plays sound I can’t stop.

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

Sidebar

Related Questions

I have a swf file that's embedded in a html page, and I have
I am having a problem with SWF File. I have a SWF File on
I have a compiled swf file and a I can't edit it , but
Alright, currently I have my SWF hitting a php file that will go and
I have swf file with embedded movie encoded with ScreenVideo codec, swf spec says
Scenario: You have a SWF file with a built-in click event that takes you
I have a swf with loads text into a Sprite that resizes based on
I have a swf that is run from C:/ in the browser instead of
I have a SWF Video player on my webpage. I want to draw a
I have a Flex swf hosted at http://www.a.com/a.swf . I have a flash code

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.