Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Loading Movies from Variables
From: Lee Parry
Date: Thu, 22 Feb 2001 15:47:11 -0000

Hey List,

This is my first time here, so be gentle.

I'm making a Flash Radio Station for our site. It simply loads a set of URLs
as variables from a text file (actually a lasso file, but that's
irrelevant), then uses these as a playlist.

It loads the new SWF files (created from MP3s by SwiffPEG), into level1 and
plays them. A forward button needs to tell it to skip to the next track:


RADIO MOVIE LOADS

1. Get Variables

2. load first movie into level1 (URL is a variable)

3. set the 'currenttrack' variable to "track_1", set variable 'changed' to
"false"

4. Play movie in level1

5. If You Press Forward Button



on (release) {
with (_level1) {
if (/:changed == "false") {
trace ("changed equals false");
if (/:currentTrack == "track_1") {
trace ("currentTrack equals track_1");
_level1.unloadMovie(/:track1);
_level1.loadMovie(/:track2);
_level1.play();
/:currentTrack = "track_2";
/:changed = "true";
}
}
if (/:changed == "false") {
trace ("changed equals false");
if (/:currentTrack == "track_2") {
trace ("currentTrack equals track_2");
_level1.unloadMovie(/:track2);
_level1.loadMovie(/:track3);
_level1.play();
/:currentTrack = "track_3";
/:changed = "true";
}
}
if (/:changed == "false") {
trace ("changed equals false");
if (/:currentTrack == "track_3") {
trace ("currentTrack equals track_3");
_level1.unloadMovie(/:track3);
_level1.loadMovie(/:track1);
_level1.play();
/:currentTrack = "track_1";
/:changed = "true";
}
}
/:changed = "false";
}
}


This seems to work fine in Internet Explorer 5 on the PC, but has issues in
anything else, when I debug it it gives me this:

Error opening URL
"file:///WebSTAR%20Server%20Suite%204.2/realworld/media/swf/radio/"

changed equals false
currentTrack equals track_1

Error opening URL
"file:///WebSTAR%20Server%20Suite%204.2/realworld/media/swf/radio/"

changed equals false
changed equals false
currentTrack equals track_2

Error opening URL
"file:///WebSTAR%20Server%20Suite%204.2/realworld/media/swf/radio/"

changed equals false
changed equals false
changed equals false
currentTrack equals track_3

Error opening URL
"file:///WebSTAR%20Server%20Suite%204.2/realworld/media/swf/radio/"



That's if it doesn't crash Flash!

I'm using Flash 5 on a G3 Mac. And for some reason i can't get the updater
to work!?


Any help, suggestions, questions, or examples gratefully recieved.


PLEASE TAKE PITY ON ME OH GODS OF FLASH!


Lee Parry

--------------------------
Lee Parry
lee [dot] parryatrealworld [dot] co [dot] uk
Real World MultiMedia
--------------------------
http://www.realworld.co.uk
http://www.petergabriel.com
http://www.womad.org
--------------------------




[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]