ActionScript 2.0 :: Loading Audio Dynamically?

Mar 15, 2011

I have a question about it 1.Does it use less memory than streaming it or using it as an event?2.How is it done? my music in my library has these actionscript links "song1" "song2" etc...

View 1 Replies


Similar Posts:


Streaming Audio / Loading Audio Into Swf First / Then Playing It?

Jan 28, 2012

I think it is loading the whole audio first into the swf, but I would like to get confirmation from someone more knowledgible.[code]I want it to stream the audio when the button is clicked only so that 100 of these swf will not slow down a whole webpage from loading.[code]I only start getting concerned when I noticed that on FF and Chrome, the page loads really quick but when I open the page in IE, it takes a very long time for the page to appear.

View 3 Replies

ActionScript 3.0 :: Dynamically Loading External Jpgs Into A Dynamically Created MC?

May 18, 2009

Essentially, I've got a MC container that's created dynamically based off an XML file (basically for every <title></title> I've got, it makes a new "card"). Now within the context of each <title></title> grouping I've got <imgs></imgs> in which I specify the path to images that are related.All of that works perfectly, save for the external jpg files actually appearing on the stage. The MC I add them to does, but the external image doesn't.My problem is- I can't add the external images until they're completely loaded (or so it appears). The thumbnail BG I use is blank. So I know for a fact that the thumbnail BG isn't occluding the loaded thumbnails.

View 2 Replies

ActionScript 3.0 :: Fadeout Dynamically Loaded Audio?

Jul 3, 2010

I am loading mp3 files from php into Flash based on when a user clicks a link of audio files to listen too. I would like for the audio to start fading out 10 seconds before it finishes.how I can determine when a song will end and create a timer around this.

View 3 Replies

ActionScript 2.0 :: Dynamically Importing Audio From Folder And Controlling It In Swf

Mar 24, 2010

How can I get this flash file to import this audio file and be able to pause and reset the audio?The file I have I was able to get it to play but I can not pause it, it just re-sets it.I also can not figure out how to get a progress bar to match the audios progress.Has anyone done this befor or have a fla with code I can look at and revers enginere? URL...

View 2 Replies

Flash :: Actionscript - Remove The Audio - Put The Audio Into A Byte Array And Then Re-add The Audio To The Flv Video?

Aug 6, 2010

If I import an FLV video is there any way to remove the audio, put the audio into a byte array, and then re-add the audio to the flv video?

View 1 Replies

ActionScript 2.0 :: Building A Project That Dynamically Loads External Images And Audio Into It?

Nov 14, 2009

I'm building a project that dynamically loads external images and audio into it.The images in the external folder are numbered sequentially in the order they display as you click through them (1.jpg, 2.jpg, 3.jpg, etc). No problem.There is audio that is supposed to fade in a play with certain images. (1.mp3 fades in when 1.jpg is displayed.). No problem.Here's where it gets tricky... At least for me.Not every jpg has an audio file associated with it. The last audio that was triggered needs to keep playing until another jpg with cooresponding audio file plays, at which point the two audio files need to smoothly crossfade.1.jpg displayed => 1.mp3 fades in and plays.

(user clicks)
2.jpg displayed => 1.mp3 crossfades to 2.mp3.
(user clicks)

[code]........

View 5 Replies

ActionScript 2.0 :: Audio Loading Bar _mx?

Jul 18, 2003

(mx) I'm trying to make an audio progress bar. I'd like any help that can be given to help me accomplish this. I'm loading the songs externally when it is selected. I just need a bar to represent the song being loaded. I'm loading the songs from .mp3s:

track1= new Sound track1.loadSound("morning.mp3",false);
all= track1.getBytesTotal();
bytes_loaded = Math.round(track1.getBytesLoaded());
getPercent = bytes_loaded/all;
this.loadBar._width = getPercent*100;

[Code]...

the loadBar is the name of the progress bar_mc...this is the script I'm using, but I'd scrap it for a script that works...

View 2 Replies

ActionScript 3.0 :: Loading MP4 Only Audio No Video?

Sep 15, 2009

I'm trying to load an MP4 using CS4 and actionscript 3. The clip is loading but I'm only hearing the audio, I'm not getting any audio. Not sure what I'm missing. Here's my code it doesn't produce any errors:

Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);

