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




[F8] Sound Playback In Work Mode



Hello all! Desperate asap help needed!

I'm putting together an app. which plays sound while showing some pictures then lets the user click 'next' and the next scene does the same. I'm trying to have the pictures move in time with the sound, when in _work mode_ I press 'enter' and it plays fine, but when I press 'enter' again to stop it, the pictures stop but the sound keeps going untill it finishes. It's incredibly frustrating as the sound clip is 4 minutes long.

I'm also having problems with the 'next' and 'back' buttons going through scenes, one moment they'll work, the next they won't, or go to a random scene. Is this a flash thing? And am I better off flicking between movie clips instead of scenes?



FlashKit > Flash Help > Flash Newbies
Posted on: 03-04-2007, 06:58 PM


View Complete Forum Thread with Replies

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

Video Playback In Projector In Full Screen Mode
My screen goes black when I am playing back video in a Flash projector in full-screen mode. I need it to be in full-screen mode for a presentation. And the rest of the flash animations work fine. But once it start playing back video, the entire screen goes black and nothing happens. I have to press esc and exit out of the projector.

If I don't play it in full-screen mode, the video works great.

Please help.

Thanks.

Flash App Won't Work In 56k Mode
I have a simple flash application that I am working on. It's already posted live but sometimes it fails to load the images. All it does it load images to click on to take you to different sites. You can click next to view the next image and prev to view the previous image. The problem being that it loads fine and works great until you try it in 56k mode. When you try it is 56K mode it loads the next and prev buttons but the bottom part is just blank. When I use the flash tester I get a compiler error:

Error opening URL 'file:///taz/Employees/Ryan/New%5FDining%5FStuff/restaurant%5Ffeature/undefined'


I don't know what is going on. I have a preloader and it seems to be working perfectly accept that when it is done loading in 56k mode I get the same problem with the image not showing up and the error above. When not in 56k mode it loads so fast you don't see the preloader and everything works perfectly. I am using action script 2. Does anyone have any idea what is going on?

How Work This Blend Mode Mathematically ?
hi all


i need to know how work this Blend Mode :
Layer, Overlay, Hard light, Add, Subtract, Difference, Invert, Alpha & Erase . Mathematically ?



Regards
Crimson

Scale Mode NO_SCALE Does Not Work ?
I have the following code attached to an AS3 FLA with only a Text Field dropped on it at x=1 and y=1. The text scales! This doesn't make sense. Can anyone point out the oversight?

ActionScript Code:
package {
    import flash.events.Event;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
   
    public class ScaleTest extends Sprite {
       
        public function ScaleTest() {
            if (stage) {
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align = StageAlign.TOP_LEFT;
                stage.addEventListener(Event.RESIZE, onStageResize, false, 0, true);
                width = stage.stageWidth;
                height = stage.stageHeight;
            }
        }
       
        protected function onStageResize(e:Event) {
            if (stage) {
                width = stage.stageWidth;
                height = stage.stageHeight;
            }
        }
               
    } // class
} // package

How Work This Blend Mode Mathematically ?
hi,


i need to know how work this Blend Mode :
Layer, Overlay, Hard light, Add, Subtract, Difference, Invert, Alpha & Erase . Mathematically ?



Regards
Crimson

Alpha Blend Mode Just Won't Work [file Example]
Update: I've solved it, for some reason the mask MUST be bitmaped cached (does anyone know why)? It's weird because Erase doesn't need to be that.

This is driving me nuts, how on earth does the alpha blend mode work?
I have finecombed all of the entire internet after info but I can't find the magic answer.

I have set up a test-scene (attached) where I've set it up EXACTLY like described in the manual, so could someone please open it and:
1) See what I've done wrong, or:
2) See if maybe it's working perfectly for you (without modifications), which in that case means something is wrong with my flash.

It's a movie clip set to Layer blend mode, which has 2 children: one green box (no blendmode) and one smaller box (blendmode Alpha).
When running the movie, that smaller box should work as the mask for the green, but it doesn't!
If I change that into Erase instead, it works perfectly, but I need the alpha blendmode to work as well!

