Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Playing A Random Embedded Sound



I'd like to play a random embedded MP3, but my efforts so far have been unsuccessful:


Code:
//embed sounds
[Embed(source="assets/sound/1.mp3")]
private static var sfxLibrary1:Class;

[Embed(source="assets/sound/2.mp3")]
private static var sfxLibrary2:Class;

[Embed(source="assets/sound/3.mp3")]
private static var sfxLibrary3:Class;

// other sounds embedded here...

// ---- code removed for brevity ------ //

//create and play a random sound effect
var sfxNo:Number = Math.floor( Math.random( ) * 3 ) + 1;
var ClassReference:Class = getDefinitionByName("sfxLibrary"+String(sfxNo)) as Class;
var sfx:Sound = Sound(new ClassReference());
sfx.play();
When debugging, the thread is suspended with "ReferenceError:Error #1065: Variable sfxLibrary3 is not defined"

Can anyone see where I'm going wrong, or think of a better way of doing it?



KirupaForum > Flash > ActionScript 3.0
Posted on: 05-28-2007, 04:46 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Playing A Embedded Sound In An External .swf
Is there a way to play a sound that has been embedded in an externally loaded .swf from the main .swf (the .swf that loaded it)?

Playing the embeded sound from within the same .swf is easy but how is it possible from the main .swf?

Code:
var drum:DrumSound = new DrumSound();
var channel:SoundChannel = drum.play();

Playing An Embedded Sound, Won't Play
I’m trying to create a simple sound effect SWF, but I can’t get the audio to play. I have the MP3 embedded in my Flash file that's about 1 second long. The complete handler fires after bout 1 second, so it's like it is playing, but i can't hear it. Yes, my speakers are on and I can play the sound from the Library panel and hear it. Can anyone see problems with this code? It seems so simple, but I can’t get it to work. I’m sure it’s something stupid.

Code:

import flash.media.*;

var INITD                                             :Boolean = false;
var SOUNDENABLED       :Boolean = false;
var SFXVOLUME                               :int = 1;
var isPlaying                       :Boolean = false;

function initialize(e:Boolean):void {
                if(INITD) return;
                trace("resource > audio sfx init'd, en? "+e);
                INITD = true;
                SOUNDENABLED = e;
}

function playSoundEffect(e:String):void {
                if(!SOUNDENABLED) return
                trace("SFX: play sound for :"+e);
                isPlaying = true;
                var trans:SoundTransform = new SoundTransform(SFXVOLUME, 0);
                //DefaultButton is the linkage of the imported MP3. It’s a sub class of flash.media.Sound as it should be
                var s:DefaultButton = new DefaultButton();
                var c:SoundChannel = s.play(0,1,trans);
                c.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
}

function onPlaybackComplete(e:Event):void {
                trace("complete");
                isPlaying = false;
}

initialize(true);
playSoundEffect("");
stop();


Thanks!

Sound Embedded In Action Script Not Playing...
hi, i'm entering script to a button in my quiz.

if the answer is correct, it will play sound "ding.mp3".

else it will play "wrong.mp3"



at the 1st action frame i put script as below:


my_sound = new Sound();
my_sound.attachSound("ding3.mp3");
my_sound1 = new Sound();
my_sound1.attachSound("wrong.mp3");


then in the check button, i put script like

if correct:

_root.my_sound.start(0,1);

else:

_root.my_sound1.start(0,1);

however, the sound not play when i run my project.
where is the problem actually?

Problems With Embedded Sound File Playing Too Fast
Hello

I have embedded and linked a .wav file of a narration (voice)in a movie.
When I play the file in SoundForge it sounds fine.
When I play the flash movie it sounds like the chipmunks; the .wav file is way speeded up... How to control/correct this problem? I am relative Flash newbie, your patience is appreciated.

Thanks

RR

Playing A Random Sound Effect
Hello everyone,

I am very new to AS3, but I am learning quickly and it has all been very fun. Just a quick question that I'm sure is simple but is beyond me at this point.

I am trying to develop a simple game. What I want to accomplish is when you click on the characters head, a different sound effect (from a list of 5 or so) is played. I've gotten it to play one sound by using the following code:

