Sound Object is Controlling FLV

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

I have an instance of FLVplayback component in a movieclip located on the stage (root)with the contentpath to load an flv. Autoplay is set to true so the flv will start playing as soon as it is buffered. I set the volume to 0 because I want to load a different mp3 to my flash movie other than the background music of the flv.

I've created a sound object and two movieclips that start and stop the sound.

The problem is when I click on the stop_btn it stops the new mp3 but it also stops/pauses the video.

Code: [ Select ]

mySound = new Sound();
mySound.attachSound('theSound');
mySound.start(0, 99);
play_btn._alpha = 50;
mySound.onSoundComplete = function() {
    this.start();
};
stop_btn.onRelease = function() {
    mySound.stop();
    play_btn.enabled = true;
    play_btn._alpha = 100;
    this.enabled = false;
    this._alpha = 50;
};
play_btn.onRelease = function() {
    mySound.start();
    stop_btn.enabled = true;
    stop_btn._alpha = 100;
    this.enabled = false;
    this._alpha = 50;
};
  1. mySound = new Sound();
  2. mySound.attachSound('theSound');
  3. mySound.start(0, 99);
  4. play_btn._alpha = 50;
  5. mySound.onSoundComplete = function() {
  6.     this.start();
  7. };
  8. stop_btn.onRelease = function() {
  9.     mySound.stop();
  10.     play_btn.enabled = true;
  11.     play_btn._alpha = 100;
  12.     this.enabled = false;
  13.     this._alpha = 50;
  14. };
  15. play_btn.onRelease = function() {
  16.     mySound.start();
  17.     stop_btn.enabled = true;
  18.     stop_btn._alpha = 100;
  19.     this.enabled = false;
  20.     this._alpha = 50;
  21. };


What am I doing wrong?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

Seems that if I create a movieclip using createemptymovieclip and then use the instance name in

mySound = new Sound(mc);


Funny thing is that this code is already inside it's own movieclip completely separate from the movieclip that holds the FLVplayback component.

This fixed it.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

thanks for the update. I looked at your problem but had no clue what could be causing it. Sorry no one posted to help you but nice to see you discovered the problem and fixed it. You have no idea how helpful it can be when people find solutions to the problems they ask about and take the time to post the solution. You'd be surprised how many will read this later and be grateful
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

Good, there wasn't much on my searches to help this problem.

This one was strange because I already made a separate movieclip from the one that contained the FLVplayback, so even though the actionscript was on different levels the sound object still controlled the flv, but dymanically creating an empty movieclip and then referencing it in new Sound(mc) did the trick.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 18 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.