Why Fms3 Edge Mode Can't Not Work Like Fms2 ?
Step 1:
Yesterday,I use edge mode with fms2.05 , and I do like this URL (http://www.adobe.com/devnet/flashmediaserver/articles/webcasting_fme_print.html)
PC A run FME 2.5 (flash media encode )+ FMS 2.05 (orgin mode ,use install by default setup)
IP address:192.168.1.1 OS :windows xp sp2
PC B run FMS 2.05 (edge mode ,use install by default setup and modify C:Program FilesAdobeFlash Media Server 2conf\_defaultRoot_\_defaultVHost_Vhost.xml , "local" ->"remote" )
IP address :192.168.1.2 OS: windows 2003 sp1
PC C run a viewlive.swf made by me like this:
---------------------------------------------------------
nc = new NetConnection();
nc.connect("rtmp://192.168.1.2/?rtmp://192.168.1.1/live");
nc.onStatus = function(info) {
if (info.code == "NetConnection.Connect.Success") {
createNetStream(this);
}
};
createNetStream = function (nc) { ns = new NetStream(nc);myvid.attachVideo(ns);myvid.smoothing = true;ns.play("test", -1);};
---------------------------------------------------
I can see the live webcasting on PC C, all think is OK !

Step 2
Today , I install fms3.02 instead of fms2.05 in PC A and PC B, do the same thing like Step 1
but run the viewlive.swf can't see anything.

I check PC B : C:Program FilesAdobeFlash Media Server 3logscore.00.log
-----------
2008-05-2418:33:143480(i)2581231Core (3480) connected to admin.-

2008-05-2418:33:143480(i)2581246Core (3480) sending register cmd to edge.-

2008-05-2418:33:143480(w)2631008Asynchronous I/O operation failed (Failed to attach to completion port: 参数不正确。 87).-

2008-05-2418:33:153480(i)2581234Core (3480) connection to admin accepted.-

---------------------

Asynchronous I/O operation failed (Failed to attach to completion port: 参数不正确。 87). Why ?

Should anybody can help me?



























Edited: 05/24/2008 at 03:41:50 AM by itiger88

Masks Work In Preview, Not In Test Movie Mode
Does anyone know a reason why a mask would work when i run the timeline (by hitting the enter button) but if i "test movie" the mask does not work?

is there a switch or something? i can't figure this out...

Why Don't My Roll-overs Work In Full Screen Mode?
As the title suggests, this is a pretty simple one - my button rollover / rollout states don't work when the site is in full screen mode, although the onRelease functions still do...

Any ideas?

Making Monitor Ratio Work With Fullscreen Mode
Hi everyone,

I'm creating a presentation in Flash that will be projected onto a large screen. I'm using fscommand("fullscreen", true) to make it fullscreen. Since I don't know in advance what type of playback monitor will be used, apparently there may be some issue with the monitor ratio not being 4:3 which would make it widescreen. I was told to make sure the animation etc extends beyond the Stage frame so that it accommodates widescreen but I'm not sure how to do this - I mean how do you know how far beyond the stage to extend things? Since I don't have access to the playback monitor I can't test on it and the presentation will eventually be put onto a CD ROM where viewers may have all types of monitors. So I guess the question is how can I be sure it'll look correct on all monitors in fullscreen mode?

Would really appreciate any advice.

Thanks

Keys Don't Work W/ WMODE (window Mode) In Mozilla
In my publish settings ive adjusted my Window Mode to transparent to prevent 10-30% slow down that usually occurs in a browser. however, in mozilla, the movie still runs slower and a whole bunch of scripts dont run.

ive heard this is a common problem and that i can be fixed but i cant find out how anywhere on the net. can someone please help me? it works in internet explorer.

Making Monitor Ratio Work With Fullscreen Mode
Hi everyone,

I'm creating a presentation in Flash that will be projected onto a large screen. I'm using fscommand("fullscreen", true) to make it fullscreen. Since I don't know in advance what type of playback monitor will be used, apparently there may be some issue with the monitor ratio not being 4:3 which would make it widescreen. I was told to make sure the animation etc extends beyond the Stage frame so that it accommodates widescreen but I'm not sure how to do this - I mean how do you know how far beyond the stage to extend things? Since I don't have access to the playback monitor I can't test on it and the presentation will eventually be put onto a CD ROM where viewers may have all types of monitors. So I guess the question is how can I be sure it'll look correct on all monitors in fullscreen mode?

Would really appreciate any advice.

Thanks

Sound Won't Play In Publish Mode
I have class inside of package which I am importing in my .fla file. That class is also loading .mp3 file.

Everything is working normaly with Test Movie mode, but in Publish mode won't play loaded sound.

Please help.

Slide Presentation Mode Using Sound File
Hello,

I am working in Flash Slide Presentation mode. I have a started a sound file playing on the "master" slide and I want it to play throughout my entire presentation. However, on a couple of slides, I want to play some short voice clips. How can I "turn down the volume" a bit on the main sound file so as to hear the short voice clips? And then turn it back up when the voice clip ends?

I understand basic Actionscript. Can anyone tell me the code or point me to a tutorial which I can use to accomplish this?

Thanks in advance.

FLV Playback Controls Don't Work As Expected
Hi

I have a FLVPlayback component that I feed with flv through the url paramterer.
The movie loads and play fine, but I the controls do not work as expected.

Eg. If the movie has ended I can not rewind and play it again (without reloading the host page)
Does anyone know whats wrong here?

Thanks in advance

T

Little Help With Sound Playback
Hi all,

I'm making this educational movie. It's basically a PPT presentation with all the individual slides grabbed into jpegs and converted to a Flash movie (with forward/back arrows for users to navigation in a non-linear way).

On each slide there is a short narration about the current slide.

My problem..
When the user clicks forward or backwards, the current sound file doesn't stop. I need it to stop because the narration for the new slide will start automatically and overlap with the narration that is playing.

I tried using Sound.stop on every frame but it doesn't work!

Thanks a lot for viewing!

Help With Sound Playback
I am currently working on a flash presentation which simulates a phone automated attendant, and I am having trouble getting the sounds to function properly...I need to get the menu that is currently playing to stop when a button is pressed, and the next message to begin...currently, the sounds simply overlap, and if you click around a little you end up with a garbled mess of tracks playing. I would usually simply look up the code, but I'm on the road and I have to run this presentation in two days.
currently the sounds are loaded from the library, as the presentation will be run locally, but if this will be easier to do dynamically, I just need to know how.

if someone could help out it would be greatly appreciated.

Media Playback Component Wont Work
I have put a media playback component on my stage selected mp3 in the inspector. I have imported my mp3 song into the libray it plays fine, but when I test movie its just blank with a text saying player in the middle of the component. Also can I just link my mp3 from the hard drive to play in the media component with test movie, because it only gives me a URL window in the inspector. I went to the help and follwed the simple instructions " create a new doc etc" and it gave me a Adobe URL to test the player and it worked perfect but when I do it I am getting nothing........this seems really simple but not having much luck.....antony ps....I am using the trial flash 8 pro and a flash template a freind gave me.

FLV Playback Component - AutoRewind Doesn't Work?
I'm trying to make a quick video that loops when it completes, using only components (hence the quickness).

However, I've set the autoRewind parameter to true and it does not replay itself upon completion. I checked the help file and as far as I can tell that's what it's supposed to do.

Does someone know why this wouldn't be replaying? Is there something I'm missing? Ideally I would like to be able to display a movie clip that has a button to replay the video, but if it auto replays that's just as well.

Thanks guys (or gals)

Question: How Do I Go From Expert Mode To Normal Mode And Visa Versa
in the Actionscript pane? I own Flash MX 2004 Professional. Thanks for your time!

Fast Sound Playback
Im dynamically loading mp3's with sound.loadSound(). However when the mp3s playback they play at super fast speed! Like a 30 second mp3 takes 2 seconds to playback. Anyone hear of anthing like this before.
I appreciate any help.
--AQ

[MX] Sound Playback Issue
Hello,

I'm a bit confused. I have created a sound object and am controlling it with movieclips (that are nested inside quite a few other movieclips. The stop, back and forward buttons all work but the play button dowsn't (even though the code is almost identical. The onRelease works as the trace command works ok, its the _root.musicloop.start(); that doesn't seem to work. Here's my code below. Apologies for cross posting but no one seemed to be able to help me in the sound forum.

Thanks for any help,

G.


Code:
//the controls
var playbutton = _root.sectionholder.sectionstrip.createEmptyMovieC lip("playbuttonholder",1002);

//play button
playbutton.createEmptyMovieClip("playb",2000);
playbutton.playb.loadMovie("playbutton.jpg", this);
playbutton.playb._x = 200;
playbutton.playb._y = 250;
playbutton.onEnterFrame = function(){
playbutton.playb.onRelease = function(){
_root.musicloop.start();
trace("here");
}
};

//the stop button
var stopbutton = _root.sectionholder.sectionstrip.createEmptyMovieC lip("stopbuttonholder",1001);
stopbutton.createEmptyMovieClip("stopb",1000);
stopbutton.stopb.loadMovie("stopbutton.jpg",this);
stopbutton.stopb._x = 150,
stopbutton.stopb._y = 250;
stopbutton.onEnterFrame = function(){
stopbutton.stopb.onRelease = function(){
_root.musicloop.stop();
}
};

[F8] Sound Not In Sync On Playback
I'm having problems getting my soundclips to play at the right time on the timeline. When I preview my movie it starts out in sync and then about the 4th scene the sounds go out of sync and are to early. The movies not very big in size and i've just started it. Any body know how to fix this? Also, all the sounds are set to stream.

Importing WMV, No Sound On Playback
Imported a WMV into a fame and it plays ok, but no sound?

Does anyone know what I could be doing wrong?

File/import/ select file, open



Thanks

Record & Playback Sound
Hi,

I'm looking into enabling a user to record a voice in the flash player and play it back to them. I have no need to save this file, it's simply a speak and playback feature. The only methods I've seen utilise the Flash Media Server, which seems a bit overkill for my requirements. Is is possible to capture sound and play it back or is FMS the only way?

Cheers,
Scott

Playback Component & Sound
Is it possible to access the sound ByteArray coming from a PlayBack Component? How do you get to that data.

Hiccup On Sound Playback
Hello,

I'm trying to make a simple sound app that fires off sounds on key presses. The problem that I'm running into is that the sounds themselves don't always play instantly. There's often a very small hiccup which makes something like tapping out a beat impossible. I ran into a similar problem while trying to move a sprite around the screen but solved that with a different key reading routine. I'm using that same routine here but the samples don't seem to interrupt properly - unless for some odd reason it's started as a looping sample, in which case the playback is perfectly responsive.

In my main loop I've tried updating with frame enters events as well as timers which both seem to have more or less the same result. I haven't worked much with sound in AS3 so maybe I'm just missing something critical here? The samples in question are imported wav files which don't have any silent gaps.

Any help would be greatly appreciated. thanks...

Sound & Playback Head
This is a somewhat really silly/simple question.

I have a sound file, which I want to animate mouth movements to - is there anyway you can use the playback head to play and stop the sound so you can tell when words occur? Just like you can in say, Premier?

Currently, I'm listening to it in my sound player, and writing down what second it occurs and then finding that second in my flash timeline etc. It just seems like there should be an easier way about it?

Thanks guys.

Continuous Sound Playback?
Hi.

Can you please help me in getting continuous sound playback on Flash MX 2004? I have a Flash document with imported sound playing automatically in the background. I have links on this document to other .fla's and I would like the sound to continue when you click on the links. Is it possible?

At the moment, all I have is the song starting from the beginning when I click on the next link.

Please help!!!

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!

Normal Mode Vs. Expert Mode? And Actionscript In General.
If anyone can help, please do because I'm going crazy and I've been losing sleep and going through some mild depression. I know it sounds ridiculous, but actionscript is not my friend right now. I'm a designer, not a programmer and I'm just NOT getting actionscript. I've purchased 3 books on the subject and I'm still confused. One book will tell me to start off using "Normal Mode" so I can just select the actions on the left side of the "actions window". Another book will tell that I should immediately switch to "Expert Mode" because that's the best way to learn actionscript.
I'd rather learn how to type in the code instead of clicking on pre-made actions. I was wondering if you guys actually type all of your code in manually or do you occasionally use the given commands on the left side. I need to know so I can decide on how to approach actionscript.
Another thing, does anyone know a good on-line site where I could get the basics of actionscript. To be honest, what I need actionscript to do for me right now is to build a simple horizontal sliding menu. I've plenty of these on several "tutorial" sites but I want to make my own but I need the basic knowledge to do so. What should I start to learn right off the bat? Variables, properties...? Oh, and when I want to set a variable do I type var = x; or do I type Set variable = x. I'm confused. Please help.

-MX04 Actionscript Normal Mode&expert Mode?
I have just starting Flash MX 2004 and cannot figure out to switch in the actionscript between between normal mode and expert mode.

Does anybody know how?

Action Script - Normal Mode Vs Expert Mode
Hi I am still using flash MX as when I upgraded to flash MX 2004 profesional have found it really difficult to actionscript since I never found the way how to switch to the normal mode available in Flash MX does it exist or has it been completly removed ?

Does flash 8 has the same feature missing ?


silv

Sound File Playback Problem
i imported a sound file into my library and shortened the file to play a specific section but when i publish preview the movie thesound plays about 2 seconds longer than i originally set it up to. any help with this frustrating problem would be helpful and appreciated

thank you

Sound Playback- Interesting Challenge
i need a piece of script that will allow me to unmute random parts (named soundObject_1 to 5)

the prolem i have is telling flash not to start unmute a clip once it has already been unmuted, whilst maintaining the random eliment.

it needs to also, once all 5 are playing, reverse the action, in that it randomly mutes the sound objects till silence occurs then the whole process is repeated.

each action should occur on a roll over

Sound Playback- Interesting Challenge
(post also appears in actionscript section)

i need a piece of script that will allow me to unmute random parts (named soundObject_1 to 5)

the prolem i have is telling flash not to start unmute a clip once it has already been unmuted, whilst maintaining the random eliment.

it needs to also, once all 5 are playing, reverse the action, in that it randomly mutes the sound objects till silence occurs then the whole process is repeated.

each action should occur on a roll over

Behaviors:controlling Sound Playback
Hello, I need help with an animated door (button) I created. When I click on it I want it to open and play a sound. It opens fine when clicked on release, but the sound isn't working right. It plays right away when the flash file loads and plays opposite the time I want it to. (when the door is closed) The door button I have is a movie clip with another layer in it for the sound, so I thought both the animation and sound would react together when I applied the goto and play behavior to it. I applied the behavior in the main timeline. What am I doing wrong?

Sound Button Playback Question
hi guys. i'm currently using flash 5.
I'm making a game where you click on the buttons to hear different words spoken by an animated character.
i'veworked out getting the buttons to play the different sounds.
My question is . Is there a way I can get it where the user can pick a selected number of words from different buttons, and have them played back one after the other, like they are making the character speak ?
for example ;
button 1 plays "Hi"
button 2 plays "how"
button 3 plays "the"
button 4 plays "are you?"
they then click 1,2,and 4, and "play".. the sentence is played back for them.
"Hi, how are you?"
I hope I didn't confuse anyone with my explanation

and thanks in advance for any help

[F8] Sound Playback Looping Problems
I have a sound added directly to my timeline. Im trying to time my graphics to it..

When I hit ENTER to test the timing of the animation to the sound, the sound keeps playing even after I manually stop the timeline bar.

You used to be able to manually grab the bar and take it backward and forward and the sound would rewind as well, so you could effectively time things.

Is there a setting or preference in Flash that Im not aware of????? I cant find it anywhere in the interface.

HELP ME PLEEZ!

[CS3] Controlling Sound Playback Speed
Hi guys. I was just toying around with trying to get a script that could control sound playback. I'm getting close, but the playback is very choppy.

Here's the first script I've came up with. It's almost working, but it is very choppy.


Code:
//AS2
SoundObj1 = new Sound();
SoundObj1.attachSound("testsound")
SoundObj1.setVolume(25)
frames = 0
fps = 33
everyframe = function(){
SoundObj1.stop();
SoundObj1.start(frames/fps, 1)
frames+=.5
//Playback speed should be halved.
}
onEnterFrame = everyframe


So I thought, okay, I'll just add an extra sound on top of the gap to bridge the choppyness, but it resulted in the same effect as above. Why wouldn't it? One sound starts and another stops... making it a needless extention on the previous script.

So finally I realised I would need 3 sounds over interval-looped frames to get the seamless sound effect I want...


Code:
//AS2
SoundObj1 = new Sound();
SoundObj1.attachSound("testsound")
SoundObj1.setVolume(25)
SoundObj2 = new Sound();
SoundObj2.attachSound("testsound")
SoundObj2.setVolume(25)
SoundObj3 = new Sound();
SoundObj3.attachSound("testsound")
SoundObj3.setVolume(25)
frames = 0
frameswitch = 1
fps = 33
everyframe = function(){
if(frameswitch == 1){
SoundObj2.stop();
SoundObj1.start(frames/fps, 1)
}else if(frameswitch == 2){
SoundObj3.stop();
SoundObj2.start(frames/fps, 1)
}else if(frameswitch == 3){
SoundObj1.stop();
SoundObj3.start(frames/fps, 1)
}
frameswitch++
if(frameswitch > 3){
frameswitch-=3
}
frames+=.5
//Playback speed should be halved.
}
onEnterFrame = everyframe


It seems slightly improved... but only very slightly. Any ideas?

~TheWaste

Looping Sound And Controlling Playback
I'm new to Actionscript and also new here. I've seen a lot of posts on this topic here and elsewhere, but forgive me, as I am having a hard time getting my particular Actionscript to work.

My goal is to have an external mp3 start playing by default, then continuously loop back to the beginning and play each time it reaches its end. All the while, I need to be able to play and pause the mp3 with buttons. So far, I believe I have everything working correctly EXCEPT for getting the sound to loop while retaining the functionality of my buttons.

Here's what I have so far:



ActionScript Code:
var soundReq:URLRequest = new URLRequest("15 Au Revoir.mp3");
var sound:Sound = new Sound();
var soundControl:SoundChannel = new SoundChannel();
var resumeTime:Number = 0;

sound.load(soundReq);

sound.addEventListener(Event.COMPLETE, onComplete);


function onComplete(event:Event):void
{
    soundControl = sound.play();
    pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
}
   
function playSound(event:MouseEvent):void
{
    soundControl = sound.play(resumeTime);
    pause_btn.visible = true;
    play_btn.visible = false;
    play_btn.removeEventListener(MouseEvent.CLICK, playSound);
}

function pauseSound(event:MouseEvent):void
{
    resumeTime = soundControl.position;
    soundControl.stop();
    play_btn.visible = true;
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    pause_btn.visible = false;
}

Any advice is greatly appreciated. Thanks!

Synconizing Sound Files During Playback
I'm trying to create a drumbox with multiple looped sound tracks. The user will have the ability to turn on and off sounds (e.g. hi-hat, snare drum, bass drum, etc). I've figured out how to start and stop sounds, loop them, and remove any unwanted delay between loops, but I can't figure out how to synchronize the files to one another. For example, if track 1 is playing and I turn track 2 on, I either want it to wait until track 1 is ready to start the next loop, or for track 2 to start at the position Track 1 is already at, so they are synchronized together.

Any idea how to do this?

Dave

FLV Playback Sound Dosen't Play
Hi...

Can anyone solve my problem... I am creating a CD presentation using Scene's each with different section (i.e. About Us, Services, etc...) in Flash 8.0 with only background sound track. One Scene consist of a video's where I have used FLVplayback component. What I need is that when user enter's video section the bg sound should get paused. It should not interfere with the video.
And I have done so. But its not working. The sound gets paused also the sound of video can't be heard. Can anybody help me out.

Pausing Playback & Its Sound With A Button?
I am building a presentation in Flash. Right now the entire presentation plays from start to end. But I need to know how to pause the presentation at will by pressing a button on the stage. Also, I need the sound files (the voice-over work) to pause as well when the 'button' is pressed. And of course, to resume playback when pressed again. Can anyone help me out? Thanks!

Buffering External MP3 Sound Before Playback
Does anyone know of a way to buffer a fixed amount of seconds to an external MP3, before playback?

My MP3 is background music.

I know that with the Sound Class you are limited to Event and Stream types. Loading in n MP3 through Sound.loadSound method you can set the "isStreaming" parameter.

Set to true, the stream comes in at anypoint and stutters throughout the songs download. Which is plain awful.

Is there a way to buffer an MP3 like you would for an FLV. Say create a NetConnection and stream through that way, using the buffering capabilities of NetStream.

My Question then is how does someone convert an MP3 to a non-video-like FLV?

Is this at all possible? Anybody done this before?

Trouble With Sound Playback Using Hit Test
I've got a file that I want to start and stop a sound clip that dependant to the mouse position on the MC.

Here's the code attahced to my MC:

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
mySound.start(["emerge"])
} else {
this.prevFrame();
mySound.stop(["emerge"])
}
}



