PDA

View Full Version : External File Loading Problem


Beppino
11-14-2003, 10:11 AM
Hello.
I've one big (for me) problem.
I'm writing a flash application that use OOP for windows object etc. that read external txt file for text and image contents, with loadVars.
Also, when the application start, it load four mp3 sound (everyone > 200Kb) that start play at the and for synchronized music.
The problem is that while it load sound, the application it's not blocked, but the windows object that I open doesn't success to load the corrispondent txt file because the loadSound keep all bandwidth. When the sounds are all in memory, all works well.
Anyone can help me?
There are some trick like set a priority to every loadVars o loadSound?
Thank in advance
-g

PS: I'm working with MX 2004 pro.

farafiro
11-16-2003, 06:38 AM
make another LoadVars() function for the sound
///blah blah
myLoadVars.onLoad = function(ok){
if(ok){
myText = this.textVars
myOtherLoadVars.load("mySound.mp3")
}
}

Beppino
11-17-2003, 05:19 AM
Ok, I understand, but why?
The loadSound has more priority that loadVars? If I make a new loadVars how You say, all download will be with the same priority?
Thanks for the lessons
-g

farafiro
11-17-2003, 06:37 AM
no, it's not this way
it's flash executes in a rows/ lines

Beppino
11-17-2003, 06:49 AM
ok, now all it's more clear.
So, Your solution isn't my solution.
This because I'll open my text file only after a specific request of the user (when he decide to open a window, for example). I'm tring to load in background the big sound but without block the execution of the application.
I didn't have a precise moment to load the sound, only I say: "start the application; load the sound in background; mainwhile play the application".
Sorry for my english ....
Shukram
-g

Beppino
11-24-2003, 07:55 AM
Please ... hep me!
-g