XML

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentXML

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old February 23rd, 2012, 11:37 AM
SoulSketch SoulSketch is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 7 SoulSketch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 22 sec
Reputation Power: 0
XML error msg

Working in flash on mp3player, found a great tutorial but now i get a wrong msg; 1084: Syntax error: expecting identifier before xmltagstartend.

So i think i made a mistake in my xml, i really need help with this:

Flash Script:

stop();
playlist= new XML();
playlist.ignoreWhite=true;
playlist.onLoad = function (success) {
if(success) {
_global.songname = [];
_global.songfile = [];
for (var i=0; i<playlist .firstChild.childNodes.length; i++) {
_global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
trace(songname[i]+" "+songfile[i]); }
_root.createEmptyMovieClip("sound_mc",1);
_root.sound_mc.sound_obj = new Sound();
_global.song_nr = random(songfile.length); _root.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);
} else {display_txt.text="Error Loading XML"}
}
MovieClip.prototype.songStarter = function (file, name) {
this.sound_obj.loadSound(file,true)
this.onEnterFrame = function () {
if(this.sound_obj.position>0) {
delete this.onEnterFrame;
this._parent.display_txt.text=name;
} else {
this._parent.display_txt.text="loading..."
}
}
this.sound_obj.onSoundComplete = function () {
(song_nr==songfile.length-1)? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);
}
}
btn_play.onRelease = function () {
this._parent.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);
}
btn_stop.onRelease = function() {
this._parent.sound_mc.sound_obj.stop();
}
btn_next.onRelease = function () {
(song_nr==songfile.length-1)? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);
}
btn_prev.onRelease = function () {
(song_nr==0)? _global.song_nr=songfile.length-1 : _global.song_nr--;
_root.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);
}
playlist.load("playlist.xml");
</playlist>


and the XML:

<?xml version='1.0' encoding='utf-8'?>
<songs>
<song name= "Crossfire Crossfire" file="music/crossfire.mp3" >
</song><song name="Crossfire Hjerteknuser" file="music/hjerteknuser.mp3" >
</song><song name="Crossfire Hurricane" file="music/hurricane.mp3" >
</song><song name="Crossfire Dead Man Walk" file="music/deadmanwalk.mp3" >
</song><song name="Crossfire Storm of The Century" file="music/stormofthecentury.mp3" >
</song></songs>


Hope you guys can help, SoulSketch

Reply With Quote
  #2  
Old February 24th, 2012, 05:00 PM
SoulSketch SoulSketch is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 7 SoulSketch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 7 m 22 sec
Reputation Power: 0
Fixed

Fixed the Problem

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentXML > XML error msg


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap