ActionScript 3.0 :: Playing External Sound Files In IPhone App
Mar 21, 2011
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?
View 3 Replies
Similar Posts:
Sep 25, 2009
I've created an audio player with actionscript 3 which plays one of 55 different sounds, depending on a variable set from which button a user clicks on. It works fine for the first 1 or 2 plays, but after that the sound begins to double-up, or even triple-up. I'm using the code below./First I declare a few variables:
var sound:Sound;
var controller:SoundChannel;
var pausePos:Number = 0;
var audioReset:Boolean = false;
var playerObject:Object = new Object();//
The sound functions are placed within another function so that it can be called again once a new button is selected:
function audiofunc() {
//if the user is selecting a second audio file, it runs this "audioReset function to try to clear the EventListeners[code]....
audiofunc(); I'm assuming that somehow an EventListener isn't getting removed, so it's causing a few versions of the audio file to play at once. If I trace the value of pausePos, it starts to appear in multiples (the same number, but 2, 3 or 4 times) after a few plays of the different audio files.
View 2 Replies
Jun 29, 2011
I'm trying to create iphone apps using Flash CS5.5 and I have a doubt... I just created a simple app which plays a long sound (more than 5 min).
When the phone auto-locks, my sounds stop. If I unlock the phone, my audio resumes...
How could I do to avoid the lock, or dont interrupt the sound when the device auto-lock?
View 1 Replies
Jan 22, 2011
I have a set of sound clips to be played one after another in a sequence with couple of time interval inbetween. In my case, its a question - followed by the set of four options.
When I write the below code, all the audop files start together at same time. How can I had time delay inbetween, so that the second clip plays only after the first one is over, and the third one starts playing, only when the second option is over.
[Code]...
View 3 Replies
Nov 19, 2006
I was thinking that it may be possible to create a primitive, yet usable actionscript based text to speech system for Flash movies (One that is platform independent).
Is it possible to right a series of actionscript commands that would play a collection of certain sound files based on what word or words the user has entered?
For example:
If the user types "Red Pen"
Can actionscript tear apart those two words and play sound files "Arr", "ee", "Dee", "Pee", "ee" and "EN"?
If it is possible, and if someone could help me out on it, then I'll start figuring out what phonetic sounds I'll need to record and program, and see if I can't build a simple text to speech program for flash movies.I have no immediate commercial application for it, and I don't plan on one.So if I can pull it off it'll be free to everyone, source code and all. Of course, it may be in my voice, but it shouldn't be hard to take what I plan to do and use it as a template for anyone else's voice recordings.
View 2 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
Jun 28, 2011
I have created a form that has some buttons that open external swf files.Problem is when I close the external swf the audio keeps playing.If I turn off sounds the sound starts again when I load a new external swf.Here is the relevant portion of code;
function playMyMovie():void{ myrequest=new URLRequest(myMovie); myloader =new Loader(); myloader.load(myrequest); function movieLoaded(myevent:Event):void { stage.addChild(myloader); var mycontent:MovieClip=myevent.target.content; mycontent.x=100; [code]....
View 15 Replies
Apr 6, 2011
I would like to play external .swf files which will be located in a specific directory somewhere and I will be getting the filenames through a sharepoint XML file. The .swf files have no interaction at all they are just videos playing but I need them to play one after another and in a constant loop until the XML file changes.
View 6 Replies
Sep 18, 2010
I am trying to make a picture gallery where each image is contained in its own .swf file and loads with a button click.The gallery works fine but I would like for each image to transition in and out,or play the timeline of each swf.I have a stop action in the middle of each swf so the image tranisitions in and then stops but when another button is clicked it immediately loads the next image and doesnt play the rest of the tmeline and transition out. Here is the code I used to load the swf files.
stop();
var movieName:String;
function movieLoad(event:MouseEvent):void[code]........
View 3 Replies
May 18, 2010
I have gotten my movies to play at random from external files but the links that where coded into the random swf files no longer work. could there be an action script issue? The random swf files are as3 and the player file is as2????
View 1 Replies
Feb 26, 2011
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 Replies
Feb 27, 2011
I could create a program for him in flash which would be able to play sounds corresponding to keys on the keyboard, but split in to 3 groups, and only 1 sound from each group can be playing at a time. I don't know that much about as3, and I told him this but said I would try anyway. The first thing I came up with was this:[code]In there, there's nothing to stop the sounds overlapping or looping like in my other solution, also it's obviously a lot less compact, but I sent it to my friend like that to see if it would at least play instantly. The response I got was that, although the lag was noticeably less, it was still present.
View 3 Replies
Jul 23, 2011
I thought flash dont work on iphone and i been tring to see this jplayer on my mobile iphone 4 and mp3 is playing fine on it, so im scraching my head and thinking why its playing it?
so this means, this jplayer will work on all the browser and mobiles? cause im making site for playing audio, need to know.[code]...
View 3 Replies
Nov 13, 2010
I have a sound clip that I'm loading externally into my flash file. The code I'm using looks like this and is placed in the as layer on the first frame,
var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var myTransform = new SoundTransform();
var lastPosition:Number = 0;
mySound.load(new URLRequest("introaudio.mp3"));
myChannel = mySound.play();
[Code]....
View 14 Replies
Apr 10, 2011
I am creating a game that has 6 movieclips all on the main time line of the game. Each movie clip has three buttons that when clicked plays, pauses or stops a sound clip.When I press any of the sound clip play buttons that sound starts playing, the problem is when I click any of the other sound clip play buttons those sounds also start to play. Is there a way I can disable the other sound clip buttons while the current sound is playing then enable all of the buttons when the current sound has stopped.
This is the code that creates one of the sound objects
[Code]...
View 3 Replies
Jan 14, 2012
I have produced an app for iOS but when it loads the music from the iPhone doesn't stop.
I have read on forums that if an app contains sounds that the iPod will fade out but it doesn't for me. I have tried loading the sounds dynamically (these sounds don't play at all if the iPod is playing) and embedding them into the movie. Nothing seems to work sadly. I have ensured that I have all the recent updates for flash and the air packager and I can't find a solution to this anywhere.
View 1 Replies
Oct 3, 2009
So I made a few buttons with sounds within them and when I publish it they work just fine. But what I want them to do is;
Say I click a Button.The sound starts playing.Then I click it again, before the sounds done playing.I want it to stop the playing sound and start playing the button I just clicked on, whether it be the same button, or a different one.Right now it just ends up sounds like an echo because it'll play it as many times as you click it.
View 2 Replies
May 16, 2011
I'm writing the application for iOS in Flex (sdk 4.5). Is it possible to play movie in such built application?
I was trying to use Video component - which works well on my desktop, but it doesn't work on my iPod. Of course my application is running, but the video isn't playing.
View 3 Replies
Aug 1, 2011
I'm trying to play a sound using a technique found here (play the sound by sampling raw sound data gathered from the original with extract()), with the difference that the mp3 sound is embedded in the swf, not loaded externally. This is my code:
var soundBytes:ByteArray = new ByteArray();
var mp3sound:Sound = Sound(new Sound1_design()); // this is the embedded sound
mp3sound.extract(soundBytes, int.MAX_VALUE);
[Code]....
This works, in a way, except that the resulting sound is distorted (it has a kind of a metallic ring).
View 1 Replies
Jun 22, 2003
I am loading small sounds dynamically with the loadSound command. These small sounds are activated with a rollover. see script below. This works ok. however. i want the first sound to keep playing while the rollovers load sound. a bit like playing the piano. This works ok when i import all the sounds into the library and place them on their very own button. however the size of the flash movie increases to 140k. whereas when i load them dynamically the size of the movie is 20k. obviously i want to load dynamically.
But with dynamic loading each sound stops when another sound is rolled over, so that there is only ever one sound playing at once. I need to load the sound into a different level or something, so that the first sound can keep going while the smaller, shorter sounds play over the top. this is my script below. The first sound loads when the movie starts. This is the one i want to keep playing. Then there are the smaller ones with rollovers. does this make any sense? there's actually 13 little sounds.
[Code]...
View 3 Replies
Dec 6, 2011
ok so i have a button that plays an animation for fire when held down. and when realsed goes to and stops and frame one. when it reaches the end of the time line it goes to and plays at frame 10 and goes back to the end of the timeline. I have a sound for the fire animation that plays for the effect. The problem is the sound keeps going untill its over even if the button isnt held down. and when the playhead reaches the end of the timeline it goes to and plays and frame 10 and it replays the sound. if i hold it down it will just keep playing the sound over and over from start to finish. what i want it to do it when i hold the button down i want it to play the sound and when released it stops the sound where ever it is at. I also dont the sound to play again if there is a sound already going to stop it from playing 20 sounds at one time it gets loud and you need asprin after about 5 seconds of that.
View 2 Replies
May 4, 2011
The thing I don't understand is how to assign a sound to a soundchannel without playing the sound. All the examples I've seen do this.
Code:
_SoundChannel = _sound.play();
_SoundChannel.stop();
And how can I set a SoundChannel volume to zero before allocating a sound to it?
View 2 Replies
Oct 15, 2011
Flash Builder 4.5, and some lads told me that i can generate IPA file in order to generate iPhone apps from it.
View 1 Replies
Aug 20, 2011
I usually used as3 in flash to develop game, but I always do for a fixed size of file. But in itunes there are a lot of app work for both ipad - 768x1024 and iphone 640x940 (this size is iphone 4) and even different iphone generation has different size too. So how can i use flash to make one app that can work for all of these devices?
View 1 Replies
Apr 16, 2010
I am trying to embed some sound controls, and have hit a dead end. I made my play and stop buttons, imported my mp3,, assigned it proper linkage, and inserted this AS2 :
[Code]...
The buttons are named "play_btn" and "stop_btn" respectively. When I export it or preview it, hitting the play button does not do anything.... I hear no sound. What could be up with this?
View 4 Replies
Sep 11, 2010
I would like to do some iPhone development from my Windows box using the Adobe iPhone packager. I get how to do pretty much everything except creating / obtaining the certificates and provisioning files needed to complete the packaging process. What is the easiest and quickest way to get up and running?
View 2 Replies
Sep 9, 2011
With normal Flash SWF's I use URLRequest to communicate with external servers/sites to send/retreive data from a database - pretty standard stuff. But can iPhone apps published from the CS5 environment communicate with external servers/sites?I'm still organising my development license for the iphone, so want to check before I fork out the money for the registration.
View 1 Replies
Sep 2, 2010
Im making an animation and in the 3rd scene i have a deer that screams and the sound plays way to early. I had to drag it out way past the frame where it opens its mouth for it to play at the right time.
I have no idea whats wrong this has happened before. I really dont want to have to guess on where to put the sound for everything a character says.
View 2 Replies
Sep 21, 2009
Back to my nightmare project, I've embedded sounds in the project that play based on certain user actions. They play fine for me (PC), but my customer is telling me they don't work for her (Mac).Would there be ANY reason a sound would play on a PC but not a Mac?I've told her to update her Flash player to make sure it's current and to make sure her speakers are on and the volume is up, but no sound.Okay, the REAL reason this isn't working is user error based on everything else I'm told that's happening and not happening, but I need to cover my bases and see if there really may be a reason sounds won't play on a Mac.
View 3 Replies
Jul 4, 2011
I just finished with developing my application by Adobe Flash Professional CS5 and I wonder if this will be visible to iPhones 4 because support for Retina displays was added since CS5.5.
There is section in my info.plist:
<key>UIDeviceFamily</key>
<array>
<string>1</string>
</array>
View 1 Replies