Code:

// play sound on click
var sound:MonkeySounds = new MonkeySounds;
var channel:SoundChannel = sound.play();   


All of that is wrapped inside a function with an eventListener that responds to MOUSE_CLICK, which works fine. How would I get it to play a random sound effect from, say a list of 5 or so sounds? I learned the method above from this tutorial: http://blip.tv/file/341009

Any help is appreciated. Also, would it be beneficial to put this into a class? I'm not really sure how to accomplish that either, but I am going to need random sound effects down the line in this project so that may be of use.

Thank you all!

When A Sound Stops Playing So It Can Start Playing Another Sound :Monitoring Playback
I'm attempting to do a very simple thing and I'm very perplexed. My girlfriend is an opera singer and all I'm trying to do is advance the audio track when the song finishes playing to go to the next frame. On the surface it seems easy, however I can't seem to figure it out. Perhaps you can help?

Check out the movie here: http://www.earthgrid.com/earthgrid/valentina.html


Here's my code its on frame 2 in the movie



Code:
stopallsounds();
s2.close();
s3.close();
var s1:Sound = new Sound();
s1.loadSound("Agnus_Dei.mp3", true);
s1.start();
stop();
Explanation:: the flash movie has buttons that allow you to navigate between the 3 different music tracks.

when you click on a button, first I close the loading of the previous track, ie. s2 and s3, if they are still loading.

What I'd like to do is insert a command that advances to the next track (which happens to be on the following frame, 3) ONLY when the first audio track is finished PLAYING, not finished 'loading'

something like:
s.addEventListener(Event.SOUND_COMPLETE, gotoandplay (3);
);

so that when Agnus Dei finishes playing it goes to the next frame which starts the next track.

but that' doesn't seem to work.

I found this URL in Adobe's support site:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000283.ht ml

it says this:

Your application might want to know when a sound stops playing so it can start playing another sound, or clean up some resources used during the previous playback. The SoundChannel class dispatches an Event.SOUND_COMPLETE event when its sound finishes playing. Your application can listen for this event and take appropriate action, as shown below:


Code:
import flash.events.Event;
import flash.media.Sound;
import flash.net.URLRequest;

var snd:Sound = new Sound("smallSound.mp3");
var channel:SoundChannel = snd.play();
s.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);

public function onPlaybackComplete(event:Event)
{
trace("The sound has finished playing.");
}
>> However, when I try to paste in this code into a frame in Flash CS3 it gives an error saying I have to put it in a 'package'
I tried that, putting this code into a file and saving it as a .as file


I really don't get how to do this Package thing in CS3, so I couldnt get the example to work.

If so please contact me Please help!

Playing Embedded Mpgs
Hi there,

I've imported (embedded) an mpg file to be used as the background for an animation developed in Flash MX.

My problem is that the .swf file needs to be 'viewable' using Flash player 5, which doesn't support embedded videos.

Can anyone please suggest a way around this problem?

Thanks for your help
Matt

Playing Embedded Video
hi,
i have imported an mpg file to my page as an embedded video.
how can i add controls on my page to play and stop this video?
thanks

Embedded QT Movs - Not Playing
I have embedded quick time movs into various scenes (using flash mx). Each scene is accessed by a button with an fs command on it. These links work fine.

My problem is scene1 has QT movs on it and they play fine. But when I click on the button acessing any another scene - the QT movs dont play, even though the other flash animations including the buttons still work.

Can anyone shed any light on this please?

Embedded QT Movs - Not Playing
I have embedded quick time movs into various scenes (using flash mx). Each scene is accessed by a button with an fs command on it. These links work fine.

My problem is scene1 has QT movs on it and they play fine. But when I click on the button acessing any another scene - the QT movs dont play, even though the other flash animations including the buttons still work.

Can anyone shed any light on this please?

HitTest And Playing Embedded MC's
Ok so I've been playing with hitTest recently - and i thought i had it cracked.
I want to be able to click on a MC and it gotoAndPlay a different MC.