Does this look right? I get no sound when I publish it. Linkage is good.

Pause- Playback Of Sound Objects Question
im using sound objects.

here is my main time line code.

// Init the names of music array
SelectionArray = new Array();
SelectionArray[0] = "and she walks in";
SelectionArray[1] = "can i buy you a drink";
SelectionArray[2] = "the stand off";
SelectionArray[3] = "breakdown";
SelectionArray[4] = "fistful of samples";
SelectionArray[5] = "standing";
SelectionTotal = SelectionArray.Length;
// default sound is first one
SelectionTitle = SelectionArray[0];
MusicSelection = MusicText;
MusicSelection.Scroll = 1;
Music = new Sound();
Music.Attachsound("Music1");
Playing = false;
PauseMusicTime = 0;
stop ();

here is the selection buttons MC code.

// select the music
on (release) {
Selection = _root.MusicSelection.Scroll;
// check if playing
if (_root.Playing == true) {
_root.Music.Stop();
}
// determine sound
if (this == _root.HighLight2) {
Selection = Selection+1;
} else if (this == _root.HighLight3) {
Selection = Selection+2;
} else if (this == _root.HighLight4) {
Selection = Selection+3;
} else if (this == _root.HighLight5) {
Selection = Selection+4;
} else if (this == _root.HighLight6) {
Selection = Selection+5;
}
// attach music
_root.Music = new Sound();
_root.Music.Attachsound("Music"+Selection);
// clean up
call (_root+".Clean Up");
_root.SelectionTitle = _root.SelectionArray[Selection-1];
}