[Code].....

View 0 Replies

Make Audio To Stop Playing Soon After Loading?

Feb 25, 2010

I am new to Flash action script and i have problem with action script code. Even though i comment the mvMyVid.play(); still the audio plays for fraction of second and stops.[code]...

View 1 Replies

ActionScript 3.0 :: Loading Audio Clips After Frame One

May 12, 2010

The project I'm working on consists of a bunch of pages, each with narration. Each page is a separate frame on my main timeline. Due to all kinds of issues I was having, I am now loading in the audio via actionscript, rather than placing an instance of it into an object and going from there. The issue I am now having is that when I tried to simulate a download, the movie would sit on frame zero until all audio was loaded, so it took a long time to get to my preloader, and by then the movie was just about finished loading.

It was suggested that I uncheck "export at frame 1" on my audio files, but now I am getting errors that I am making a call to a possibly undefined method (random audio file name of choice). If I am loading my my audio via actionscript, do I have to load it all in on frame 1? And if so, is there any way for my movie to get to my preloader before trying to load things? I have also tried setting my publish settings to export my classes on frame 2 or 3, in the hopes of it getting as far as my preloader before stopping, but no luck so far.

View 12 Replies

Professional :: Loading Audio File In Flash?

Oct 23, 2011

When i load the audio as mp3 file some time it will throw error.The error is "one or more files cannot be imported" Then i convert the audio file as wav file,but the quality of the audio is not good.

View 1 Replies

ActionScript 2.0 :: Audio Streams Playing At End Of Loading?

Jul 10, 2009

I have rather large project that contains several swfs and flvs with audio. The project is published in Captivate (which renders a main swf file). After the preloader screen, a lot of the audio files start playing at once at the beginning of the presentation. I have tried inserting an swf (1st Captivate slide) with AS2.0 command "stopAllSounds". It works as intended and stops all the cacophony. But then, none of my audio plays throughout the 7 minute project. Does anyone know how I can restart the audio?

View 1 Replies

ActionScript 2.0 :: [CS3/CS4] Loading Audio From XML, Sound Won't Play

Sep 8, 2009

I've been working on a Flash/XML audio player and have been struggling with getting the audio to stream. Right now I have Flash create a list of songs based on the loaded XML file, which works, and I want to be able to click on one of the listed items for the song to start playing. When an item is clicked on, Flash will trace out a message from an onLoad command, but the audio never starts playing.

I opened a new Flash file to test the non-working segment of code and I still can't get it to co-operate.

Code:
var currentsong:Sound = new Sound();
currentsong.loadSound("http://www.vtspencer.com/recordjackets/beta/media/file_11.m4a",true);

[Code]...

All that happens is that the trace saying "Should be playing" comes through. The music still won't start.

View 1 Replies

ActionScript 3.0 :: Loading Audio Files In The Background?

Oct 14, 2011

I've created a Flash slideshow where I load the narration audio MP3 file at the start of every slide with the typical code listed below. Of course this introduces a delay for the viewer at the start of every slide while its related MP3 file downloads.

Is there a way to download the MP3 files for future slides in the background while the first slide is playing in order to eliminate this delay for all slides except for the first one?

var soundReq:URLRequest = new URLRequest("audio/Slide_1.mp3");
var sound:Sound = new Sound();
var oneSoundChannel:SoundChannel = new SoundChannel();

[Code]....

View 1 Replies

Professional :: Loading External Audio File In Array?

Dec 7, 2011

I have figured out how to load an external video file - and I can play an imported audio file, but I can't seem to use either method to load an external audio file into an array.

Here is my audio code:
var tour_audio:Array = [tour1, tour2];
var my_num:Number= Math.floor(Math.random()*2);
var ChosenSound = tour_audio[my_num];
var playing:Sound = new ChosenSound();
playing.play();

Here is my video code:
var my_videos:Array=new Array ("link1.mp4", " link2.mp4", " link3.mp4", " link4.mp4");
var randomIndex = Math.floor(Math.random()*my_videos.length);
my_player.source = my_videos[randomIndex];
I tried "var tour_audio:Array = ["link1.mp3", "link2.np3"]; - but that did not work.

View 9 Replies

ActionScript 3.0 :: Netstream Audio Plays While Video Loading?

Jan 14, 2009

how to get flv's to load up dynamically using xml - it all works well apart from this one problem that i have.

when the thumbnail for the flv is clicked the preloader appears and the flv starts to load - but for some reason the audio begins to play almost immediately - then when the flv actually loads then the audio plays again whilst the initial (unwanted) audio carries on playing!

this is the script for the netstream:

[Code].....

View 1 Replies

ActionScript 3.0 :: Loading And Playing OSMF Audio In Chrome And Safari?

Sep 30, 2010

If been trying to refurbish my website using solely OSMF but, the sound part gives problems in various browsers. It works in IE6 and FireFox but, it doesnt in Chrome and Safari. Does anyone know what is happening and what their differences are when it comes to file loading?[URL]check it for yourself clicking the buttons in various browsers the Flash button uses native flash sound libs the OSMF button the OSMF implementation.

Main.as

Code:
package {
import org.osmf.elements.AudioElement;
import org.osmf.media.MediaPlayer;
import org.osmf.media.URLResource;

[code]....

View 1 Replies

ActionScript 2.0 :: Loading The SWF Dynamically?

Sep 25, 2007

I want to dynamically load a series of SWF's to play one after another without the user having to click any buttons. I've build a nice shiny preloader that will allow each movie to load up, but I can't seem to figure out how to make the next step. I've tried creating "placeholder" instances, and linking them but as I said, I just don't have enough AS experience to do it right. Most of the time when I'm working in Flash I'm under a time crunch and I do everything through animation.

View 3 Replies

ActionScript 2.0 :: After Dynamically Loading .jpg?

Sep 9, 2003

I use the following to load a jpg:

this.createEmptyMovieClip("loader_mc", 1);
this.loader_mc.loadMovie("mypic.jpg");
I can only set its position:

[code]......

View 3 Replies

ActionScript 2.0 :: Loading The Mp3's Dynamically?

Sep 23, 2003

I have a mp3 that I'm loading dynamically like so:

amnesiaLoop = new Sound(loopMC);
amnesiaLoop.loadSound("http://www.amnesiasc.com/assets/club0.mp3", true);
amnesiaLoop.start(0, 999);

The loop loads just fine but it stops after playing once even though I tell it to loop 999 times?

View 6 Replies

Dynamically Loading Gallery Using XML File

Sep 17, 2009

I have started putting together a flash based website to present my works. I am dynamically loading thumbnails and the larger companions using an XML file. Everything seems to work fine on my comp but when I upload it to my host sever the larger images do not want to load and on occasion a page of thumbnails doesnt want to load. My address is [URL]. Also the code I am using only places one image atop another, so when I click on a thumbnail it will place the larger image on top of the last it does not take the previous one away. which can be a problem if one image is smaller than the last. or if I wanted to load movie clips.

Here is the AS of one page.
//XML Trails stuff
//var to hold Tween;
var fadeTweenPhotoP1:Tween
// Creating image txtfield
var imageTextPhotoP1:TextField = new TextField();
// Instance of loader class
var imageLoaderPhotoP1:Loader;
[Code] ....

View 4 Replies

ActionScript 2.0 :: Dynamically Loading Fonts?

Oct 23, 2009

Can fonts be dynamically loaded or do all of the fonts have to be compiled into a swf?

View 1 Replies

ActionScript 2.0 :: Dynamically Loading New Different MovieClip

Oct 28, 2009

Imagine a database with a table of some items. Each item has 5 images inside and some other fields. In flash I have a page that duplicates all the items and shows them by thumbnails and a view button for each item. The movieclip that does this is for convenience movieclipA. When I press on the view button of an instance of movieclipA a duplicated movieclip takes place that has all the values of the specific item except of the images.

This movieclip - movieclipB duplicates for each item. This works perfect. I also have another movieclip movieclipC The movieclipB is a slideshow and loads the 5 images for an item by a self generated xml file that a php functions produces, depending on the querystring that is the idstring in my actionscript. I mean that inside the movieclipB I do

Code:
my_xml.load("findphoto.php?id=" + idstring);

So far the movieclipB works very well standalone...and this means that if I assign the querystring value inside the movieclip (for example idstring=1 and then call the function as above, the slideshow works verywell. How to pass for each item a different idstring into movieclipB and where exactly to put the movieclipB so it can be duplicated with movieclipA and take the correct idstring to do its job. Everything I tried to pass the idstring failed.

In the flash page among other code that I don't believe it's important, I have the following actionscript in the action layer
Main page frame 1:
PHP Code:
total = showPost.total;
var id:Array = new Array();
var headline:Array = new Array();
var details:Array = new Array();
var thumbnail:Array = new Array();
showPost = new LoadVars();
[Code] .....

VisitorsDetailsClip_mc is the movieclipB I mentioned above. MovieclipA (the one with the thumbnail) and movieclipB are placed on the stage of the main flash page.

View 1 Replies

CS3 Loading Remote Images Dynamically?

Jul 8, 2011

of a complex question to me, but it's coming from an absolute beginner and it might be considered a stupid one, that's why I posted here...I've kind of been dropped in the deep end with this task and I can't get it right... I have a company's organisational chart in flash where it loads in each person's name dynamically for their department and when you click on it it brings up their CV information such as name, qualifications etc. This is loaded into a dynamic text box. I can test it locally with an xml file and then switch back to the online version.The local version I check by switching to "strXMLpath = "organisation.xml";" where things are laid out as follows:

Code:
<organisation>
<bod>

[code].....

View 1 Replies

ActionScript 3.0 :: Loading Variable Dynamically Through XML

Jul 22, 2009

How to add a child to the stage dynamically? I can get a child to add to the stage but not using dynamic variables. Is it possible?
Example:
var firstRoundWinner:String = "Redsquare";
var mc:MovieClip = new firstRoundWinner();
// want it to say = new RedsquareaddChild(mc);
With Redsquare as one of my movieclips and the linkage is working. I can add it if I hard code it. But I want to load the variable dynamically through xml.

View 1 Replies

ActionScript 3.0 :: Loading Dynamically GIF Ani To Flash?

Oct 19, 2009

It's possible to load dinamically gif animation to Flash? I tried but only loads the 1st frame and was wondering if I'm doing something wromg or can't be done.

View 1 Replies

ActionScript 3.0 :: Dynamically Loading Images?

Nov 16, 2009

I am trying to load dynamic images in order without all of them attempting to load at once....I have an array of images that I loop through depending on the gallery that will load up....but when i loop through the images all of them try to load.What i need to happen is somewhere in the

View 4 Replies

ActionScript 3.0 :: Dynamically Loading A Movieclip

Aug 12, 2010

I can't get to load a movieClip dynamically.I have this code:[code]Also, I exported the movieClip to ActionScript with the name of myButton..When I test the movie- there're no errors, but there's nothing on the stage.

View 3 Replies

Professional :: Dynamically Loading Text?

Aug 19, 2010

I'm trying to load Text into my file, and i have it all set up i'm just not seeing anything loaded, i've been through tones of tutorials but i can't work out why my text isnt loading:
 
Script:
myData = new LoadVars();myData.onLoad = function() {myText = this.myVariable;};myData.load("myText.txt");
 
[code].....

View 7 Replies







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