ActionScript 2.0 :: Embeded Sound Does Not Play When Swf Is Loaded By Another Swf?

Sep 20, 2011

I have a movie clip that loads an embed sound file using actionscript. That works fine when the swf is executed on it's own. However when I load it from another swf (to level1) the swf loads and runs fine but the sound does not play. It's my understanding that the reference to the instance of the sound file is not properly resolved but I am not sure how to reference it in order to resolve.Here is the code.

sound_clip.swf I have a sound file that is exported to actionscript with "BG" as the identifier.In some frame in the movie I use the following code:

bgSound = new Sound();
bgSound.attachSound("BG");
bgSound.setVolume(100);
bgSound.start( 0 , 1 );

[Code]...

View 2 Replies


Similar Posts:


Play Sound When Flash Is Loaded?

Jul 17, 2009

I have buttons with sound attached in over state and that works just fine, but this means that you are going to hear sounds only when you move cursor over button, how can i make some background sound to play from the moment flash is loaded, even when buttons are inactive, my background image looks like some electrical equipment and and i want to make it sound realistic (sound clip must to be set to loop) and must to start at the moment flash is loaded?

View 3 Replies

Actionscript 3 :: Controlling An Embeded SWF Movie(audio/sound) File In Flex?

Jul 29, 2010

So I'm trying to get sound on my flex application. Then tried to load an swf movie with only audio in it.But when it loads on init(), it loops non-stop.Here's a sample code:

[Code]...

View 1 Replies

Professional :: Embeded FLV Wont Play In Firefox?

Jun 29, 2011

The project i'm working on contains many flv's which are dynamically loaded into our custom media player, and then again loaded into our flex application. We are having an issue with these flv's. Well i should say some of them. Our problem is based on browsers. In IE everything runs fine. In firefox, some work, some dont. We run different courses though our application. In 1 loaded course, the flv's play perfectly fine. No loading issues or delaying or freezing. But on this one course all of the flv's contained within it will not load. Like i said before, when we test this on IE they work. Only firefox is causing the issue. I have researched this issue and have came up empty handed.

View 6 Replies

ActionScript 3.0 :: Loaded Sound Will Not Play On Mouse Event

Jul 13, 2010

Why won't my sound play? It should play on MousOver and stop on MouseOut...

