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


Similar Posts:


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 :: 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

Flash :: Dynamically Create New Sound Objects Based On Raw WAV / DATA Or Other Sound Object?

Jan 31, 2012

Is there any AS3 library or code-snippet that can create altered versions of a Sound object on-the-fly (at runtime)? Either based on:

An existing Sound object; A ByteArray object;

For example, say you have a "dry" sound of a gun-shot. You could:

[Code]...

View 1 Replies

ActionScript 3.0 :: Create A Button That When Press It And Hold It Play A Sound?

Feb 15, 2010

Is it possible to create a button that when you press it and hold it, it will play a sound, and when you release it then stops the sound?

View 2 Replies

Flash :: Play A Sound File Via URL?

Jul 25, 2011

Here is my code

onFrame (1) {
mySound = new Sound();
mySound.loadSound("http://www.mysite.com/spot_mixdown.mp3 ");
mySound.start(0, 0);
}

that play .mp3 file from my website at the first frame. It's work for me!

But when I update spot_mixdown.mp3 (change sound inside but use same filename) on my website and then reload webpage, a sound is not change.

View 2 Replies

ActionScript 3.0 :: WAV File - New Sound.extract() Function To Get Two Seconds Of A Sound Into A ByteArray

Nov 11, 2009

I'm having some trouble getting the following code to work - trying to use the new Sound.extract() function to get two seconds of a Sound into a ByteArray, and then create a new bytearray with a WAV header, and then output the file. The resulting 'test.wav' file sounds very wrong although slightly recognisable? I think I may have some of the WAV header settings may be wrong but I'm not quite sure what's the matter and after a long time scratching

[Code]...

View 5 Replies

Actionscript 3 :: HTML: Start Sound Playback From URL Mid-file Without Buffering All Sound Data To That Point?

Nov 21, 2010

I have a long mp3 file hosted on a standard apache server (30 minutes long so far, but I would like it to work with longer sounds too).I'd like to start playback of this audio within at a specified point. When attempting to use Flash Actionscript 3, my basic tests show that ALL the audio from the start to the position I choose is buffered before playback (Sound.bytesLoaded was my friend here). If I start one second in, it takes about 3 seconds to start playback, 30 seconds in, takes about 25 secondsObviously with a really long mp3, like skipping playback to the middle of a 3-hour audiobook, this isn't going to be practical.Here's the ActionScript 3.0 code I'm using:

