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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:18:39+00:00 2026-05-18T20:18:39+00:00

How do you add an eventlistener to an flash embed? ( new dojox.embed.Flash )

  • 0

How do you add an eventlistener to an flash embed? (new dojox.embed.Flash) I’ve tried dojo.connect and addEventListener but neither work

Snippets:

this.player = new dojox.embed.Flash({
 path: 'http://player.soundcloud.com/player.swf?url='+track.stream_url+'&enable_api=true&player_type=engine&object_id='+this.playerId,
 width: 5,
 height: 5,
 id: this.playerId,
 name: this.playerId,
 minimumVersion: 9,
 allowScriptAccess: 'always'
}, dojo.byId('soundcloud_flash'));

None of these work:

dojo.connect(this.player.movie, 'onMediaBuffering', function(id, data) { console.log('dfg'); obj.progress(data.percent); });
dojo.connect(this.player.movie, 'onMediaBuffering', dojo.hitch(this, function(id, data){ console.log('ergh'); this.progress(data.percent);}));
dojo.connect(dojo.query(this.player.movie)[0], 'onMediaBuffering', function(id, data) { console.log('yu'); obj.progress(data.percent); });
dojo.connect(dojo.query(this.player.movie)[0], 'onMediaBuffering', dojo.hitch(this, function(id, data){ console.log('er'); this.progress(data.percent);}));
dojo.connect(this.player, 'onMediaBuffering', dojo.hitch(this, function(id, data){ console.log('ubg'); this.progress(data.percent);}));
dojo.connect(dojo.byId(this.player), 'onMediaBuffering', dojo.hitch(this, function(id, data){ console.log('asd'); this.progress(data.percent);}));
dojo.connect(dojo.query(this.player), 'onMediaBuffering', dojo.hitch(this, function(id, data){ console.log('asd'); this.progress(data.percent);}));
dojo.connect(dojo.query(this.player), 'onMediaBuffering', function(id, data){ console.log('hj'); this.progress(data.percent);});

This event is coming from Sound Cloud payer: https://github.com/soundcloud/Widget-JS-API/wiki

  • 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-18T20:18:39+00:00Added an answer on May 18, 2026 at 8:18 pm

    dojox.embed.Flash is a simple mechanism to embed Flash movies, and it also has a proxy method to make it easier to invoke ActionScript methods from the JS object via ExternalInterface. I don’t think it enables 2-way communication or supports events, but you might be able to achieve that using Flash APIs or doing an invoke to set up your own callbacks.

    dojo.connect is only good for connecting between JavaScript functions and is not mirrored to ActionScript methods. Note that onReady and onLoad Javascript events are available on the player object and you can connect to those.

    Edit: looking closer at this library, I guess onMediaBuffer is a Javascript method called by the Flash movie, but it’s set up to work on a global Javascript variable called soundplayer! To make matters worse, they set up one-offs for a few toolkit eventing systems, duplicating the pattern.

    You might try something like this:

    dojo.connect(window.soundplayer, "onMediaBuffer", function(flashId, data){ ... });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do you add an eventlistener to an flash embed? ( new dojox.embed.Flash )
My Flash Code var myLoader:URLLoader = new URLLoader; var xmlData = new XML(); myLoader.addEventListener(Event.COMPLETE,
I'm new to Spring Security. How do I add an event listener which will
I am trying to embed a movieClip with flashDevelop but apparently its not working
i'm trying to embed a swf to my as3 flex project like this: [Embed(source
Please forgive any short-comings in this question; flash is not my area of expertise,
How to add a click event listener to my custom control made with wxWidgets?
The situation is somewhat like- var someVar = some_other_function(); someObj.addEventListener(click, function(){ some_function(someVar); }, false);
Add service reference to Amazon service fails, saying Could not load file or assembly
Quick add on requirement in our project. A field in our DB to hold

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.