Code:
onClipEvent (mouseDown) {
if (this.hitTest(_root.CPL.TextLoop.Rolloverone._xMouse, _root.CPL.TextLoop.Rolloverone._yMouse)) {
_root.CPL.TextLoop.one.gotoAndPlay(2);
} else {
_root.CPL.TextLoop.gotoAndPlay(15);
}
}
This is as far as i've gotten, the click works but it doesnt matter if the mouse is over the MC or not, it still goes and plays.
What am i doing wrong? (this is embedded on a MC)

Mac Problem Playing Embedded AVI.
Hi!
I´m working with a flash that has an embedded AVI in it.
When i´m testing the "SWF" movie on a MAC, the
AVI´s wont show. I know that AVI is not the best format
for MAC computers but is this the problem, or am I missing
something else?
So I guess the question is: Can I make one "SWF" that will
work on both PC and MAC systems or should I start over
in Director?

Many Thanx for helping me with this problem,
and as usual, the time is running short.
-Sundance Kid-

Embedded Flv Not Playing After Load
I made a very simple swf that has a flv embedded into the time that should play after the content loads, but its not working... if after the page is loaded and you refresh the site, it plays..

Playing Embedded Video
hi,
i have imported an mpg file to my page as an embedded video.
how can i add controls on my page to play and stop this video?
thanks

Embedded .mov Not Playing Fully As Swf
Hey guys.
I made a quicktime movie and embedded it into flash. The movie plays all the way through with no problem. When I export the flash file to swf, the movie plays 3/4 then the pictures stop, but the sound keeps going. I've looked at everything. I can't figure out why it is doing that. All it is is a slideshow with music. I made it a .mov then brought into flash. I can see the images fine in flash. When I make it a swf, the images stop but the music continues to the end.
Any suggestions??

Thanks

Playing Embedded Video (FLV)
I'm embedding an FLV into a SWC via the Flash IDE libary.
In my SWF project, I want to load the video and show it, but I do not want to use the built in player with all the buttons as this video is used for between level transitions in a game.

From my searches in Flash Help and on here, there is only help on loading a video from a web-site or locally (thanks to those who responded to a previous video question I asked a few months ago.)

I'm trying to figure out if I need a NetConnection, NetStream, if I can have the video be of type "Video", if there is a way to create a variable of the type that is video (e.g., var myLevelVideo : LevelVideo = new LevelVideo() ), etc...

Can anyone point me in the right direction or have sample code?

Playing Embedded Video
hi,
i have imported an mpg file to my page as an embedded video.
how can i add controls on my page to play and stop this video?
thanks

Flash Player Not Playing Not Playing Properly Low Bitrate Sound
Hi,
I have created a flash audio player which can play streaming audio (mp3) files and it takes data from external xml file. Everthing is working fine. But when i used a low bitrate mp3 file (size 600 kb, time 3min approx) , it plays the audio with max speed and get ended in 30 seconds. The same audio file is playing normally in windows media player, or winamp,etc.
Plese give me some idea what is happening ........
Thanks,
Gunjan

.stop() For Sound Object Stopping Embedded Video Sound
I have a problem where the stop funtion for a sound object is stopping the audio in an embedded video. Has anyone ever encountered this? Ihave poured over my code and there is no cross-linked intance names, so I do not have a clue what is happening.

How Do I Check To See If A Sound Is Already Playing Before Playing When Pressing Play
Okay, i really need some help on this. I have a play button where if clicked will play the sound over the top of it when its already playing, if that makes any sense. the sound is already called on the first frame. if the user clicks the play button again, it will play over it.

heres my play button code. i need to know what to add to add to make it check to see if the audio is already playing. My audio sound is named myMusc.

ActionScript Code:
on (press) {
if (playing != true) {
if (paused != true) {
playing = true;
paused = false;
stopped = false;
myMusic.start(0, 999);
}
if (paused == true) {
playing = true;
paused = false;
stopped = false;
myMusic.start(myMusicPosition, 0);
_root.myMusic.onSoundComplete = function() {
myMusic.start();
};
}
}
}
Thanks

Stopping Embedded Flv's Playing In A Browser
I have a html page with a flv embedded in it playing a movie, now when somebody clicks a link for a popup window i am wanting the flv to stop or pause if possable.Is there a action scrypt command that can be used in the html page to interact with the embedded flv?

