|
-
[CS3] .onLoad Problem
Hey everyone,
So I've been working on a Flash-based web portfolio for my sound design work, and I'm creating a gallery of images/sound clips which load dynamically (that way I don't need to recompress the swf file every time I add/remove a production). I'm having trouble with checking to see if files exist; for example, I want to check if a sound file exists, and if it does, set the alpha property of a symbol to 100%, and if it doesn't, set the alpha property of that symbol to 25%.
The code I'm using works fine when I test the file locally, but as soon as I upload the file and test it, the movie responds as if a file exists even when it doesn't, and I can't figure out why.
Here's the code in question:
fileExists = new LoadVars ();
fileExists._parent=this;
fileExists.onLoad = function (success) {
if(success) {
mySound.loadSound(this_sound,true);
mySound.stop();
mySound.setVolume(25);
_root.play_btn._alpha=100;
_root.stop_btn._alpha=100;
_root.volume_bar._alpha=100;
} else {
delete mySound;
mySound = new Sound();
_root.play_btn._alpha=25;
_root.stop_btn._alpha=25;
_root.volume_bar._alpha=25;
}
}
fileExists.load("somesound.mp3");
Why would this code behave correctly (i.e. change the alpha settings as expected) locally, but not online?
Thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|