
Welcome Guest
|
#1
|
|||
|
|||
|
loadMovie problem with XML- requires refresh to load
I'm having a problem getting loadMovie to load my external SWF consistantly. The problem is intermitant (maybe a cache issue, though I clear it). When the problem happens, it can usually be fixed by hitting refresh. I'm using loadMovie to load an external SWF file, which is listed in an XML file. It's an XML audio player.
When it loads, I've created two dynamic text boxes to track the frame number of the movie that contains the code for my XML loader and loadMovie loader - and the number of frames loaded for my audio. I've divided the code up into more frames than needed, just to try and isolate it. Here's the player: http://www.aspirin99.com/mp3/bluePlayer.html Here's the code giving me trouble: Actionscript:
//Frame One
// Load XML Data
_root.songList = new XML();
_root.songList.ignoreWhite = true;
_root.songList.load("song_list.xml");
_root.songList.onLoad = function(success) {
_root.nodeNum=0;
_root.listLoaded=1;
_root.musicHolder.loadMovie(_root.songList.firstChild.childNodes[_root.nodeNum].attributes.src);
}
//I have the loadMovie in here twice because if fails less often with it in the code twice.
//
//Frame Two:
//
if (_root.listLoaded==1) {
checkForEnd=_root.songList.firstChild.childNodes[_root.nodeNum].attributes.src;
if (checkForEnd==undefined) {
_root.nodeNum=0;
}
} else {
gotoAndPlay(1);
}
//
//Frame Four: Labeled "wait"
//
_root.musicHolder.loadMovie(_root.songList.firstChild.childNodes[_root.nodeNum].attributes.src);
//
//Frame Six: // Does an animation if at least 10 frames are loaded or keeps trying to load.
//
if (_root.musicHolder._framesLoaded>10) {
_root.cover.gotoAndPlay(10);
} else {
gotoAndPlay("wait");
}
//
//Frame Seven:
stop();Here's the file embed here, but you'll probable need to see it at the link above so you can refresh it. [swf x=500 y=70]http://www.aspirin99.com/mp3/bluePlayer.swf[/swf] |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| dynamically load and unload images from XML | naibas | Newbies |
7 | 04-18-2007 05:20 PM |
| Spot the XML problem | PaulAchuff | Newbies |
0 | 01-03-2007 06:53 PM |
| Load external assets via Flash and XML | lariat1997 | Actionscript 2.0 |
3 | 08-29-2006 12:06 AM |
| Help with fla using xml to load mp3 | Prose | Flash MX ActionScript |
0 | 03-10-2005 09:54 PM |
| Load XML in flash (exe) | vannelli | Flash MX |
10 | 07-05-2002 12:31 PM |