stop();
import flash.display.MovieClip;import flash.events.MouseEvent;
var req:URLRequest = new URLRequest("squeeak.wav");
var sound:Sound = new Sound();
var controller:SoundChannel;
function soundLoaded(event:Event):void{
[Code] .....

View 3 Replies

ActionScript 3.0 :: Compiler Won't Let Me Play Sound In A Loaded Movieclip

Aug 19, 2009

I have a very simple class as so[code]...

I'm loading the mp3 from a compiled swf so I don't have to compile it every time, but am having a nightmare playing it.

Even with loader.loaderContentInfo.content, I can't seem to access my play methods.

I've tried all sorts of casting combinations from the parent timeline, but no luck.

View 4 Replies

ActionScript 1/2 :: Pause, Stop, Play A Sound That Is Loaded From The Other .swf File?

May 6, 2009

Pause and Resume external SWF sound filesI have this code that plays the sound through linkage. It reside in scene1.fla -> scene1.swf.

var mc:MovieClip = this.createEmptyMovieClip("mc",1);var myLoop:Sound = new Sound(mc);myLoop.attachSound("bg_sound");myLoopVolume=0;myLoop.setVolume(myLoopVolume);
mc.onEnterFrame = function () {  if (fadeIn01==1) {  

[code].....

View 1 Replies

ActionScript 3.0 :: Create Dynamic Sound To Play Sound-file?

Oct 14, 2009

It's possible to play a sound file through AS, either by loading it from a folder or import it to flash. It's also possible to play a dynamic tone with flash.media.Sound + writeFloat.

But... is it possible to play a sound file with flash.media.Sound + writeFloat in some way? I want to play a sound file without having to deal with any files except the .swf!

View 9 Replies

ActionScript 2.0 :: Sound Visualizations - Dynamically Read The Sound Levels Of A Loaded MP3

Jan 14, 2005

Does anyone know of a way to dynamically read the sound levels of a loaded MP3 to help produce dynamic sound visualization in Flash?

View 5 Replies

ActionScript 2.0 :: Play Sound/stop Sound Button?

Feb 13, 2007

i want to make a single button to play a sound, and if pressed again, stop the sound. and if pressed again, play the sound, and so on...
i know it has to be made with a boolean variable, true/false, but i just can't figure out how.

View 13 Replies

Actionscript 3.0 :: Loaded Sound Doesn't Stop / When A New One Is Loaded

May 8, 2009

I have three btns on stage, clicking on each one i want them to load an external mp3.The problem is the previous loaded sound doesn't stop when a new one is loaded so I have all sounds playing at the same time

View 3 Replies

IDE :: Add Sound - Sound To Play On The 'Over' State

Mar 6, 2009

I'm trying to add sound to some buttons. It's just a little metallic 'klink' sound that plays on rollover. I only want the sound to play on the 'Over' state. So I've set up a layer (just for sound) for the button and I add my sound in the 2nd frame (the Over state). Everything is cool. All is good. And the sound plays on rollover. But the sound also plays when I click the button (i.e. it also plays on the "Down" state). Why? The Down state keyframe is completely empty. What's going on here? I've only put the sound in the "Over" keyframe, why does it also play in the "Down" frame (or when I click)?

View 1 Replies

ActionScript 2.0 :: Play Sound Like "stop All Sound" Option In Flash?

May 17, 2003

I want to use a sound loop in my flash movie. The movie has many scenes. And the problem is that when I go to next scene or different scene I hear the sound repeating twice. I mean sound does not stop from first scene and begins from the different scenes.Is there any way to play sound like "stop all sound" option in Flash.

View 6 Replies

ActionScript 3.0 :: Play A Sound File And Show The Progress Of The Sound File Being Played

Mar 16, 2009

I have to play a sound file and show the progress of the sound file being played. I am using import flash.media.Sound; import flash.media.SoundChannel; But the PROGRESS event gives theprogress of loading of file. I want to know of much of the song has been played and how much more is left.

View 3 Replies

ActionScript 2.0 :: Swapping - Play The Client Side Mp3 First Then Only Play Server Side Sound Object Alternately

Aug 9, 2004

I am new to actionscript. I have created a script that will play server side sound object and client side mp3 files alternately. Now, I would like to play the client side mp3 first then only play server side sound object alternately. However, I have no idea how can I do so. The following is the code that need to be swapped:

[Code].....

View 2 Replies

ActionScript 3.0 :: Can't Get More Than One Sound To Play

Jan 25, 2011

I am trying to build a simple xml based mp3 player for a project. I have got as far as combo/list boxes populating.

The first time you click the a track to play it all is well.

However, when you click another track, the first stops, but then I get error message.[code]...

View 2 Replies

Flash5 Sound Does Not Play Just Once

May 14, 2011

I tried modifying the sound in Action Script but now I do not get any sound on the webpage, only hear the sound in preview on flash editor.It was looping sound on the web page and I did not want to have surfers having to hit the stop button. But I did want it to play just once.[code]

View 1 Replies

How To Add In OnRelease Play Sound

Feb 14, 2012

I have a "onRelease function"
CODE:
btn_4.onRelease = function () {
var yTween = new mx.transitions.Tween(slider, "_x", mx.transitions.easing.Strong.easeOut, slider._x, 695 , 0.600000, true);
}
This works good but I like to add in a "onRelease" play sound, too. How it have to look like and where do I have to place the sound? Because: When I add in a new function "onRelease" both block each other.

View 2 Replies

ActionScript 2.0 :: How To Play Sound

Dec 14, 2009

I have two files as: A.swf and B.swf.[code]While I am playing B.swf then music is plays perfectly. While I load it to in A.swf then music in not playing.I don't want to change anything in B.swf like new Sound(this). I want actionscript code only for A.swf.

View 5 Replies

ActionScript 2.0 :: Sound Does Not Play

Jan 21, 2010

I've got 3 swf files and they are all nested. Here's the structure: [code]The sound clip "m1p1" is loaded in the library of "cc_mod1_shell.swf".This setup works when I just test "cc_mod1_shell.swf". I can hear the sound clip. But, when I test the root level "cc_ shell. swf", the sound does not play. Can anyone tell me what I'm doing wrong? Why would this._ parent work when I'm just using the 2 files in question, and not when they are nested in another file?.

View 7 Replies

ActionScript 2.0 :: Get Sound To Play?

Mar 27, 2012

How do you get sound to play?

I am importing the sound and exporting in with an identifier "sjump".

I am trying to play the sound from a seperate .as file with the following code:

var sound_sjump:Sound = new Sound();sound_sjump.attachSound("sjump");sound_sju mp.start(1,0);

Why won't it play?!

Some of my sounds like if I attach "coin" instead of "sjump" work? Why is this?

View 3 Replies

ActionScript 2.0 :: Sound Can't Play

Sep 7, 2008

I have a Flash movie that uses the following code to load a Sound from the library[code]...

View 4 Replies

IDE :: Can't Play/load Sound In CS3?

Jan 28, 2009

trying to make a play/pause toggle button in AS3. I'm a newbie but I've finished the site except for this element. my audio file works when i import to the library and it plays it in the preview. its in the same folder as the fla. working in cs3. This is what i've done.new as3 file. code.

var req:URLRequest = new URLRequest("ocean.mp3");
var s:Sound = new Sound(req);
s.play();

whats the deal? I get no compiler errors. i'm hitting option+Return on the mac to test the movie. I downloaded some one else's and it worked. i copied theirs into my project and it didn't work. i have a feeling its something to do with classes that i don't know about

View 1 Replies

IDE :: Way To Play Sound Files

May 2, 2010

I'm working on a game that loops a random sound file everytime the user goes to the menu. When I tried the simulate download in the preview menu, it took a long time to load the first frame (which is a preloader). I found the problem was that in the linkage for the sound files I said "Export on first frame" so i unchecked that box, but then when I tried playing again, the sound wouldn't load.So, I'm wondering, is there a way to play sound files through ActionScript without having to load them on the first frame?

View 1 Replies

ActionScript 2.0 :: Play Sound In Flash?

Feb 25, 2009

are there any possibilities to play sound in flash (actionscript 2), which is defined by a mathematical function like f(t) = 0.5*sin(2*Math.pi*16/27*440*t) ?

View 2 Replies

Sound To Play Only Once While Rest Keeps Looping?

Apr 3, 2009

to play only once and then stop but the camera flash to keep looping.The sound is on a separate layer, but whenever I put the 'stop' feature in the ActionScript, it stops the WHOLE THING, so the camera flashes only once.Again, I want the camera flash to repeat, but the click sound to play only once.

View 1 Replies

ActionScript 3.0 :: Play A Sound At A Certain Frame?

May 30, 2009

I would like to play a sound every time I reach frame 2, but I'm a bit confused with the code. I read some tutorials, but they were about 2.0 and the 3.0 ones were poorly explained.

Let's assume I imported a sound named 'ping.wav'. What do I need to do to play that sound on frame 2?

View 1 Replies

Play A Sound On Button Press?

Aug 11, 2009

OK, say I have a button that does something, like go to the next frame, is there anyway to have it play a simple sound located in the library without looping?

View 8 Replies

Flash Sound Doesn't Play

Dec 16, 2009

I have sound playing in my flash file. My index file is a html file which calls the flash file, and when i run the html file, the sound doesn't play. Does anyone know how I can rectify this?

View 5 Replies

How To Play A Sound At Specific Frame

May 13, 2009

I have the loading audio file at frame one. However, I want to play the audio only at specific frame or frame lable. How do I do that? Below are my codes:

[Code]...

The above plays the sound as soon as the .swf file is loaded. But I want to play at certain point in time, say frame number or frame lable.

View 17 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved