Flash :: Architecture - Detecting Loading Status Of Multiple External MP3s?

Nov 4, 2011

I'm loading a number of MP3 files into my Flash (the number changes dynamically). I would like to be able to say, in total, how much longer all the files will take to load.

I can do this for each individual sound.Mp3.addEventListener(ProgressEvent.PROGRESS, test_function);

But each sound is loaded by an instance of my sound loader class, how can I pass the ProgressEvent up to the parent object, and then have it calculate the total time to load?

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Local Shared Object - Detecting User Status

Aug 28, 2007

I am trying to have a local shared object in flash to detect whether a user is a new user or a returning user. If they are a new user I want to do newUser function and if they are a previous user I want to do a previousUser function. This should all be happening on an onEnterFrame.

Here is my code I have so far:
//shared object - cookie
newUser_test = SharedObject.getLocal("newUser");
newUser.text = newUser_test.data.title = "new user";
newUser.text.onEnterFrame = function () {
newUser.text = "new user";
} newUser.text.onEnterFrame = function(){
newUser.text = newUser_test.data.title = "previous user";
newUser_test.flush();
}

View 3 Replies

ActionScript 3.0 :: Loading External Swf And Detecting Current Frame Of A Movieclip In Loaded Swf?

Jul 27, 2009

detect current frame number of a movie clip inside a loaded external swf?

its like this, i have a main swf, lets call it "loader_swf", inside the loader_swf i create a movie clip called "holder_mc" which loads an external swf, lets call it "ex_swf". The ex_swf has a movie clip in frame 2 which is the main animation of ex_swf. Is it possible to get the current frame number of the movie clip holding the animation on frame 2? the only thing i know is to get the current frame of main timeline of ex_swf.

View 1 Replies

AS3 :: Flash - Loading Multiple External Images Into An Array?

Apr 2, 2011

Trying to pick 4 images randomly and load them into and array and then show them using a timer when all 4 images are shown 4 more images will be loaded again. here is the code:

var images : Array = new Array();
var rndNumbers : Array = new Array();
var imageLoader : Loader;

[code].....

View 1 Replies

ActionScript 3.0 :: Flash Loading Multiple External Swfs?

Aug 8, 2011

ok using

Code:
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);

[Code]....

doesnt tell me the loaded files name nor does it tell me in currentTarget or Target.

View 2 Replies

ActionScript 3.0 :: Architecture Duplicate Functionality For Multiple Uninherited Classes?

Jun 8, 2011

I want to add some common functionality to a number of display object classes: Sprite, MovieClip, TextField, TLFTextField, Bitmap, Loader, SimpleButton, and possibly more.I can easily extend any one of those and add my code, but I would need to duplicate the same code across a bunch of classes, ie SuperSprite, SuperMovieClip, SuperTextField, etc.

So the options I've thought of: 1. Use includes, so each class extends whatever and simply includes the class code. I haven't tried this so I'm not sure you can even use includes like that, and I'm not sure how it might affect (break) code hinting.

2. Create a new class that takes a target reference and essentially wraps functionality on to any eligible target instance. I'm not crazy about this because it means the instance I'm dealing with isn't the actual display object (ie its some wrapper that references the display object.)

3. Create a core class that takes a target display object and encapsulates all the functionality, then create separate classes each that extend the various display objects and contain an instance of that core class with itself as the target. I think I like this idea but am sure I would come back later and be confused with the structure.

View 4 Replies

ActionScript 2.0 :: Linkage With Loading MP3s

Dec 4, 2008

I am working on a game, and I am using MP3s within the SWF file to load at certain times. In order to make them loadable, I have set up the Linkage properties to : -Export for ActionScript -Export in first frame The problem is, that it loads all the MP3s before the preloader even shows up, so there is a lot of time of blank screen. But when I take of "Export in first frame", I am not able to load the MP3s during runtime. Is there a way to access the MP3 files without exporting them in the first frame?

View 2 Replies

ActionScript 2.0 :: Preloading External MP3s?

Aug 15, 2006

I need to pre-load multiple external MP3s. I have a preloader on my flash piece that preloads the SWF file and shows a progress bar and all that jazz. I am using the Sound class to load all the MP3 files when I need them (they are voice overs).

Is there a way to hook the preloading of those sound files into the preloader that I already have and then just call them up when needed?

View 2 Replies

ActionScript 2.0 :: Ability To Load External Mp3s?

Aug 29, 2002

if your using mx why not just take advantage of the ability to load external mp3s. if not you would have to have something like php to send the track name and info to the music player to tell it what to open.

View 5 Replies

ActionScript 2.0 :: FMX - Direction-loading Movie Clips W/mp3s End To End?

Feb 20, 2003

Does anyone have a tutorial (or steps to reproduce) showing a beginner the best method for loading several swfs end to end, so they play as one movie using ActionScript? What I need is: to have the first movie play and immediately when it ends, for it to stop and then have the second movie play, but each movie has a different mp3 sound and I can't seem to get both movie's and their respective mp3s to play as one long movie.

1) I've created 2 fairly robust Flas; horizon1.fla and horizon2.fla

2) I've made each fla into a seperate movie clip; horizon1_mc and horizon2_mc.(the last frame in horizon1_mc uses the same pic as the first frame in horizon2_mc -so that they will appear to play seamlessly as one long movie)

3) horizon1_mc needs to play using sun.mp3.

4) horizon2_mc then needs to play using sunburst.mp3

fyi: I've got the "FlashaMX Designer's ActionScript Reference" book but all I've found is how to load content (chap11) using static movie clips using "loadmovie" and I'm not sure how this applies to actual animated clips.

View 3 Replies

ActionScript 2.0 :: Dynamically Loading MP3s - StopAllSounds Function

Oct 13, 2002

Dynamically loading mp3's. I have 10 buttons, 1 stop and the others track 01 - 09, these are all in one .swf file. The buttons are all on one layer, on another I have defined all my sounds like so :

firstSound = new Sound();
firstSound.loadSound("track 01.mp3");
through to
ninthSound = new Sound();
ninthSound.loadSound("track 09.mp3");

Then I have the actions for my buttons
on (press) {
//Track 01 Button
stopAllSounds();
[Code] .....

I have uploaded the 9 mp3's, the swf & html file to same folder and this is what happens: [URL]. When any of the 9 track buttons are pressed 7 of the nine mp3's download all at the same time from pressing 1 single button (no track 3 or 9 which play fine normally and have definitely been uploaded) and none of the sounds work. But, when I refresh the page the 7 mp3's that were downloaded now work. The stop all sounds still work on buttons 3 & 9.

View 7 Replies

ActionScript 2.0 :: Create A Mp3 Player Which Streams External Mp3s?

May 14, 2003

how do i create a mp3 player which streams external mp3s and loads all the tracks from an external file like asp etc?

View 9 Replies

ActionScript 1/2 :: Status Bar For Multiple Preloaded Levels

Apr 19, 2010

ive been building a site for about a month now and slowly piecing it together- so far ive managed to get all my various different levels loading and unloading the way i want them to, but now id like a little status bar to load on screen as my multiple levels are loaded in the background.The way ive been accomplishing this without the load bar is like so:on first frame of main movie loadMovieNum("dl_web.swf", 3);load MovieNum("dl_ illustration.swf", 4);loadMovieNum("dl_retouching.swf", 5);(the first frame of each of those movies has a stop function on it)And i have buttons on the main movie that make each of those levels visible and play.NOW, ive just created a movie clip ive named "bar" which is a thin rectangle, and i would like to have that movie clip load lengthways as my multiple levels are loaded in the background. So, my question is how do i accomplish this? I've looked all over and it seems like all the good preload tutorials are loading into movieclips whereas i am loading into levels.Right now my site is technically working, but there will be pauses for people with slower internet connections and i need my bar graphic to pop up so they dont think they are dealing with a broken site....

View 14 Replies

ActionScript 2.0 :: Pre-loading Multiple External Swf's?

Feb 12, 2008

I have a main swf file which has a container mc in which four separate swf files load into when called from four buttons (home, services, testimonials and contact). When the main swf file loads it calls the home.swf file as the default file to load in to the container.

The main swf has a preloader on the first two frames and so does the home.swf. When you view the main swf file the preloader plays fine, then the short intro animation which sets up the interface and then the home.swf's preloader kicks in and then the home.swf loads and animates in.

Right, for the problem...

I would like to incorporate the preloading of the home.swf file into the main.swf preloader (which has a simple percentage loaded text field) so when the short intro animation plays the home.swf file will load instantly without the need for another wait. Can this be done?

I am not a programmer and so all the answers I have found have either not been quite what I am looking for or way over my head - Is there an easy way of achieving this?

View 2 Replies

ActionScript 3.0 :: Calculating XML Object Loading Status

Jun 2, 2011

What is the correct syntax to calculate an XML object's loading status and relay the value to a movieclip? I'm using the following, but nothing's happening. The math is being loaded but the movieClip doesn't change size.
xmlLoader.addEventListener(ProgressEvent.PROGRESS, barProgress);
function barProgress(event:ProgressEvent):void {
var loaded:Number=event.target.bytesLoaded/event.target.bytesTotal;
barPro.scaleX=loaded;
}
My barPro movieclip remains the same size.rong?

View 15 Replies

ActionScript 3.0 :: Loading Multiple External SWFs At Once?

Sep 23, 2009

I have a game which has various cutscenes. Each cutscene is split up into 3 or 4 seperate swf movie files which can be played (and replayed) by the user.

My question is, I've seen many tutorials on how to load external swfs but how do I load several movie clips into memory, and then clean everything up once the user has finished viewing them all?

View 2 Replies

Professional :: Loading Multiple External Images?

Oct 22, 2010

I have created invisible buttons which when clicked will load an image into a UILoader. When testing, an output error message comes up saying:

Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///E|/butcher1/images/cut0.jpg

I thought it might have been incorrect naming conventions or instance names but I have checked and I'm sure i've got it all right.
 
Could it possibly have something to do with my setup of the timeline as I have all my layers on the same line.
 
Should I start all over?

This is what some of the code looks like an i have done the same for the rest of the invisible buttons

this is what part of the code looks like...

cut7_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3); function fl_MouseClickHandler_3(event:MouseEvent):void{ // Start your custom code // This example code displays the words "Mouse clicked" in the Output panel. trace("cut7_btn"); probackground.iloader.source = "images/cut7.jpg"; // End your custom code}

View 16 Replies

ActionScript 3.0 :: Loading Multiple MovieClips From One External SWF

Aug 26, 2009

I'm looking to setup a SWF to effectively act as a library of MovieClips. I'm looking to be able to load up the library SWF in my main SWF, and access the MovieClip's the library SWF contains - play them, move them around etc.

Here's the model I've come up with - which seems to work:

(a) Library SWF:

- Contains MovieClips, with AS3 code held in external files.

- MovieClips setup with linkage as "Export in first frame" and "Export for ActionScript"

[Code]....

... and this all seems to work. Nothing is displayed from the library SWF until I want it to - all seems fine.

Isn't it a bit naff needing all my library MovieClips sitting on the stage on the first frame on the library timeline?

View 5 Replies

ActionScript 3.0 :: Loading External SWF With Multiple Pages

Jun 19, 2010

I am trying to load an external swf with multiple pages so that I can print it in flash this is what I am doing:

Code:
function loadImage(url:String):void {
// Set properties on my Loader object
imageLoader = new Loader();
imageLoader.load(new URLRequest(url));
imageLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, imageLoading);
[Code] .....

I use the loadImage() function to load a multiframed swf movie then I use the function below to print but only one page comes out what am I doing wrong? How do I get it to print all the pages of the external swf?
Code:
function printScore(mc:MovieClip):void{
var myPrintJob:PrintJob = new PrintJob();
if(myPrintJob.start()) {
var printOptions = new PrintJobOptions(false);
[Code] .....
//Fail no printer

View 0 Replies

Actionscript 3.0 :: Loading Multiple External Txt File?

May 31, 2010

I'm trying to load multiple external txt files in different sections. Right now I only got the home section working and I'm trying to load another external txt file on the services section but it's not working.

View 1 Replies

ActionScript 3.0 :: Loading Multiple External Images

Aug 9, 2010

I've been racking my brain on this one and I just want to do something quite basic. I have 2 external images loading in my "Action" layer on the first frame. These load into movieclip containers which I want to tween / fade etc.The images load OK into the containers only when both motion tweens start at frame one. As soon as I move the 2nd image along the timeline the second image does not display (only the container rectangle tweens).If there is an easier way to do this then fantastic. for example should i use UIloader instead.I want to load multiple images and have them as a slideshow that moves.[code]

View 1 Replies

ActionScript 2.0 :: Loading Multiple External Swfs?

Aug 14, 2009

I can't figure out how to load external swf files(9) into my master.swf file one after the other. This is the Actionscript i have written so far.....(AS2)

Code:
var myItems:Array = new Array("swf01.swf", "swf02.swf", "swf03.swf", "swf04.swf", "swf05.swf", "swf06.swf", "swf07.swf", "swf08.swf", "swf09.swf");

[code].....

View 2 Replies

ActionScript 2.0 :: Loading Multiple External Music Files?

Sep 4, 2010

I am working on a photo gallery with music and everything works good except I can not seem to load multiple music files one right after another. This is the code I have that works with one music file.

View 1 Replies

ActionScript 3.0 :: Loading Multiple External SWF Files In Sequence?

Dec 3, 2008

I have a fla file that I've created to load 7 external swf files. I am able to create the code to load one swf file without any trouble but I can't figure out the code to get it load swf #2 when #1 is done, and so on. My code for one is below:

[Code]...

I'm fairly new to AS3 but this seems like a pretty basic thing to do.

View 8 Replies

ActionScript 3.0 :: Loading Multiple External SWFs Within A Main Swf

Aug 31, 2009

I'm building a website that loads multiple swfs within one main swf. I would also like some swfs to unload when i click on the button situated on it. Currently I'm only able to load one swf with this code, can I somehow load more that just one swf by default? you can see the code below:

[Code]...

View 3 Replies

ActionScript 3.0 :: Loading And Playing Multiple External Swfs?

Jul 26, 2011

I have a main movie that sets up the loads of multiple swfs with:
 
/* imports */
import flash.net.URLRequest;
import flash.display.Loader;
import flash.utils.Timer;

[Code]....

How do I get it not just to start the move but play as well? Everything I tried caused an error or didn't work.

View 7 Replies

ActionScript 3.0 :: Preloader Not Working With External Multiple Swf Loading?

Aug 31, 2010

My preloader works fine only for the first time, then after it not works ? I got 3 buttons on the stage which are calling 3 external swfs. I am getting this Error ?

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:: DisplayObjectContainer/removeChild()
at Design_fla::MainTimeline/finishLoading()

[Code].....

View 1 Replies

ActionScript 2.0 :: Loading Random External Swf - With Multiple Instances

Mar 2, 2007

I was wondering if there was a way to modify the current tutorial regarding "loading random movie clips from external swfs", into MC containers on the stage? I would like it to do the following

[Code]....

View 7 Replies

ActionScript 2.0 :: Loading Multiple External Movie Files?

Nov 15, 2007

I have been working on this script that currently loads 2 external files into two separate areas inside my application. the 2nd file loaded is supposed to have several buttons that control the 1st movie clip. Like go to next frame, etc. My problem now is the 2nd file loaded, is not controlling the 1st anymore ( i had this all sitting in one file before).

So the action script to load the files is;

Code:
this.myBtn.onRelease = function() {
//load render 1 into viewer
this._parent.viewer.createEmptyMovieClip("clipHold", this.getNextHighestDepth());

[Code]....

View 1 Replies

ActionScript 3.0 :: Loading External Assets + Multiple ApplicationDomains?

Sep 17, 2010

This is a follow-up to another thread that is getting wordy and unfocused:

[URL]

I am trying to load an external library .swf to use its embedded fonts, much like this method:

[URL]

However, the swf that is loading the font swf is loaded within a wrapper swf, and is defined as a separate ApplicationDomain as the wrapper.

Wrapper swf (app domain 1) <--- Player swf (app domain 2) <--- font library swf

The font is loading fine, and I'm even able to retrieve the font name (so I'm able to reference the object), but it is *not* showing up in the textfield as it should be.

When I remove the ApplicationDomain issue between wrapper and player swf by testing the player swf locally in the IDE (*not* loaded through the wrapper), it works fine. But I'm not sure how or why this is, because like I said, I'm able to get the font name so I'm able to reference it, it seems.

The TextField is being set to embedFonts, the font is loading, everything else seems to be working 100%, but there's some issue between the application domains that I just *can't* figure out.

View 14 Replies







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