Playing Embedded Movie Backwards
I am patching together my first flash, which is definitly not optimal (lots of redundant code etc.) Since there is a deadline, ill go back and learn about how to make it much more optimal after this first version is done, so keeping all that in mind:

Is there any way to play an embedded movie backwards upon calling it with a gotoAndPlay() command from the same scene?

Thanks, a simple solution would definitly save me a lot of time, thanks for any tips!!

HELPSWF Not Playing When Embedded In HTML
I made a flash movie that has a preload bar in the first scene. The entire swf is only 33K. When I test the movie in the Flash environment and even simulate download at 14.4 speed, everything works properly. Preload bar shows up and then plays the movie when it is finished loading. However, when I embed the swf in my html, nothing happens. The stage shows up, but nada...no preload bar, nothing. Why?? What can I do to fix this?? Please HELP!!

HELPSWF Not Playing When Embedded In HTML
I made a flash movie that has a preload bar in the first scene. The entire swf is only 33K. When I test the movie in the Flash environment and even simulate download at 14.4 speed, everything works properly. Preload bar shows up and then plays the movie when it is finished loading. However, when I embed the swf in my html, nothing happens. The stage shows up, but nada...no preload bar, nothing. Why?? What can I do to fix this?? Please HELP!!

Playing A Random Moive At Random Intervals
ello

basic rundown:

i have five movies on the stage that are stopped

i want to play one of the five at random intervals

here is what i knocked up:



Code:
minTime = 1000;
maxTime = 5000;
setInterval(function () {
trace("go bubbles");
_root.bub = "bubbles"+(random(6)+1);
_root.bub.play();
trace(bub);
}, Math.ceil(Math.random()*(maxTime-minTime+1))+(minTime-1));


it outputs random bubbles2, bubbles5 etc to the bub variable (as seen in the trace) but when i try to create a string so it plays the bub variable, it doesnt work.

yes i have the bubble movies labeled

im also not sure if the random interval changes each time, is there a way to do this?

thanks for any help

my priority is for the script to tell a random "bubbles" movie to play

thanks

Embedded Video Performance (playing Backwards)
Howdy all,

I've noticed that when playing video in reverse it's very sluggish, does anyone have any tricks to fix up this performance problem? I've also noticed you can't play video backwards unless it's embedded in the timeline, am I wrong?

Thanks!

Embedded Movie Clip Not Playing Properly
I'm at a complete loss as to why this isn't working, so hopefully one of you guys can offer some insight. I have a button in frame one that, when pressed, takes the viewer to frame two. This bit works fine. However frame two has a movie clip which refuses to play. I wanted an extract of text to fade into the animation when the viewer clicks on the button and the only way I could think of doing it easily was to create a movie. When I click on the button the text still appears but does not play the movie clip of it fading in. The frame it is embedded in also has the stop(); function assigned to it on a seperate layer, would this have prevented the clip from playing properly?
I'm reletively new to using Flash as an animation tool (I use it mainly for line art to be exported to Photoshop) and my knowledge of any kind of scripting is limited to html and css, so any help will be greatly appreciated.

[edit]So now it's working fine. I'm not sure what I did but I guess that means this post is null and void! Thanks to the people who checked it out, even if they had no solution.

How To Keep Embedded Flash Music Playing After Page Changes
Please visit http://agavemexicanrestaurant.com where you will see that I have a flash music controller embedded one each page - top right.

My question is, how can I keep the music from restarting each time I visit a new page. I would prefer to have it continuously loop no matter how I click through the site.

Also, If I stop the music, I would like it to stay stopped throughout the site visit as well.

Would it be best to move the music control into its own frame, either at the top of bottom of the browser window?

How To Know If My Sound Is Playing Or Finished Playing?
I`m loading and playing sound like below.


Code:
//SOUND LOAD

var snd:Sound = new Sound();
snd.load(new URLRequest("sound.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
snd.addEventListener(Event.COMPLETE, onSoundLoadComplete, false, 0, true);

function onIOError(evt:IOErrorEvent):void{
trace("sound loading error: ",evt.text);
}

function onSoundLoadComplete(evt:Event):void{
trace("sound loaded");
}

//SOUND PLAY

snd_btn1.addEventListener(MouseEvent.MOUSE_OVER,sndPlay);

function sndPlay(evt:Event):void{

var channel:SoundChannel
channel = snd.play();
}
i would like to have my sound to play only when it`s not already playing.
how can I achieve this?

thank you

How To Know If My Sound Is Playing Or Finished Playing?
I`m loading and playing sound like below.


Code:
//SOUND LOAD

var snd:Sound = new Sound();
snd.load(new URLRequest("sound.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
snd.addEventListener(Event.COMPLETE, onSoundLoadComplete, false, 0, true);

function onIOError(evt:IOErrorEvent):void{
trace("sound loading error: ",evt.text);
}

function onSoundLoadComplete(evt:Event):void{
trace("sound loaded");
}

//SOUND PLAY

snd_btn1.addEventListener(MouseEvent.MOUSE_OVER,sndPlay);

function sndPlay(evt:Event):void{

var channel:SoundChannel
channel = snd.play();
}
i would like to have my sound to play only when it`s not already playing.
how can I achieve this?

thank you

How To Know If My Sound Is Playing Or Finished Playing?
I`m loading and playing sound like below.


Code:
//SOUND LOAD

var snd:Sound = new Sound();
snd.load(new URLRequest("sound.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
snd.addEventListener(Event.COMPLETE, onSoundLoadComplete, false, 0, true);

function onIOError(evt:IOErrorEvent):void{
trace("sound loading error: ",evt.text);
}

function onSoundLoadComplete(evt:Event):void{
trace("sound loaded");
}

//SOUND PLAY

snd_btn1.addEventListener(MouseEvent.MOUSE_OVER,sndPlay);

function sndPlay(evt:Event):void{

var channel:SoundChannel
channel = snd.play();
}
i would like to have my sound to play only when it`s not already playing.
how can I achieve this?

thank you

Stoping And Playing Sound At A Particular Point (using Sound Object)
Hi,

I have a movie in which i have a voice over and some animations which is in sync with the VO. I have a play button and stop button.

I am using the sound object method to play the sound and the animations are in timeline.

I have to stop the movie at any point in time and when i click on play the sound should start from the point where it stopped..But it is not happening.

Please help me..

am having a deadline today..

lamus

Random Number To Choose Embedded Movie Clip
Hello Flash Experts!

I'm under the gun again. I have thrown together some simple flash in the past before, but I'm no actionscript expert. Here's what I need to build by tomorrow:

A script that, when you click on a button, selects a random number from a range of 1-1200. I assume I need to pass this number into a variable, because depending on where that number falls (say 1-210 = clip 1, 211-460 = clip 2, and 461-1200 = clip 3) I need to have flash play the corresponding movie clip.

I'm finding plenty of scripts for generating random numbers in a range but I don't know how to populate that into a variable or write a conditional statement to play the correct clip. The more complete the help you can give, the more I thank you!

Embedded Mp3 Sound
Hi,

I have an mp3 file (music) that I want to play with a movie in my flash presentation. I have embedded the music into a keyframe in the file. While I am in the editor the sound of the mp3 is perfect. When I publish the file (as an exe) the music plays, but it's like listening to it through a wad of cotton wool - all muffled and distorted.

Is there some sort of property that I have to set for this to play as clearly as it does when I am in edit mode of the movie?

Thanks
Chris

Flash 8 Random Sound, Random Movieclip
Dear people, happy greetings to you all.

I would like to find some way of using a simple variable structure to do 2 things:
Pick and play a random sound from say - a selection of 5 sound files.
Do something similar with movieclips.

If you could show me where some relevant tutorials are that show how to do this or can supply some indicative code I would be most grateful.

many thanks
julie
*

Sound Not Working In Embedded Swf
I'm using Flash 8 Pro, Mac, any browser.

I have a movie that plays sound fine as a standalone, but goes silent when I embed it as a swf in a parent movie using loadMovie.

Here's the details and sample code.

