ActionScript 3.0 :: Flash External SWF, Sound Not Working
Sep 2, 2011
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.
View 3 Replies
Similar Posts:
Apr 28, 2011
I was trying to import sound file in mp3 format to my flash.It is working fine but after I testing the movie the sound doesn't work.
View 2 Replies
Apr 16, 2010
I am trying to use the id3 tags from second table, output display undefined..
var sound:Sound = new Sound; var url:URLRequest = new URLRequest("1.mp3"); sound.load(url); var player:SoundChannel = sound.play(); sound.addEventListener(Event.ID3, id3Listener); function id3Listener(event:Event) { var info:ID3Info = sound.id3; trace(info.TIME);
trace(info.TRDA);
View 2 Replies
Mar 18, 2010
This is what I have as far as code, it is in the first frame of the movie.
nature = new Sound(this);
nature.attachSound("sound_naturally");
nature.setVolume(50);
[Code].....
I have the sound exporting to ActionScript with the link identifier 'sound_naturally', not exported to the first frame. I don't understand why it's not working. I did like the exact same thing like 3 hours ago and it worked fine, but I lost the file so I had to redo it and now it won't work at all.
View 2 Replies
Aug 8, 2009
I used the tutorial found here. The 3 frames of my button are in a movie clip, within a keyframe in the main timeline. I used the code at the end in the tutorial for the first keyframe, so that the clip begins with music playing. However; I cannot get the buttons to work. I cannot stop the sound.
View 1 Replies
Feb 13, 2010
Has anyone been working on stuff using the Flash Sound API recently? I like working on dynamic audio and was wondering what the progress is on it.
View 1 Replies
Sep 6, 2011
i'm trying to play a sound from left to right using actionscript3. i have putted in the first keyframe the code. what i have wrote is:
Code:
var soundClip:Sound;
var channel:SoundChannel = new SoundChannel();
var trans:SoundTransform = new SoundTransform();
[Code]...
View 1 Replies
Oct 14, 2010
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).
View 1 Replies
Nov 15, 2010
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 Replies
Apr 29, 2011
that have more than 200 sounds , so I cannot just put the sounds in my libray in flash and then instanciate them as class and play them. Because the sound it will play when I click one object is not always the same.I have this function to play background sound , where enters the name of the song I wanna to be played :
public function startMusicBack(music:String):void{
var musicback:Sound = new Sound();
var bgChannel:SoundChannel;
[code]....
View 1 Replies
Aug 20, 2010
Having a problem trying to get the external interface working with as3. My flash file has 2 input text boxes with instances of 'received_ti' and 'sending_ti' and a button with instance of 'send_button'. My html code has a simple form with 'sendField' and 'receivedField' inputs and a submit with a value of 'Send'.
At the moment i can get the flash file to send text into the html 'receivedField' input but cannot send text from html into the flash file's 'received_ti' text box.
[Code]....
View 1 Replies
Aug 26, 2011
I have looked at other questions and online but still cant figure out where I am going wrong I am adding 2 events to a externally loaded swf
One works, and one doesnt?!? the function names are correct so I can see what Im missing
my_loadedSwf = loadEvent.currentTarget.content as MovieClip;
my_loadedSwf.addEventListener(Event.ENTER_FRAME, my_loadedSwf.enterFrameHandler);
my_loadedSwf.addEventListener(KeyboardEvent.KEY_DOWN, my_loadedSwf.myOnPress);
addChild(my_loadedSwf);
[Code]....
set my_loadedSwf.tabEnabled = true; and it now works great
EDITS TO THE ABOVE Actually, it isnt working, I have to press 'tab' to take control of the player
ANSWER
I removed the tab index code and added focus to the loaded swf
View 2 Replies
Oct 5, 2010
I have a flash player with an external javascript interface: reloadData() I'm calling that function via Javascript when editing information on the page - basically to keep data on the page and in the player in synch. The reloadData() function works fine when the player is hosted locally. When we move it to the CDN (Amazon Cloudfront), the player loads successfully, but the external javascript interface no longer works - console.log(player) reveals the following:
<object type=,"application/x-shockwave-flash" data="[our_cloudfront_url].swf" width="920" height="404" id="player" style="visibility:visible;">
Uncaught TypeError: Object #<an HTMLObjectElement> has no method 'reloadData'
I know there are a lot of things that behave differently when working with items on a CDN, but we're using a CNAME to point to the cloudfront distribution
(buildid.ourdomain.net => distributionid.cloudfront.net)
View 1 Replies
Jan 31, 2011
We have a flash game embedded in a web page (using SWFObject v2.2) and there are some links on the page that call into the flash in the following manner:
window.document["flashObjectId"].flashMethod();
This has worked great on all browsers we have tried including IE7 and 8, however on IE9 it generates the following error: "SCRIPT438: Object doesn't support this property or method".
It does work in compatibility mode so I tried adding a meta tag to tell IE9 to use compatibility mode by default, however that didn't work because our game runs in an IFrame within Facebook.
I have tried referencing the flash object every way I could think of in the Javascript but I always get that same error message in IE9.
View 3 Replies
Oct 22, 2010
Im trying to understand alittle more about using external files.
In my flash actionscript window i basicly want to access a function that i wish to put in an external .as file ... but i just cant seem to get it..
like:
Code:
myFunction();
in external file
[Code].....
View 4 Replies
Jul 19, 2010
I 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.
View 5 Replies
Jul 23, 2010
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].........
View 2 Replies
Oct 31, 2004
i have a dynamic text field which i need to load external text into (i.e., a text file w/"&numsections=", etc.) and when i pulled in the scrollbar component it won't scroll, though the data is showing up.
View 2 Replies
Oct 31, 2004
i have a dynamic text field which i need to load external text into (i.e., a text file w/"&numsections=", etc.) and when i pulled in the scrollbar component it won't scroll, though the data is showing up.
View 2 Replies
Feb 6, 2011
I am using an external preloader (loader.swf) to load the movie (ayproj.swf). The preloader works fine when running the .swf file in flash player and when simulating a download in flash cs5 but when i upload it to the internet and open the index.html in which the flash is in a 100% frame it either sticks on 100% (Ff and IE) or just says "pl" (chrome) - the initial text in the dynamic percentage text box.
[Code]...
View 1 Replies
Jun 6, 2008
I'm streaming an external SWF into another movieclip, the external SWF has a timeline animation and sound (voice speech) as well on the timeline, it also has a preloader on it which it's set up that when 30% loaded is completed to start playing the animation.But when I run the main movieclip the streaming of the external SWF works fine for the animation but the sound does not play until the preloader is 100% completed.
View 1 Replies
Mar 27, 2012
i did this
package{
import flash.display.MovieClip;
import flash.events.MouseEvent;[code]...
it works but only one time i wanna the sound keep working after finished
View 5 Replies
May 1, 2004
I have the following problem. I have a attachSound for three wav files in the library. This is the code:
Code:
song1 = new Sound();
song1.attachSound("song1");
song2 = new Sound();
[code].....
This is also working.When I press the button the music stops. When I press the song1 button, song1 start playing again. But when I press on of the othet two buttons nothing happens. This is the code for the buttons:
Code:
on (release){
_root.mc_menu.song1.start();
_root.mc_menu.song2.stop();
_root.mc_menu.song3.stop();
}
View 5 Replies
Apr 7, 2003
I came accross this very comprehensive webpage about sound objects in flash mx about a month ago. Since there has been 2 or 3 threads started about working with sound just today, thought i'd share it [URL]..
View 5 Replies
Aug 5, 2003
firstSound=new Sound();firstSound.attachSound("****");
that's easy...did the linkage thing and it doesn't work..did it with another mp3 file and it worked fine..any idea on what can be causing this particular mp3 not to work when attached with AS?
View 2 Replies
May 1, 2004
I have the following problem. I have a attachSound for three wav files in the library. This is the code:
Code:
song1 = new Sound();
song1.attachSound("song1");
[code]...
View 5 Replies
Apr 11, 2009
I have a button that rotates a wheel 90 degrees each time the button is pressed. What I'm trying to do, is play a sound when the wheel stops at each rotation. So something like this:
Wheel rotates to 90 degrees.
90 degrees = sound #1
Sound #1 plays once.
The rotation works fine, but the problem is, when I tried to do this I put in a statement that with my wheel named "wheel" if wheel.rotation==90 play my sound. But my sound keeps looping and SOUND_COMPLETE is not firing to trigger it to stop.
[Code]...
View 4 Replies
Dec 6, 2009
I imported a .aif sound in to my library and gave it a class name of "Beat". I'm using this sound as a rollover effect. So I have my variable initiated at the top like so:
Code:
var snd:Beat= new Beat();
My listener's function like so:
[code].....
View 1 Replies
Feb 17, 2011
I have a loaded swf which contains sound on its frame. Even though I have unload it, the sound still playing. I cannot get rid of it. I've tried:
- _loader.unloadAndStop();
- SoundMixer.stopAll();
- System.gc();
View 1 Replies
Apr 10, 2009
I have a scene with a voice over. I have split the voice over in to multiple sound files (mp3). The voice over plays correctly as long as you don't use the btns. When the forward btn is used the the file goes to the correct frame in the timeline but won't play the sound. Next issue, after pausing then using play the scene plays but without sound.
[Code]...
View 5 Replies