IDE :: Sound Of External Swf?
May 13, 2010when i load external swf inside main swf through loadClip then sound of external swf does not play.
View 3 Replieswhen i load external swf inside main swf through loadClip then sound of external swf does not play.
View 3 RepliesI am working on controls for an external swf. The external swf loads an external sound file. The structure at the moment is extswf.swf contains mcSound which loads soundfile.mp3. extswf.swf automatically starts playing when invoked. movieController contains the icons for the play/pause buttons. This is assigned CntlClass. CntlClass loads extswf.swf and controls the play and pause buttons.
So far, the play and pause buttons stop and start and stop the movie but not the sound. I know I need to access the sound channel from the external swf and use the sound transform to change the volume. How to access that channel is unknown. The examples I find have imbedded sound files. Also, the examples seem to use the main class for the external swf. My external swf doesn't have a class file, so I have no idea what the main class would be.
In trying to activate the remainder of the pause button, I find that using MovieClip(loader.content).channel.position always returns 0. I've tried numerous other combinations to access the position of the sound for the play function to resume correctly. The visual part of extswf.swf stops and starts exactly as it should.
In CntlClass:
public var loader:Loader;
public var movie_mc:MovieClip;
public var soundResume:int = 0;[code].........
I have created a Flash container movie (mainContainer.swf) that cycles through an array loading in several external swf files (animation1.swf, animation2.swf, animation3.swf, etc.). Once the user clicks the next button, the next swf is loaded, and so on...
What I need to be able to do, is to control the sound of the external swf files from the main container. Specifically, I need to be able to pause and play/resume the sound of the external swfs, but not quite sure how to access the external swf's soundChannel from the main container swf. My client recently wanted to add in a "pause" feature, and while I have been able to pause the external swf's animation, I cannot target the external swf's sound - it just continues playing while external animation is paused.
I can successfully pause/resume the sound (song.mp3) if the soundChannel is defined from within the same swf (using code below); however, I cannot seem to figure out how to communicate between the parent and child swf, if the parent is requesting the pause action, and the child swf is the one that loads in the song.
[Code]...
I'm trying to set a volume to my external sound. I'm using the following code, there're no errors, but the volume is not affected...
var req:URLRequest = new URLRequest("squeeak3.mp3");var sound:Sound = new Sound();var controller:SoundChannel = new SoundChannel();var myTransform = new SoundTransform();myTransform.volume = 0.2;controller.soundTransform = myTransform;
I'm trynig to control an sound of a external SWF but I can't seem to get it right,here is the code i'm using to import the sound
mport flash.media.Sound;import flash.net.URLRequest;import flash.display.Sprite;import flash.media.SoundChannel;import flash.events.Event;import flash.events.MouseEvent;var _som1:Sound;var _channel1:SoundChannel;var _playing1:Boolean = false;var[code]...
I wrot a FLA in AS3 which is basicaly a nicly designed Loader which loads little cute SWF games. Each game is built a bit differently and has its own 'thing'.I was wondering, how can I control the sound of the SWF's from the Loader File?
Which leads me to a wider issue of how can I control variables of a loaded SWF.
Urgent help me load a external sound in action script
View 0 RepliesI am trying to control external swf sound and I have created volume slider. But when I am running the code I am getting following error..
ArgumentError: Error #2068: Invalid sound.
at flash.media::Sound/play()
at volumeControl_fla::MainTimeline/volumeControl_fla::frame1()
[Code]....
i.e. when I load theexternal swf..how to catch the sound embedded in that swf
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 {
[code]....
I'm using external swf in a project, and I got one swf with startup audio play, I can't stop the sound to play when I load another swf via this code :
Code:
clearButtons();
TweenLite.to(m.target, 0.5, {tint:0xcc0000});
m.target.mouseEnabled = false;
[Code]....
I have created a Flash container that cycles through an array loading in several external swf files. What I need to be able to do, is to control the sound of the external swfs from the main container. I would like to be able to pause and play/resume the sound of the external swfs, but not quite sure how to accomplish this, as I am newly migrating to AS3. Some of the sound is embedded in the external files, while others load it in via AS.
I was able to successfully pause/resume the animation of the external files, but cannot get the sound to pause - it just continues playing while the animation is stopped.
How can I pause and resume the sound of my external swfs from my main container?
i am trying to control sound on an external swf.
the sounds that i have is on a swf file that has my "container" MC that loads up all of my external swfs.
the sound controller is on my external swfs.
I have a Loader that loads external SWF. The external SWF has sound. I'd like to stop, pause and play the sound.
[Code]...
This only mute the sound only and the sound is still runnung.
Is there any simple way you can access a very short sound file in flash without having to play it in an flv player. its just a ding sound to play when the user hits a button in the presentation.Also is it possible to access an external pic file and then convert it in to a symbol to be used within my presentation.I just don't want to store these files to keep my main swf small.
View 3 RepliesI am pretty dense about flash, pretty new to the software so bare with me. So on the main .fla i have linked to a button to open the external swf mp3 player. That Mp3 player is streaming a song with the code var req:URLRequest = new URLRequest("mysong.mp3"); snd.load(req);
the mp3 is in a folder which is located in the same place as both the .fla and .swf mp3 player. Streaming the mp3 works when testing the swf. but there is no sound when testing the linked swf mp3 player in the main .fla. It's like the file path messes up but i dont know how to go about fixing it?
I have the following program to play a .flv movie on a webpage made by myself:
var Xpos:Number=0;
var Ypos:Number=0;
var swf:MovieClip;
[Code].....
When I publish the preview, it works well and I can unload it and kill its sound by clicking on the close button. When I publish the page on the website and load the movie through "loader_btn", it works well, and when I click the close button, the image disappears but the sound is continued.
I have a flash application, some kind of a play-list that loads external SWF video player (I don't have code access to that external file), so users can watch the video or skip to another one. When user switches to another video new SWF file is being loaded.
The problem: If user didn't finish watching the video and skips to the next then I unload previous SWF file (unloadAndStop()) and load a new one. And because the previous SWF was playing it is not actually unloaded, it is still playing on the background (I hear two audio tracks: current and previous).
On a button click the page loads and external swf using the add child function. Once loaded the user can close the "pop up" at any time by clicking the close button. The swf appears without a problem first time round, it is if they go back to click again that causes the problem. If they then try and click the button to view the external swf for another time then no visuals appear - you can hear sound but the videos never appear. I have tried to see if it is hiding behind something to no avail.
Edited code is below!!
ActionScript Code:
var multiPlayer:Loader = new Loader();
var playerRequest:URLRequest = new URLRequest("vgallery_multi.swf");
function showQAMultiple(Event:MouseEvent) {
[Code].....
I'm loading an external swf file that has some sounds in it (to the main swf). The swf contents never leave the movie but it does get pushed to the site when it's not in view.
The user can bring it back in view by pressing on a left/right button. So when it's not in view... or tweening out of view I need the sounds to stop.
Since the loaded swf is never unloaded, what should I look at to accomplish this... communicating with the loaded swf, etc?
So I have a sound file loaded externally in my flash file and I inserted my .swf into my dreamweaver web page but the sound doesn't play, just the animation I have in the flash file. The sound plays fine when testing it out in flash and previewing it in html through flash but when the .swf is inserted into an html page on dreamweaver and then previewing the page in a browser, no sound plays..
View 5 RepliesI have created a flash header that is pulling some external sound from a server and am running into an interesting issue. Here is the code that I am using.
[Code]...
And here is what is happening: I have a preloader on the first frame and after everything is loaded it goes to the second frame and begins playing. If I just preview the movie in flash (Ctrl + Enter) then everything works fine; the music plays my text field is created (the time counts correctly), and the start/stop button works fine. If I then go up to "Simulate Download" to test the preloader and everything, when it loads and goes to the second frame, the music will sometimes play (and cut out), the text field isn't created, the start/stop button doesn't work, and I don't know what the problem is.
I think I have pinned it down to my my_sound.onLoad() function (that I don't think is getting run in the simulated download), but I can't figure out why it would work with a live preview, and not a simulated download.
this works when I test it on my computer. But when I put it online, the bytes progress becomes undefinable / NaN.. I don't know why being online makes a difference.
[Code]...
I am making a set of image galleries which will have looping background music. What are your opinions about the recommended method to bring music in? I am happy with the attachSound and loadSound methods, but wondered whether attaching a soundtrack.swf using loadMovieNum would be better. If so, I only know how to stop and start the music, not pause it and restart where it left off, which is important if I add a narration. Sound Objects seem more versatile because they let you use "position/1000", but from what I have found on the forums I have searched through, I may have to load the swf into a Movieclip or perhaps use _level somewhow?
Here is the code, which works well, but does not "pause" the music, it just stops and starts at the beginning. Code is in the root timeline of my soundControls_mc (play/pause button).
[Flash 8 - AS2]
loadMovieNum("includes/number10.swf", 100);
soundOn = true;
this.onRelease = function() {
if (soundOn == true) {
unloadMovieNum(100);
[Code] .....
I have a main swf that would eventually call out to another SWF file. Both of them have background music playing in them. Both swf runs fine without any error when I tested on them individually(both test movie and running the swf files themselves). But when the main swf calls the sub swf, the music doesn't play which is strange....
this is how I load my music(in both swf):
Code:
private var myMusic:Sound = new Sound(new URLRequest("main_music/myMusic.mp3"));
private var myMusic:Sound = new Sound(new URLRequest("sub_music/myMusic.mp3"));
All the swfs and music resides in the same folder. I am confused, I do not see the reason why the sound doesn't play on sub.swf when the main.swf calls the sub.swf when the main.swf works perfectly fine.
I am making a gun game, and I want to make so that it plays a sound when you click the mouse.I have the sound already imported, and i am using it in an external (.as) file for a pistol. I've spent hours incorporating it into a movie clip, but it either plays over repeatedly or just doesn't even go.Is there any way to do this? Ive tried lots of tutorials before I came here but nothing seemed to work
View 4 RepliesI'va any troubles in controlling sound in an external swf. I need to stop/play/pause it. I've put the sound file on the timeline of the external swf and I want to control it from tha main movie in wich I've load it. the swfs are made using AS2.0
View 2 RepliesI have several flash games and quizzes that I now want to put together as a collection on a CD ROM as a bumper pack to buy. I wasn't sure of the best way to do that but I figured that I can create a flash file with individuals buttons on that when pressed loads that SWF's into the main page and plays which I'll export as a standalone player.
Sound good that's just what I wanted, only problem now is that the sound objects that are in the various games no longer play What do I need to do so that they will play as they do when I play each SWF on their own? (Hopefully without too much re-programming of the original games as there are quite a few)
I have a few animations that run on different scenes each time a scene is loaded the external audio should start with it. Well here is the thing the animation always starts before my audio files and each scene gets bugged. I need to create an action that only allows my scene to start with the audio and also starts loading the next audio so it wont be dellayed.
On the first scene I have the following code:
scene 1 frame 1
var autoPlay:Boolean;
if(!autoPlay){
stop();}
scene 1 frame 2 animation starts and audio 1 loads
import flash.media.Sound;
[Code] .....
I'm porting a simple application from browser-based to iPhone. It plays some external sound files. There are 2 main steps:
1) Load an external XML file that contains sound file paths.
2) Load the sound files.
Can this be done with iPhone or do I need to move everything into the .fla file and then just publish it to iPhone?