The movie has a series of button triggers that fire off a sound effect when hit. The only thing that's perhaps a little funky is these triggers change a separate movie clip onstage which has a pair of flv movie clips blended together -- but those flv movie clips have been rendered with no audio channel at all. They're silent. (Side question: will this cause a problem on Windows? Crappy PC sound support has been the bane of my existence for years...).

When I use loadMovie, the buttons and the flv files work fine, there's just no audio. It's one of an array of different demos, and I'm trying to cut down overhead by keeping things modular, so I'd rather not be forced into embedding the audio into the parent movie if I can help it.

Any help appreciated.

best,
FBC

//

Code:

// NOTE: Though this code uses "var vSound1 = new Sound();"
// I've had no success with "this.vSound1 = new Sound();"
// nor "_root.vSound1 = new Sound();"



var vSound1 = new Sound();
var vSound2 = new Sound();
var vSound3 = new Sound();

// these all match linkage name in the flash library

vSound1.attachSound("sound1");
vSound2.attachSound("sound2");
vSound3.attachSound("sound3");

playSound1 = function () {
vSound1.start();
};

playSound2 = function () {
vSound2.start();
};

playSound3 = function () {
vSound3.start();
};

///// The triggers call the playSound function when clicked...


// play note...

on (press) {
playSound1();
}

/////// How simple can it be, right? ;)

Detecting If Sound Is Embedded In An FLV
Hello,

I wonder if there is a way to detect if an FLV has sound embedded in it. I have various videos that I am streaming in and some have sound and some don't. Those that don't, I want to hide the volume controls and mute button and (you guessed it) those that do have sound, I want to show the volume controls, etc...

I know that I could make an extra flag in my XML file that describes the videos but I am wondering if there is any fancy pants way of using some sort of built-in, unpublished sound detection within the NetStream or NetStatus Event.

Any light shed on this would be appreciated.

Thanks,

-ropeGun

Embedded Movie Sound....
Hey guys...I have a question about embedded movie files. I have embedded a movie into my .swf and I am looking at making a mute button. I can get the movie to mute, however, unmuting it just isn't working for some reason. I don't see any flaws in my logic...so I was wondering if you guys could take a look at this code and let me know if i'm making a stupid mistake?


Quote:




this.soundIsOn = true;
this.audio = new Sound();
if (this.fso.data && this.fso.data.volume != null) {
this.audio.setVolume(this.fso.data.volume);
this.soundIsOn = this.fso.data.volume > 0;
this.wave1._alpha = this.fso.data.volume;
this.wave2._alpha = this.fso.data.volume;
}

//animation crap
this.onRollOver = function()
{
this.gotoAndStop(2);
};
this.onRollOut = function()
{
this.gotoAndStop(1);
};
this.onPress = function()
{
this.gotoAndStop(3);
};


//muting process + animation crap
this.onRelease = function()
{
if (this.soundIsOn) {
// volume settings
this.audio.setVolume(0);
this.soundIsOn = false;
this.fso.data.volume = 0;
//alpha fade for sound waves
this.wave1._alpha = this.fso.data.volume;
this.wave2._alpha = this.fso.data.volume;
} else {
//volume settings
this.audio.setVolume(100);
this.soundIsOn = true;
this.fso.data.volume = 100;
//alpha fade for sound waves
this.wave1._alpha = this.fso.data.volume;
this.wave2._alpha = this.fso.data.volume;
}
this.fso.flush();
this.gotoAndStop(1);
};
this.onReleaseOutside = this.onRollOut;
stop();

Attaching An Embedded Sound Using A Var
Dear all,

I want to know if it is possible to attach a sound using a variable as the name of the class. For example

Normal way


Code:

var mySound:embeddedSound = new embeddedSound ()
What I need


Code:

var newSound:string = “embedded Sound”

var mySound:newSound = new mySound()
Is this possible?

Thanks in advance

Embedded Sound Overlapping
I set up a radio page, when a logo (button inside a movieclip) is pressed it jumps to a root frame where a movie clip plays an embedded mp3.

the mp3 movie clip has 2 frames, one to start the sound clip (sync = start) and a stop button jumps to frame 2 to stop the sound (sync = stop)

not the most glamorous way to make a player, but it works.

the problem is here: on the last logo after clicking to the second screen of logos (sonju all-american super store) it jumps to root frame 8, frame 8 ONLY has the button for that particular sound/commercial, yet it plays EVERY sound.

http://www.carlsonmedia.tv/new3/radio.swf

for the life of me, I can't stop all the sounds from playing, I've quadruple checked the movie clip and any hidden movie clips on that layer, but nothing I know to check can stop it.

Any ideas?

I'm using AS2.

Prevent Sound On An Embedded Swf
Hi

I want to use a swf on a webpage but it has sound. Is there any way to turn the sound off without editing the original fla that i don't have?

Thanks

Random Playing Swf
hi everybody !!
i hope somebody can help me

this is my problem

i have a main movie on level0 and 4 more movies(swf)
which contain some music loops

now i loaded all 4 movies on the main movie...so far so good

now i want to play each movie randomly but avoiding to reapeat the same movie within the four sequence

eg play
1342 then another random sequence like 3241 and so on
notice that the digits inside the sequence never repeats

i don't want something like 1123 or 3321 or 4341

hope i am clear enough
please hope a hopeless newbie

ciao magnetos

Random Playing
hi
what would be the easiest way of making a movie clip play repeatedly, but at random intervals?

Playing Random MCs
Hey,

I have 6 MCs. How can I have them appear randomely on the stage?

Thanks.

Playing Random FLV's
Help Needed!
I believe this is the code required to play a FLV dynamically but how do I make it play random videos - for instance - video1.flv, video2.flv, etc?

on (release) {

var netConn:NetConnection = new NetConnection();

netConn.connect(null);

var netStream:NetStream = new NetStream(netConn);
netStream.onStatus = function(infoObject) {
status.text += "Status (NetStream)"+newline;
status.text += "Level: "+infoObject.level+newline;
status.text += "Code: "+infoObject.code+newline;
};

my_video.attachVideo(netStream);

netStream.setBufferTime(5);

netStream.play("04_56k.flv"); ---> include the random function here?
}

Thanks for anyhelp!
Matthew

Possible To Have A Sound Play Without It Being Embedded In Movie?
Ok here's the situation. Say I have a CD track listing and each track is a button. I want the button, when clicked, to play a sample of that track. What I'd like to know is if it's possible to have the buttons load the track when clicked on, instead of when the movie initially loads (a loading...please wait message would be fine at the time they click on a track).

If I have 12 tracks and each track is 30 seconds long, it would not only make the entire movie much larger, but it would also force me to create a preloader for an already small movie. Plus, if someone isn't going to listen to all 12 tracks, loading up all that audio is just wasted space.

So, does anyone know if this is possible and if so, how? Any help is appreciated, thanks.

How To Control Sound Of Embedded Video In MX?
Is it possible to control the sound of an embedded video with actionScripting in MX. I would like to make a volume slider (0-->100%) which controls the volume of my video.
TX a lot !!!

Preloading Woes. Using Embedded Sound
Hello,
Although I have flash experience, this is my first time using embedded sound, with the library linkage property of "export for actionscript & export in the first frame".

I am just using a simple getBytesloaded/getBytesTotal loader, but exporting all audio on the first frame causes the preloader to fail because the data is before the preloader.

Am I missing something?
Have any ideas?
Is there a better way?
Is a dynamic import of audio a better choice?

Any and all ideas appreciated..
Thanks...
3PRIMATES

Multiple Embedded Sound Players
Hi guys -

I've got a bit of a scenario that I'm not sure how to get around. The situation is that I have an HTML page that requires multiple embedded flash players to "preview" an mp3.

The flash player is a simple button with two states: play and stop, that plays an mp3 passed through FlashVars. So once a user plays a song, the state of the button changes so he or she can stop it.

The problem arises when the user plays another song. The intention is that only one sound should be playing at once, which is easily achieved by using stopAllSounds() before playing a new sound, however the problem is that I'm not sure how to get the previous button to reset itself to "play".

For example, say I have two songs, Song1 and Song2. I play Song1, then I play Song2. Song1 stops, but if I click it again, it doesn't play because it doesn't realise that it's been stopped.

Hopefully this is making sense. Any ideas on how to achieve this??

Thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved