logo-dw

Go Back   Dreamweaver Club Forums > Graphic Design > Flash
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10-13-2007, 02:23 AM   #1
dsnyder
dsnyder's Avatar
 
Join Date: Mar 2007
Location: Sexy Cleveland, OH
Posts: 128
Default xlm loading problem

I have what I think is a loading problem but it might be something else. I get the mp3 file listed in the xml to play but none of the other info in the xml displays. I have song titles & band info that is not appearing. I didn't realize this at first because if the mp3's had info already attached that was showing up in my display. I now realize that that info was not coming from my file.

I am a total newbie at this so any help appreciated .

(I think that I've added all potentially relevant code)

Code:
stop();
title_txt.autoSize = "left";
timeDisplay_txt.autoSize = "left";
toolTip._visible = false;
var amountLoaded:Number;
var duration:Number;

playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
    if (success) {
        _global.songname = [];
        _global.songband = [];
        _global.songfile = [];
        for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
        _global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
        _global.songband[i] = playlist.firstChild.childNodes[i].attributes.band;
        _global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
        
        
        _root["but"+i].onRelease = function(){
            clearInterval(timeInterval);
            _root.timeDisplay_txt.text = "00:00/00:00";
            _root.sound_mc.songStarter(songfile[this.id]);
        }
    }
    }
    _root.createEmptyMovieClip("sound_mc", 1);
    _global.song_nr = random(songfile.length);
    _root.sound_mc.songStarter(songfile[song_nr]);
};

--------------------------
MovieClip.prototype.songStarter = function(file) {
    if (this.sound_obj) {
        this.sound_obj.stop();
        delete this.sound_obj;
    }
    this.sound_obj = new Sound(this);
    this.sound_obj.loadSound(file, true);
    this.sound_obj.setVolume(0);
    this.onEnterFrame = function() {
        if (this.sound_obj.position>0) {
            delete this.onEnterFrame;
            timeInterval = setInterval(timer, 1000, this.sound_obj);
            track = this.sound_obj.id3.songname;
            artist = this.sound_obj.id3.artist;
            this._parent.title_txt.text =artist+" - "+track;
        } else {
            this._parent.title_txt.text = "loading...";
        }

    };    
-------------------------------
playlist.load("playlistSK.xml");
setInterval(duration,100);
setInterval(soundStatus,100);

Last edited by dsnyder; 10-13-2007 at 02:36 AM.. Reason: spelling!
dsnyder is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:02 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com