ActionScript 2.0 :: [MX] - Controlling Sound Of FLV Files
Nov 21, 2002
I've am trying to create a sound control to control the sound of an imported FLV file. The problem is like this. I recorded a video using a video camera and than using the iMovie, I've converted the movie to QuickTime format. Than I use Sorenson Squeeze for Flash MX to compress the video. I manage to compress the files into FLV format and than imported it to my Flash file. Now I want to add a sound control to the movie to control the volume.
I need to allow users to preview audio files for purchasing. I have CF pages that return records form a SQL database. Each record contains the same swf file however, each swf file points to a different mp3 for previews of different audio examples. So far, everything is working fine. My problem is that I need to be able to stop the sound from one swf when I click to play a second swf .The only solutions I see in Flash forums deal with loaded swf files. These are not loaded files they are separate files within a page. The question is: How do control one swf from another swf in the same page.The following items have not worked: soundChannel.stop();,soundMixer.stopAll()
I used a template from a flash template website but I just realized that the background control was written to control all sounds, now all the video sound and seperate sounds objects stop when I click on this one button. This is the code below that I found on the button. There are others also.
I have a child SWF with a linked sound that I want to control from the mother SWF. In the child SWF there are different linked sounds in separat frames. The "Control system" is in the mother SWF.
I'm doing a project that I have to use scenes in, I have a sound object that i want to be able to control in all scenes. I set up global variables for the sound object and a boolean to check if the sounds currently playing like this : PHP Code: _global.sound1= new Sound(); _global.sound1.attachSound("song"); _global.soundplaying = 0;
In each scene I have two buttons a stop and a play button, Heres my code for play: PHP Code: if(!_global.soundplaying){ _global.sound1.start(); _global.soundplaying = 1; }
And stop: PHP Code: _global.stewielaugh.stop(); _global.soundplaying = 0; Doesn't seem to work, if I press play in scene one and go to scene 2 and then return to scene one the sound can be played again on top of the already playing sound object.
I'm making an application and I can't seem to find a way to control my sound of an external SWF(SWF2) from the main one(SWF1).Here is the code I'm using to control the timeline of external SWF that is placed inside of the main movie
Code: var loadAnimBox:Loader = new Loader(); var vid_mc:MovieClip; function startLoading():void {
I have a button on my main scene which creates the varaiable "soundoff", then if one of the placed swf's when loaded detect the variable it stops all sounds,
if(soundoff == true){ stopAllSounds();
This works fine but does not target sounds placed in movieclips in the loaded swf's timeline. I've tried targeting them with the _root. command and using linkage but I can only stop the sound in the main timeline level.
I have a loaded SWF file in _level1 that has audio in the timeline. I am trying to control the volume of this loaded SWF with a 'mute' button in the main SWF file. On the first frame I'm using the code:
my_sound = new Sound(_level1); and then on the button script I have: mute_btn.onPress = function(){ my_sound.setVolue(0);//mute volume }
but it's not working. Is the new Sound(_level1) not valid?
I now changed my movie up to where a "empty movie clip" is created that plays songs on maintime of movie. However, I still want to have a tab where it says "sound controls" be automated so that when users roll over it, it slides in and shows controls for sounds instead of them always being present. This roll over effect is the simple AS:
I now have my sound clip working in a container swf (level0).. Can I control this sound clip from other levels that have been loaded into level 1 from the container swf?Would it be something like
PHP Code: _level0.mysound.setVolume(30);
If so, where do I name the music 'mysound'? I have simply dragged the music into the main timeline. Would it be better if I loaded it externally?
When i play the Main SWF the volume is 0 which is good, But when i click on the button to load the 2nd SWF the sound comes on for both FLV's when i want the 1st FLV to stay at 0 volume and the 2nd FLV to play with sound at 100.
I am trying to create a movie that has 3 different background sound loops for the user to choose from as well as an on/off button.I followed one of the Kirupa tutorials which enabled me to create 3 different buttons that linked to the 3 sound loops in my library. The problem is that I don't know the actionscript required to stop whatever clip is playing and play the newly selected background sound chosen by the user.Also I am trying to have one of the loops playing when the movie starts as a default, and also to have a mute button
I have a loaded SWF file in _level1 that has audio in the timeline. I am trying to control the volume of this loaded SWF with a 'mute' button in the main SWF file. On the first frame I'm using the code:
my_sound = new Sound(_level1); and then on the button script I have: mute_btn.onPress = function(){ my_sound.setVolue(0);//mute volume }
but it's not working. Is the new Sound(_level1) not valid?
how to assign a volume control component available in the video components library to an externally loaded swf once it's loaded into my main flash movie? I want to feature the volume control at the bottom of my main flash so that when you click a button to load the swf that volume control will be able to start controlling it's volume. Also, I want to be able to load several swfs and once each one is loaded--only one playing at any given time--into the main flash that same volume control can control them. Is this possible and, if so, how do I do it?I'm using CS5.
I have a flex application in which multiple sound files are used in various parts of the application. Can i have a single sound handler, which will take care of volume control fo the entire application at once. How can i do that
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.
first off, this is going to be a desktop application, not intended for the web. Ok, with that said, I need to be able to copy a file from one place in their comptuer and paste it on their desktop.
trying to create a universal fla file (shell.fla) in which I can load any swf file and control it from buttons in the shell itself. The buttons being play, pause, rewind, magnify etc.I�ve done all this in AS2 and now I have to do it in AS3. See my website [URL] E-Training - Motor to get a better idea of what I mean.The shell file has three buttons so far with instances called playMovie, stopMovie changeMovie and a dynamic text field - movieNumber. It is bound to the class Shell. The swf files to be loaded are numerical 1.swf, 2.swf, 3.swf etc. If I can get playMovie, stopMovie to work I can then do the rest.Here is my code so far for the class Shell.as:
for example i have a two pages, in page 1 theres a sound thats playing, but if i will try and go to page 2 the sound will stop, but if i will go back to page 1 the sound will be played again..
I have just recently purchased Adobe Flash CS5 and have read through the entire "Classroom In A Book" for Adobe Flash CS4 Professional. However, the book never went into much detail into what I am trying to do. I'm creating a website for me and my fiance because we have formed a classical guitar and flute duo and want to exhibit some of our recordings. I have the buttons for the recordings created with their corresponding sound file. However, I cannot figure out how to stop the file when I click on another button recording; if I click all buttons, all sound files just keep playing simultaneously.
I am having problems controlling my sound objects. When the user clicks on a mc on the stage a sound (voice over) starts to play. But if she decides to listen to another sound, she can click on another movie clip...Problem is that when the user clicks on the second movie clip the first sound is still playing while sound number two starts playing as well. I would like the second sound object to replace the first...shouldn't this be possible by using the mySound.stop(); before initiating the new sound object.
Here is part of my code:
Movie Clip one:
on (press) { mySound=new Sound(this) mySound.attachSound("voice_one") mySound.start(0,1);
What I am trying to achieve is the following: I have a main file (main.swf) Within this movie i have 5 buttons; Nos. 1-5. When released each button will load an external swf movie clip: e.g: button 1 will load "1.swf", button 4 will load "4.swf", etc.
However, this is where I am stuck; each external swf movie clip has its own lead in animation as well as its own lead out animation. So say for example I release button 1, "1.swf" will load and play its lead in animation before it reaches a certain point in its playhead with a 'stop' command. Then lets say, for example, I then release button 3. What I would like it to do is play the lead out animation of "1.swf" before it plays the lead in animation for "3.swf". Obviously I would want this to happen regardless of what button I press, so therefore I would want it to play the lead out of the loaded movie before loading and playing the corresponding swf file of what button I pressed. Would I use loadMovNum or load the swf within a movie clip container?
im new to flash programming stuff. im was searching something for a project,ok basically i need something like this..:lets say there is and image file.. or php or asp file.. if someone tries to see this image over the browser, or file... under any condition, my flash movie, for ex. starts to play, so i think i need something like external data to control flash?