button.addEventListener(MouseEvent.MOUSE_DOWN, function():void {
var s:Sound = new Sound();
var req:URLRequest = new URLRequest("http://example.com/audio.mp3");

[code].....

View 1 Replies

Attach A Sound To A .fla File That Starts To Play When The File Is Opened?

Sep 8, 2009

I would like to attach a sound to a .fla file that starts to play when the file is opened. I have created a button and would like to be able to use this button for a visitor to the site to mute the sound. So, I'm trying to accomplish two things, first attach a .wav file, then get the mute button to work.

View 1 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 3.0 :: Play Sound File At Certain Frame Lablel?

May 14, 2009

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

Quote:
//start of sound section is for sound
var soundReq:URLRequest = new URLRequest("FlashFiles/audioFiles/mySoundmp3");
var sound:Sound = new Sound();

[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 label. I want to be able to put all my action script on frame one (or one location) instead of all over the time line.

View 1 Replies

ActionScript 3.0 :: Play A Mp3 Sound File Which Is Passed In Via URL Variable

Apr 30, 2009

Here is my code Action Script Code:

var myVar:String = LoaderInfo(this.root.loaderInfo).parameters.myVar;
var snd:Sound = new Sound(new URLRequest(myVar)); var channel:SoundChannel = snd.play();
 
Here is the HTML embed:

[Code]....

View 2 Replies

Play Sound File Across Multiple Scenes / Movies?

Jan 18, 2010

Most of my flash movies have been reasonable sizes, but the one I'm working on now is kind of a beast. It's up against the 16000 frame limit, so I'm looking into ways to chop it up. The problem is that I need a way to keep my background music playing across multiple scenes or movies. Is there a way to start a sound file in one movie, and have it continue when another scene is loaded or when a second movie file is loaded with ActionScript?

View 3 Replies

ActionScript 3.0 :: Play A Sound File One Phrase At A Time?

Aug 10, 2010

I am have written a flash "reader" which I use as an aid for language studies.  Various narrations are loaded into a combobox via an XML file, and the user can play the selected narration in a "sentence mode", a "passage mode" (several sentences) or in "continuous mode".  (I use Soundbooth to set navigation cue points at the beginning of each "sentence".)
 
I would like to add a "Phrase Mode" which would cause the player to play the sound file until it hits a pause / quiet spot.  In other words, if the user selected "phrase mode", the player would play to the next spot where there is no voice for x period of time.  He/she will then be able to select 'repeat' to replay the phrase or 'next' to play the next "phrase" - as with the other modes.  I am using FLVPlayback to play the .flv files.

View 2 Replies

Professional :: How To Make Sound File Play In Only One Scene

Mar 13, 2011

I have a flash file with about 20 different scenes in it. And in one of the scenes there is an audio file that is 15 seconds long. The sound is on a menu page so i only want it in that scene. But if you are on that page for less than 15 seconds and go to another page then it carries on the sound into the next scene and if you go to and from the menu page to another scenes in quick succession you get a build up of sound which is horrible.

View 1 Replies

Lower Sound File Volume During Video Play?

Jun 4, 2011

I have a Flash CS4 project with sound that starts to play in the first scene, set to event/loop so that it plays all through the entire time.
 
But I have a piece of video with audio in another scene and I would like to have the sound file playing at a lower volume while the video is playing, then get it to return to normal volume when the video is over.
 
I have no actionscript at this point. Just timeline animations, etc.

View 7 Replies

ActionScript 3.0 :: Play Sound File From Object Clicked?

Apr 13, 2011

What I have are several items on a stage and when they are clicked I want to capture their names so I can use it to play a sound file that relates with the object clicked. For example: say I have a square, rectangle, and a square on the stage and when the user clicks on "triangle" it would play the sound "triangle_snd". This is what I have so far and the error I am getting from it.[code]...

View 2 Replies

ActionScript 2.0 :: Create Sound File Of A Particular Frequency?

Aug 18, 2011

I need to create an audio file (sine wave) of a particular frequency. I need to do this in actionscript 2.0.

View 0 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 :: Loading A Sound File From The Library To Play It In One Frame?

Sep 23, 2009

I have a flash file with several frames. In each frame I need to play a sound file.I've added all the sounds to the library and done all the necessary steps to export for actionscript.Here's my code to play the sound in one frame.
 
var sound1:Sound = new Cal10101();
sound1.play();

This works great to play the sound. I am using buttons to move to the next frame. When I click the button to move to the next frame, I need the sound from frame 1 to stop and a new sound which would be Cal10102 to start playing.How do I stop the sound from frame 1 from playing when I go to the next frame?

View 3 Replies

ActionScript 2.0 :: Load And Play A Sound From Within A CLASS Definition File?

Aug 3, 2009

I need to know how to load and play a sound from within a CLASS definition file. I know the normal way of doing this, but Flash MX rejects that syntax, so there must be some special way of using sounds in a class file.

I need to know how to code for "if the score increases by any value." So, if the score goes from 0 to 1, the sound plays ONCE. If it increases from 1 to 2, the sound plays ONCE again.

View 0 Replies

Actionscript 3 :: Sound Latency - Set It For Any Silence Before The Actual Sound By Calling The Sound

Apr 16, 2011

I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:

[Code]...

All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?

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 :: Put Buffer In Dynamic Sound(mp3 File)?

Jul 16, 2009

like row sound we put buffer, like thisbuffer = new SoundLoaderContext(65000);_loop_snd = new Sound(new URLRequest(_mp3), buffer);
how can i put buffer in dynamic sound..as per your code where i can put buffer in below code..
 
_dynamicSound = new Sound();
_dynamicSound.addEventListener(SampleDataEvent.SAMPLE_DATA, onSampleData);
 
the dynamicSound genrated from the row sound, means i modify the row sound.

View 2 Replies

ActionScript 3.0 :: Controlling Sound File With Play Stop And Mute Button

Oct 6, 2010

the method for stopping/playing sound in 2.0 don't work for 3.0. i can stop the sound by going to a different page/frame on the site.but i want the buttons.

1. play button?

2.stop button?

3.mute button?

View 1 Replies

ActionScript 3.0 :: Add A Sound File To Project With Controls To Stop And Play And Volume Slider

Dec 6, 2009

I'm new to Actionscripting and I want to add a sound file to my project with controls to stop and play and a volume slider. I'm using this actionscript for the controls. It works but right now you need to click the play button for it to start. Is there a different way to write it so that the music starts playing when the scene starts, and then the user can stop or play it again and change the volume?[code]

View 3 Replies

ActionScript 3.0 :: Change Tint Of Movie Clip On Rollover, Play Sound File When Clicked?

Nov 9, 2009

Drag and drop game. I'd like the instance to tint red when rolled over after it's been successfully dropped. I'd also like to play a sound file when clicked after successful drop. Here's the code:

ActionScript Code:
addEventListener("dropped", dropper);
function dropper(e:Event):void {

[code]....

View 6 Replies

Professional :: Sound Won't Play When SWF File Is Inserted In HTML Page--plays Fine In Flash Test Movie?

Dec 1, 2010

I have created a SWF file that plays/stops sound. The SWF file works great when previewed in Flash CS4, but does not work when inserted in the HTML file.Here are the 2 files that are automatically generated when I INSERT>MEDIA>SWF in Dreamweaver CS4:

swfobject_modified.js
expressInstall.swf
Here is the ActionScript3 that I am using in the Flash file:

[code].......

View 6 Replies

Loading With Sound Only Played Once But Keeping Hover Over Menu Item Sound Intack?

May 21, 2010

I have a flash header that was never completed because the guy I hired took people's money and ran. So now I even wonder if what he said could work with my flash header is true or not. But, usually there is always a way to make it work.

I have a flash header that does two important things: 1) Upon entering the site, it loads and plays an audio track 2) Makes an animal noise when you hover over each animal menu item. (not sure if I'm able to give a link to it or not on here. If I able to and someone would like to see it let me know)

I want to know if my flash header can support the following additional functionality/changes:

1) Currently, it loads everytime a page is selected. I only want it to load the one time of entering the site because the audio gets annoying. Set a cookie maybe?

2) But, I do not want to turn the audio off completely because I still want the hover over each menu item sound.

3) Have a link on it to allow them to select to turn on / off the sound completely. It currently has that, but only for the current page. Once you select another page, the audio is back to on.

4) Lastlly, is there a way for it to detect that someone doesn't support flash and to display an html version of it? And can flash create a html version from my fla file?

I don't know much about flash (but am learning) so I'm not sure if I'll be able to do this myself. However, I want to find out if my flash header will even work this way before I invest the time learning it just for these changes. I know it will be pretty deep with script code, but I'm hoping I could find base code already available for these features. Not sure I can afford help now because of being laid off and two different scammers taking advantage of me. So I'm going to try to do myself and see if there is any suggestions/support on here that can help. I have Flash CS4.

View 2 Replies

ActionScript 1/2 :: Make Button On Rollover Starts Sound And Rolloff Stops Sound?

Jul 28, 2009

I have several buttons in a movie and I want to be able to rollover an individual button and play the sound for that button and when I rolloff I want the sound for that button to stop.

View 6 Replies







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