here is the play button code.

on (release) {
// check if music paused
if (PauseMusicTime == 0) {
Music.start(0, 100);
} else {
Music.start(PauseMusicTime, 1);
}
startMusicTime = getTimer();
PauseMusicTime = 0;
Paused = false;
Playing = true;
}

here is the pause button code.
// pause music playing
on (release) {
PauseMusicTime = (getTimer()-StartMusicTime)/1000;
Music.stop();
Paused = true;
Playing = false;
}

here is the rew button code.

// rewind music and play from beginning if not paused
// if paused just rewind
on (release) {
Music.stop();
if (Paused == false && Playing == true) {
Music.start(0, 100);
} else {
PauseMusicTime = 0;
Paused = false;
}
}

here is the stop button code.

// stop music playing
on (release) {
Music.stop();
PauseMusicTime = 0;
Paused = false;
Playing = false;
}


pause works wrong exactly like stop, i dont understand why though.

also play will if double clicked start 2 instances of the song that will both play.

whats wrong with this code?

please help.
[Edited by shockeffects on 08-09-2001 at 11:17 AM]

Sound Object Playback Problem -- Too Fast?
Has this ever happened to any of you?
I'm playing a sound via the sound object linking to an mp3 on my server.
I've done this many times and it works great except that maybe one or two of the sound files play back at double speed? Doesn't make any sense.
I've playing the mp3 on its own and its sounds fine. But when I link to it through my flash movie it streams in and plays really fast.

Interactive Record/playback Sound For Website
Want to make a "game" where kids can record their own songs on a website. Basically they will have 12 or so graphics that play sound on mouseover but will also have the option of recording a series of sounds and then playing them back. I'm sure there is a very simple solution?? Any ideas or helpful hints would be greatly appreciated! Thanks in advance.

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