ActionScript 3.0 :: Accessing A Bunch Of Sounds In A Swf File?

Dec 24, 2010

I have the alphabet in a background picture, and when I click on the letter, the letter sound is played.  Simple enough.  I have all 28 letters in seperate mp3 files.  I can embed the 28 files into the swf. I want to use add the sound files to a vector, and then just play the appropiate sound based on the location that the user clicked.
 
My question is what is the best way to load all these sound files.
 
I could do something like this:
 
var sndVector:Vector.<Sound> = new sndVector.<Sound>().
sndVector.push(  new "name of class assigned to sound  1"()  );
sndVector.push( new "name of class assigned to sound 2"() );
....
sndVector.push( new "name of class assigned to sound 2"() );
  
I am kind of lazy, so I don't want to do that.  I could load the files at runtime, from a server, or my hard drive, by I would like to keep all the files embeded in the swf file if I can.
 
Ideally I would like to just throw all my sound files into the library, NOT assign them class names. (because I am lazy again), and then access them anyway form actionscript and push them onto the vector.

View 3 Replies


Similar Posts:


IDE :: Bunch Of FLVs That Have A Large File Size?

Jul 6, 2010

I was wondering if somebody could point me in the right direction as I don't have much time for trial and error...I have a bunch of FLVs that have a large file size that I would like to compress and resize...what would you recommend as the best software or method of doing so without losing too much quality?

View 3 Replies

Loading Two Different Sounds For One FLV File?

Aug 8, 2009

I need a flv with two sound. I want to load load two different sound for one flv file. For example I want to load my flv file in frame 1 with sound 1 then I want to load my flv file in frame 2 with sound 2. How can I do it?

View 7 Replies

ActionScript 2.0 :: Use With Music Is Affecting All Other Sounds - Button Sounds And Background Sound

Apr 16, 2010

I followed the mp3player tutorial (part 3) from [URL] and got it working fine. Only problem is that the setVolume I'm trying to use with my music is affecting all my other sounds - button sounds and background sound. I'm aware of the createEmptyMovieClip/attachSound approach and got it working on my other sounds. But Lee's tutorial-mp3player is using a slight different technique, and so my normal approach doesn't quite work.

[Code]....

View 7 Replies

ActionScript 3.0 :: Synchronize Sounds Perfectly To Do A Kind Of Audio Mixer Using Different Sounds?

Feb 7, 2011

I want to synchronize sounds perfectly to do a kind of Audio Mixer, using different sounds. [URL] does it perfectly, I've been researching and researching and I just don't know how to do it! How does [URL] synchonize audio so perfectly? you can even change sounds and the new ones will come on time! How do I do that? Is it just Action Script? or something else?

View 1 Replies

Professional :: Sounds In Flash File

Oct 21, 2010

If i use sounds in a flash file, sometimes the fps will slow down. How do you get around this?

View 1 Replies

Flash :: Recording And Saving Sounds To File NOT From The Microphone?

Feb 3, 2012

I am trying to create a Flash application(more like a game) where a user can add sounds to a timeline and then play the resulting "song". That is not really hard to do, and the resulting track can be saved and played within my app, but the problem is that I would like to export the created track as a .wav(or .mp3). I know that recording from a microphone with MicRecorder is possible and then the record can be exported with WaveEncoder, but I didn't find a way to create a custom sound stream from multiple sounds and than export it. Is this possible?

View 1 Replies

ActionScript 2.0 :: CS3 Getting Sounds To Start Again After Using Stop All Sounds

Nov 29, 2009

I have a film with 4 scenes in it: Here's a link to the film and as you can see the film does not play the music the second time because of the StopAllSounds function which is probably the wrong code to use. The first scene is just a button with 1 frame, a stop action and a music clip. The second scene is the film. The third scene is the credits fourth scene is a Play again button. I have a Stop all Sounds action on the fourth scene because if I do not use it and I press the Play Again button, the music from the first song keeps playing but also the music from the film starts up again so it starts to play twice. What I want to know is, how do I get the music to stop at the end of the film but start up again once I hit Play Again?

I am using Flash CS3 if that helps and using Actionscript2.

View 2 Replies

Flash :: Professional - CS3 / CS4 Sound File Sounds Terrible - It Crackles And Sometimes Stutters A Bit

Jun 12, 2010

I am trying to create a soundboard and I have all my buttons and stuff, the only thing left is to put the sound files in. However, I have tried adding them to the library and dragging and dropping them over the HIT option like I usually do, but when I export the swf file, the sound file sounds terrible, it crackles and sometimes stutters a bit. I have tried setting these sound files to mp3 and raw in adobe options but with no luck. I am using actionscript 2.0 if that has anything to do with it. Also, I need these files embedded, not just linked.

View 2 Replies

ActionScript 3.0 :: Accessing Subheadings In XML File?

Feb 6, 2009

This is how an example works (im puting just the piece of code here which is confusing me):

XML code:
<images>
<img src="images/picture.jpg" alt="name" />

[code].....

View 4 Replies

ActionScript 3.0 :: Accessing The Url From Which A Swf File Has Been Loaded?

Jan 6, 2009

finding the url of the swf filefrom which it has been loaded? The purpose of the url is, I amloading some flv files using relative path. I just want to achievethe same by appending the relative path to the parent swf url fromwhere the parent was loaded. I am a newbie to AS3

View 5 Replies

ActionScript 3.0 :: Accessing Variable In Different File??

Jan 20, 2009

ActionScript Code:
package
{
//import ....

//First Class

[code]....

A seemingly trivial problem, however, the variable "code" 's value would not change! Note: I've tried to add parameters to the constructor of B, as a way to use B, but I had error of " #1063 - Expected 1 , Received 0" for that one even though I've added parameters to it.

View 3 Replies

ActionScript 2.0 :: Accessing NodeValue Of XML File?

May 6, 2005

I'm building a gallery under flash mx 2004. I use an xml file to store the description about each painting that has to be displayed with the picture related to it.

Here is my xml file :

Code:
<description>
<painting ref="01">
<title>Guernica</title>

[Code]....

I can get the node names but the node value is "null", and the nodeType of my node "<title>" returns "1"...

What's going wrong, it's supposed to be a text node...

How should I acess to the value of my "<title>","<date>", "<technique>", and "<size>" node values ?

View 2 Replies

ActionScript 3.0 :: Loading A CSV File And Accessing The Variables?

May 6, 2009

I'm new to AS3 and dealt with AS2 before (just getting the grasp when the change it). Is it possible in AS3 to load an excel .csv file into Flash using the URLLoader (or ???) and the data as variables?I can get the .csv to load and trace the values (cell1,cell2,cell3 but I'm not sure how to collect the data and place it into variables. Can I just create an array and access it like so.... myArray[0], myArray[1]? If so, I'm not sure why it's not working.
 
I must be on the completely wrong path. Here's what I have so far..

[Code]...

View 2 Replies

ActionScript 3.0 :: Accessing Variables Within Class File?

May 4, 2010

Say I define a variable in a  class file:
 
public var container:sprite;
 
I add the sprite to the stage and define it's x and y in the class file. How would I go about changing the x and y of the container within my fla file?

View 5 Replies

Professional :: Accessing A Swf File Inside UILoader?

Jun 2, 2010

In my game currently I have a series of UILoaders which can be set to load a specific swf file inside the larger one. What Im trying to do is manipulate the 'child' swf file from the parent- in particular use the goToAndPlay() function. Im pretty sure Ive seen the solution before but I cant find it now.

How make the connection from the UILoader class to its contents as a movieClip?

View 1 Replies

Flex :: Accessing JBoss Conf File?

Sep 29, 2009

I've got a Flex application running on a JBoss server, with dev/QA/production environments. The application needs to coordinate with some other services, also with QA/prod instances. Currently I'm sending the current URL in via javascript values, like this:

index.template.html
AC_FL_RunContent(
"FlashVars", "myhost=" + location.hostname,
etc

index.mxml:

switch (mx.core.Application.application.parameters.myhost) {
case "qa.servername.com":
xmlURL = "http://server.com/qa.xml";
break;

and so on. I'd rather not do that though; I'd rather edit a .properties file in JBoss to identify a particular machine as QA or Production and access that value via Flex.

View 2 Replies

Flash :: Accessing A Variable Declared In Fla From As File

May 24, 2011

On the stage I have a movieclip by the name of rect_mc. Inside it have have a MovieClip sqaure_mc.

In the time line that I get when I double click on rect_mc (timeline of rect_mc) I have written the following code

var width1:Number;
width1 = sqaure_mc.width;

How can I access width1 from the document class?

View 1 Replies

ActionScript 3.0 :: When Accessing Local File From Loaded Swf

Jul 9, 2009

I have the following problem when loading a swf file. I have content.swf file located at [URL]. The contetn.swf access a file settings.xml located in the same dir. I load it like this:

_settingsURLRequest = new URLRequest( "settings.xml" );
_settingsLoader = new URLLoader();
_settingsLoader.load( _settingsURLRequest );

Now I have another file loader.swf located at another domain [URL]. The loader.swf file loads content.swf but content.swf search for the settings file at domain2 not domain1. I know that I can use absolute address when loading the settings file but I'm loading a lot of files and I prefer another solution. Is there a way to specify that content.swf should always search for settings.xml in its own domain no matter the fact that its being loaded from onother file in onother domain?

View 2 Replies

ActionScript 2.0 :: Accessing A Movieclip From External .as File

Sep 1, 2009

I'm trying to make a simple "tamagotchi-alike" application and i have encountered problems when trying to access a movieclip. To describe the situation, at the beginning there is nothing on the stage, then from a class called Kitty I attach a movieclip called mainStage with all the animations.

[Code]...

View 0 Replies

ActionScript 3.0 :: Accessing UI Object Stored In FLA File

Nov 30, 2009

I am new to action script working with flash cs4 with action script 3.0. How do i access a UI object(stored in .fla) in action script. I have already linked these two files. It is working fine. I have a button as UI object, that was converted as symbol and instance name has already given. I cannot access the button using the instance name in actionscript. If i tried so there is no intellisense. How do i access it in script. I am using oops style of coding.

View 2 Replies

ActionScript 3.0 :: Accessing XML File - Unhandled IOError

Mar 19, 2011

I'm getting this error when i try to access a XML file...
ActionScript Code:
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error.
URL: xmls/save_xml.php
at admin_panel_fla::main_2/click_save_btn()

I have a SWF that accesses the above mentioned PHP file in the error message and it displays this error when it tries to access this PHP file. The thing is, this works perfectly on one server, but the above happens on the 2nd server. I'm uploading the exact same files and giving the PHP file 777 permissions for read and write.

Paths are the same and correct. Everything is exactly the same as on the server it works on. It doesn't make sense. Could it be something with the server or security thats stopping it from working? I know this is normally caused by cross domain policies and wrong paths, but it's on the same domain and the path is definitely correct.

View 2 Replies

ActionScript 3.0 :: Accessing Functions In Separate File?

Feb 5, 2010

I'm working on an mp3 player. It makes use of a custom scrollbar I found here: [URL]

I've gotten it to work so far, but there is one bit I would like to add. I would like it to scroll to specific y-coords when a button is clicked. The code for the scrollbar is all in an external AS file, which is referred to by an exported movieclip in the main fla.

how I would go about referring to this file, or just some other method of doing this? I'll paste the AS code as well as the basic fla code.

fla code:

Code:
var s:Sprite = new Sprite();
txt_mc.spacer.visible = false;
sb.init(txt_mc, "easeOutBack",0,true,2);

[Code]....

View 3 Replies

ActionScript 2.0 :: Accessing A Memberfunction Of A Class From The FLA-file

May 12, 2004

I have a problem accessing a memberfunction of a class I made. Simplified, this is the class:

[Code]....

View 5 Replies

ActionScript 2.0 :: Saving A Bunch Of Mc's As An Swf?

Apr 17, 2007

I need to take a bunch of movieclips from the stage and dynamically store them all together in a separate swf on my computer. Is that possible? how do i do it??

View 2 Replies

ActionScript 3.0 :: Accessing Swf File Via External Html Links?

Jul 27, 2009

I have a blog that I insert swf video into via an iframe which references a CS4 published html page from my swf file.  I would like to put html links into each individual blog post to act like a table of contents that someone could use to move to specific frames in my video.

View 3 Replies

Flex :: Error Premature End Of File Pops Up When Accessing A URL?

Apr 5, 2010

I am using Coldfsuion 8.0.1 and Solaris 10 and when i try to run this URL,I am receiving an error message "Premature end of file".And when i hit the same URL from browser it shows:

<amfx ver="3">
−
<body targetURI="/onStatus" responseURI="">

[code].....

View 1 Replies

Flash - Accessing A Button Inside A Loaded Swf File?

Dec 28, 2011

I am trying to access a button inside an external swf file that I loaded. Problem is every time I try to access this button I get an error saying that it's null!

Here is my code:

public class DocumentClass extends Sprite
{
public var loader:Loader;
public var swfFile:URLRequest;

[Code].....

Now this should work, code-wise I think its correct. The problem is that loader cant find the required button. There is indeed a button in the loaded movieClip with an instance name of "button", I double checked that.

[URL] basically i was just a layer too high and this is why i couldn't access anything..

View 1 Replies

Flash :: Accessing CHILD In External Loaded Swf File

Jan 7, 2012

How do I get to the MovieClips within an externally loaded Movie Clip. Lets say I have a movie Called ONE in the swf I just loaded. How can I work with it alpha, position and other properties of the children of this clip? CODE IN MAIN TIMLINE:

[Code]...

Now its loaded I want to change the postino of the clip called ONE in the movie LoadedMC I just created.

View 1 Replies

ActionScript 3.0 :: Accessing Control Of .swf File Into Flex Application?

Sep 6, 2010

i have uploaded in flex, swf file which is created in flash actionscript. This swf file is having the textArea controls.content of textarea changes as i perform some clicks, keyboard input.Now i want to access the content of textarea in my flex application's variable.I have seen some example where a movieclip object is created to get the content and load the method of flash project.

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved