Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




A Little Mp3player Assistance Please..(mx2004)



I recently made an mp3 player that reads off of a text file so that users may cycle through a selection of songs. I'm trying to extend it a bit by setting up the mp3 player to display the songs names an their duration (5:45) I'm pretty confident this is possible and I've tried a number of things and read a number of threads and tutorials but I'm still stumped. Anyways, this is how the code reads...


// playlist
var tracks = ["****.mp3", "runnin.mp3", "getlow.mp3", "pimp.mp3", "ghost.mp3"], i = 0;
// define sound object
track = new Sound();
// load first track
track.loadSound(tracks[i], true);
// onSoundComplete play next track
track.onSoundComplete = function() {
i = (i+1)%tracks.length;
this.loadSound(tracks[i], true);
};
// stop track
stopBTN.onRelease = function() {
track.stop();
};
// play track
playBTN.onRelease = function() {
track.loadSound(tracks[i], true);
};
// play next track
nextBTN.onRelease = function() {
i = Math.min(i+1, tracks.length-1);
track.loadSound(tracks[i], true);
};
// play previous track
prevBTN.onRelease = function() {
i = Math.max(0, i-1);
track.loadSound(tracks[i], true);
};
//-----------------------------------------


Just curious as what I can add to this AS so that it may function in the way that I want! Thanks in advance..oh and how and the hell do you get the flashtrak eq's to function?!?



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-08-2004, 08:24 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

A Little Mp3player Assistance Please..(mx2004)
I recently made an mp3 player that reads off of a text file so that users may cycle through a selection of songs. I'm trying to extend it a bit by setting up the mp3 player to display the songs names an their duration (5:45) I'm pretty confident this is possible and I've tried a number of things and read a number of threads and tutorials but I'm still stumped. Anyways, this is how the code reads...


// playlist
var tracks = ["****.mp3", "runnin.mp3", "getlow.mp3", "pimp.mp3", "ghost.mp3"], i = 0;
// define sound object
track = new Sound();
// load first track
track.loadSound(tracks[i], true);
// onSoundComplete play next track
track.onSoundComplete = function() {
i = (i+1)%tracks.length;
this.loadSound(tracks[i], true);
};
// stop track
stopBTN.onRelease = function() {
track.stop();
};
// play track
playBTN.onRelease = function() {
track.loadSound(tracks[i], true);
};
// play next track
nextBTN.onRelease = function() {
i = Math.min(i+1, tracks.length-1);
track.loadSound(tracks[i], true);
};
// play previous track
prevBTN.onRelease = function() {
i = Math.max(0, i-1);
track.loadSound(tracks[i], true);
};
//-----------------------------------------


Just curious as what I can add to this AS so that it may function in the way that I want! Thanks in advance..oh and how and the hell do you get the flashtrak eq's to function?!?

Mp3player
I was looking to re-create something along the lines of this:

http://musicplayer.sourceforge.net/xspf_player_slim.swf

and I was wondering if anybody knew if there were any tutorials on how to make a playlist mp3 player. I'll take any tutorial/advice/.fla I can get.

Flash Mp3Player
Hi I am trying to build a mp3 player in flash. I have been following a tuturial using a flash.fla file, writing the code in a flash.as file, and i wrote some more code containing the sonds in an xml file. Unfortunatly this does not seem to work when i load it. Do I have to link the .as file with the .fla file? all I have done is on an actions layer, I put #include "mp3Player.as"

I have been through all the code 3 times and it just does not work for me' an error pops up saying
Error opening URL "file:///Macintosh%20HD/Users/rlewis/Desktop/mp3player/tracks/1.mp3"

any help on this would be great
cheers
ohio

[as]MP3Player With Xml Error.
Im having an error with my as that im writing. its for an MP3Player and in flash it says "A type identifier is need after the ':'/ function playSong():Void"


Heres the code




Code:
//Setup sound object
var s:Sound=new Sound();
s.onSoundComplete=playSong;
s.setVolume(75);

//Array of songs
var sa:Array=new Array();

//Currently playing song
var cps:Number=-1;

//Load the songs xml
var xml:XML=new XML();
xml.ignoreWhite=true;
xml.onLoad=function()
{
var nodes:Array=this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
sa.push(nodes[i].attributes.url);
}
playSong();
}

xml.load("songs.xml");

//Play the MP3file
function playSong():Void
{
if(cps==sa.length-1)
{
cps=0;
s.loadSound(sa[cps],true);
}
else
{
s.loadSound(sa[++cps],true);
}
}
<mod edit> ALWAYS post your question only once while here at FK, as per the rules. Thanks in advance - gerbick (supermod)

Mp3player Xml Flash
Hello flash people,

first of all, great site. I am new here. Thanks for all the great tutorials guys.

I am learning xml with flash now. I was reading an article about how to make an mp3player using xml together with flash.
http://www.kirupa.com/web/xml/examples/MP3playlist.htm

Very nice and usefull tutorial.
It works fine, but there are little things I want to change.

1: The player must start the song when entering the website so that the list can be removed.

2: When someone presses the next button the next song has to star immediately(hope i write this right ).

I am not that good in actionscript so maybe someone has some time to help me or someone with the same problems can help me?!

Thanks again for helping.

Greets,
Rulywaka

Flash Mp3Player
when u run a flash player (Flash/PHP or Flash only) on the net. and if u have a Download Software (GetRight,DP...) .. when mp3 file going to load in flash ,DL Software get it a dowload file and start to download it and Mp3Player Going down.
what can i do to solve this Problem (BUG) ???
Please help me ... TNX

Help Requested With ActionScript In MP3Player FLA
Hi All,

I have attached the Cleo2 MP3 player, written in Flash 5 by Den Ivanov, that uses Actionscript and an XML file.

I have also attached 5 very short sample songs (2 seconds each).

I am having a challenge. The default setting for the player is on track repeat ( _parent.repeat="track"; )

I would like for the default setting to be ( _parent.repeat="all" ;)

When I manually set that value to "all", the player picks songs randomly and not in order (1,2,3,4 etc)

Also is there a way to get the repeat to play (1,2,3,4,5...1,2,3,4,5 as opposed to 1,2,3,4,5...4,3,2,1?

Thank you.

You will find most of the actionscript in the MC controler (controller) via Movie Explorer.

How To Add A Loop Feature To Mp3Player.
I have an MP3Player where I want the user to be able to loop the music with a toggle button. I am confident in making the button (kind of)

however I am lost on making the music loop.

Here is the code I am using for the player...


PHP Code:



//--------------------------------------------------------------------------
_root.playlist == undefined ? playlist = "mp3player-loops.xml" : playlist=_root.playlist;
// stage variables
Stage.showMenu = false;
Stage.scaleMode = "noScale";
stop();
// player variables
volume = 60;
current_song = 1;
dipslay.equalizer._visible=0;
// playlist loading
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = loadData;
data_xml.load(playlist);
// parsing all xml data into flash
function loadData(success) {
    if (success) {
        // getting all titles and filenames
        aPath = new Array();
        songTitel = new Array();
        audioTracks = new Array();
        audioTracks.shuffle();
        audioTracks = this.firstChild.childNodes;
        song_total = audioTracks.length;        
        for (var i = 0; i<song_total; i++) {
            aPath.push(audioTracks[i].attributes.path);
            songTitel.push(audioTracks[i].attributes.title);
        }
        //checking autostart mode
        autoStart = this.firstChild.attributes.autoStart;
        if (autoStart == "yes") {
            playSong();
            play_btn._visible = 0;
        } else if (autoStart == "no") {
            play_btn._visible = 1;
            pause_btn._visible = 0;
        } else if (autoStart == "random") {
            current_song = random(song_total)+1;
            playSong();
            play_btn._visible = 0;
        } else {
            current_song = int(this.firstChild.attributes.autoStart);
            playSong();
            play_btn._visible = 0; } }
    // done ! all loaded succesfully. purging trash
    delete audioTracks;
    delete data_xml;}
// play function
function playSong() {
    AudioPath = aPath[current_song-1];
// trying to loops the songs if loop is "yes in XML ???
    if (loop == true and skipLoop != true){
            MySound.stop();
            MySound.start(0, 0);
        }  else {
    // checking for pause > start from there
    if (pausePos>0) {
        dipslay.equalizer._visible = 1;
        MySound.start(pausePos, 0);
        pausePos = 0;
    // startup new sound
    } else {            
        MySound = new Sound();
        MySound.setVolume(volume);
        MySound.loadSound(AudioPath, true);
        MySound.onSoundComplete = function() {
            dipslay.equalizer._visible = 0;
            if (autoStart == "random") {
                current_song = random(song_total)+1;
            } else {
                current_song == song_total ? current_song = 1 : current_song++;
            }
            playSong(); }; }
        // check loading bar
        dipslay.track_load.onEnterFrame = function() {
            total = this._parent._parent.MySound.getBytesTotal();
            geladen = this._parent._parent.MySound.getBytesLoaded();
            if (geladen != total) {
                this._parent.load_display = Math.round((geladen*100/total))+"% Loaded";
                this._xscale = Math.round((geladen*100/total));
            } else {
                this._xscale = 100;
                dipslay.equalizer._visible = 1;
                delete this.onEnterFrame;
                delete this._parent.load_display; } }; }
    // switch paly/pause buttons
    play_btn._visible = 0;
    pause_btn._visible = 1; }
// play button
    play_btn.onRelease = function() {
    playSong(); };
// pause button
    pause_btn.onRelease = function() {
    this._visible = 0;
    play_btn._visible = 1;
    pausePos = MySound.position/1000;
    MySound.stop();
    dipslay.equalizer._visible=0;  };
// next button
    next_btn.onRelease = function() {
    delete pausepos;
    current_song == song_total ? current_song = 1: current_song++;
    MySound.stop();
    playSong(); };
// previous button
    prev_btn.onRelease = function() {
    delete pausepos;
    current_song == 1 ? current_song = song_total: current_song--;
    MySound.stop();
    playSong(); };
// updating time display
this.onEnterFrame = function() {
    dur = int(MySound.duration/1000);
    pos = int(MySound.position/1000);
    playTime = {};
    playTime.minutes = int((pos)/60);
    playTime.seconds = int((pos)%60);
    playTime.total = checkDigits(playTime.minutes)+":"+checkDigits(playTime.seconds);
    trackTime = {};
    trackTime.minutes = int(dur/60);
    trackTime.seconds = int(dur%60);
    trackTime.total = checkDigits(trackTime.minutes)+":"+checkDigits(trackTime.seconds);
    if (dipslay.load_display == undefined) {
        dipslay.display = playTime.total+" / "+trackTime.total;
    } else {
        dipslay.display = dipslay.load_display; }
    if (dipslay.trackDrag != true) {
        prozent = pos*100/dur;
        dipslay.track_play._xscale = prozent; } };
// prefixing a 0 to the time
function checkDigits(toCheck) {
    return (toCheck<10) ? toCheck="0"+toCheck : toCheck; }
// track progress slider functions
dipslay.track_back.onPress = function() {
    this._parent.trackDrag = true;
    this._parent.track_play.onEnterFrame = function() {
        perc = (this._parent._xmouse-this._parent.track_back._x)/this._parent.track_back._width;
        max = this._parent.track_load._width/this._parent.track_back._width;
        perc > max ? perc = max: null;
        perc < 0.01 ? perc = 0.01: null;
        this._width = this._parent.track_back._width*perc;
        this._parent._parent.pausePos = (perc*this._parent._parent.MySound.duration/1000); }; };
dipslay.track_back.onRelease = dipslay.track_back.onReleaseOutside = function () {
    delete this._parent.track_play.onEnterFrame;
    this._parent.trackDrag = false;
    MySound.stop();
    playSong(); };
// volume slider functions
vol_back.onPress = function() {
    vol_front.onEnterFrame = function() {
        perc = (_xmouse-vol_back._x)/vol_back._width;
        perc > 0.95 ? perc = 1: null;
        perc < 0.05 ? perc = 0: null;
        this._width = vol_back._width*perc;
        volume = Math.round(perc*100);
        MySound.setVolume(volume);
        dipslay.equalizer._yscale = volume; }; };
vol_back.onRelease = vol_back.onReleaseOutside=function () {
    delete vol_front.onEnterFrame; };
vol_front.setMask(vol_mask);
// drawing equalizer in actionscript
dipslay.equalizer.setMask(dipslay.eq_mask);
dipslay.equalizer.onEnterFrame = function() {
    i++;
    this.createEmptyMovieClip("graph"+i, i);
    with(this["graph"+i]) {
        _x = 0;
        _y = 0;
        beginFill(0x666666, 50);
        moveTo(0,0);
        for (j=0; j< 9; j++) {
            z = random(12)+8;
            lineTo(j*6,-1);
            lineTo(j*6,-z);
            lineTo(j*6+4,-z);
            lineTo(j*6+4,-1);
            lineTo(j*6,-1); }
        lineTo(j*6,0);
        lineTo(0,0);
        endFill(); }
    i >= 3 ? i=0: null; };
// scrolling the display song title
function scrollTitle() {
    dipslay.title.txt.autoSize = true;
    if (songTitel[current_song-1].length > 20) {
        dipslay.title.txt.text = songTitel[current_song-1]+"     "+songTitel[current_song-1];
        dipslay.title._x+dipslay.title._width/2 +4< dipslay.title_mask._x ? dipslay.title._x = dipslay.title_mask._x : dipslay.title._x--; }
    else {
        dipslay.title.txt.text = songTitel[current_song-1];
        dipslay.title._x = dipslay.title_mask._x-3; } }
dipslay.title.setMask(dipslay.title_mask);
setInterval(scrollTitle, 40);

Help Requested With ActionScript In MP3Player FLA
Hi All,

I have attached an MP3 player, written in Flash 5, that uses Actionscript and an XML file.

I have also attached 5 very short sample songs (2 seconds each).

I am having a challenge. The default setting for the player is on track repeat ( _parent.repeat="track"; )

I would like for the default setting to be ( _parent.repeat="all" ;)

When I manually set that value to "all", the player picks songs randomly and not in order (1,2,3,4 etc)

Also is there a way to get the repeat to play (1,2,3,4,5...1,2,3,4,5 as opposed to 1,2,3,4,5...4,3,2,1?

Thank you.

You will find most of the actionscript in the MC controler (controller) via Movie Explorer.

Mp3player...title Scrolling?
hey there!
i got a question about scrollong text on a dynamic textfield....
here: http://www.billstedt.biz/audio/player.html
can see my mp3 player..it works fine..but now id like to add the scrolling title feature...but i dont know how? maybe anyone can help me?

thanks
tayfun

2 Problems ( 1 Mp3player)(2 Picture Won't Go Away)
Link to file

please take a look at my code and perhaps tell my why my mp3 player won't play?

I also have pic that loads with the screen and then when I click the
buttons the info loads under the picture, how can I make the picture
go away when the buttons are clicked?

Mp3player Preloading With Scrub Bar
Hi everyone, I'm having problems creating an mp3 player, it's actually a plug-in component for our content management system so unfortunately I can't use the default component that flash provides.

I can load the mp3 fine by using loadSound(). And of course have the preloading option set to true.

So then I have an interval that updates every 100 miliseconds that tracks the position of the playhead.
If the user plays the file when it is still preloading the playhead goes all over the place. Look at the code I have below:


Code:
//---show the amount loaded
amountLoaded = (s.getBytesLoaded() / s.getBytesTotal() )
loader.loadBar._width = amountLoaded * 202.1
loader.scrub._x = s.position / s.duration * 202.1
So loader is the full bar which by default is empty.
loader.loadBar is the coloured bar inside which will show how much of the track has been loaded
loader.scrub is a little triangle pointing to your current place within the track.
202.1 is the width of the bar

The problem I have is that s.duration seems to take the duration of what's been downloaded, not the duration of the entire track. So if it has loaded 20 seconds of a 1 minute track, the pointer will show your position assuming you only have a 20 second track, so it will look like it is halfway through after just 10 seconds!

I have almost identical code for a video scrub bar and it works perfectly. So I have no idea what is wrong with this. Surely someone else must have had this problem!

2 Problems ( 1 Mp3player)(2 Picture Won't Go Away)
Link to file

please take a look at my code and perhaps tell my why my mp3 player won't play?

I also have pic that loads with the screen and then when I click the
buttons the info loads under the picture, how can I make the picture
go away when the buttons are clicked?

Creating A Mp3player For Php Script
Wonder how i would make a flash mp3 player to run on a php script site. with a stop go button. also Is there a way to make a flash calender that would embend into the php script. thnx for help lemi.

Flash Mp3player Not Working
Hi!
I've just finished the mp3player tutorial, and it works perfect when I run it local on my computer, but when I upload it on my server , the trackinfo field shows "undefined - undefined".
can somebody help me?

Thanks =)

mp3player.as
Code:

var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

var sa:Array = new Array();

var cps:Number = -1;

var pos:Number;

var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
   var nodes:Array = this.firstChild.childNodes;
   for (var i = 0; i<nodes.length; i++) {
      sa.push(new Song(nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track));
   }
   playSong();
};
xml.load("songs.xml");

function playSong():Void {
   s = new Sound();
   s.onSoundComplete = playSong;
   s.setVolume(75);
   mute.gotoAndStop('on');
   if (cps == sa.length-1) {
      cps = 0;
      s.loadSound(sa[cps].earl, true);
   } else {
      s.loadSound(sa[++cps].earl, true);
   }
   trackinfo.text = sa[cps].artist+' - '+sa[cps].track;
   playPause.gotoAndStop('pause');
}
function pauselt():Void {
   pos = s.position;
   s.stop();
}
function unPauselt():Void {
   s.start(pos/1000);
}
playPause.onRollOver = function() {
   if (this._currentframe == 1) {
      this.gotoAndStop('pauseOver');
   }
   if (this._currentframe == 20) {
      this.gotoAndStop('playOver');
   }
};
playPause.onRollOut = playPause.onReleaseOutside=function () {
   if (this._currentframe == 10) {
      this.gotoAndStop('pause');
   }
   if (this._currentframe == 30) {
      this.gotoAndStop('play');
   }
};
playPause.onRelease = function() {
   if (this._currentframe == 10) {
      this.gotoAndStop('playOver');
      this._parent.pauselt();
   } else {
      this.gotoAndStop('pauseOver');
      this._parent.unPauselt();
   }
};
next.onRollOver = function() {
   this.gotoAndStop('nextOver');
};
next.onRollOut = next.onReleaseOutside=function () {
   this.gotoAndStop('next');
};
next.onRelease = function() {
   this._parent.playSong();
};
mute.onRollOver = function() {
   if (this._currentframe == 1) {
      this.gotoAndStop('onOver');
   }
   if (this._currentframe == 20) {
      this.gotoAndStop('offOver');
   }
};
mute.onRollOut = mute.onReleaseOutside=function () {
   if (this._currentframe == 10) {
      this.gotoAndStop('on');
   }
   if (this._currentframe == 30) {
      this.gotoAndStop('off');
   }
};
mute.onRelease = function() {
   if (this._currentframe == 10) {
      this.gotoAndStop('offOver');
      s.setVolume(0);
   } else {
      this.gotoAndStop('onOver');
      s.setVolume(75);
   }
};



songs.xml
Code:

<?xml version='1.0' encoding='UTF-8'?>
<songs>
<song url='song.mp3' artist='Artist1' track='Track1' />
<song url='song2.mp3' artist='Artist2' track='Track2' />
</songs>


Song.as
Code:

class Song {
   public var earl:String;
   public var artist:String;
   public var track:String;
   public function Song(e:String, a:String, t:String) {
      earl = e;
      artist = a;
      track = t;
   }
}

Prob With Part 1 Of Lee's MP3Player
Hello.

I'm hung up on Part 1 of the mp3player.

I am getting the following error:
...mp3player1mp3Player.as: Line 28: '{' expected
function playSong():Void

-------------------

Here is my mp3Player.as:

Code:


//Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

//Array of songs
var sa:Array = new Array();

//Currently playing song
var cps:Number = -1;

//Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad=function()
{
   var nodes:Array = this.firstChild.childNodes;
   for (var i=0;i<nodes.length;i++)
   {
      sa.push(nodes[i].attributes.url)   
   }
   playSong();
}

xml.load("songs.xml");

//Play the MP3 File
function playSong():Void
{
   if(cps == sa.length -1)
   {
      cps = 0;
      s.loadSound(sa[cps], true);
   }
   else
   {
      s.loadSound(sa[++cps], true);
   }
}



-------------------------------

Here is my songs.xml:

Code:

    <?xmlversion="1.0"encoding="UTF-8"?>
    <songs>
      <song url="Track1.mp3"/>
      <song url="Track2.mp3"/>
      <song url="Track3.mp3"/>
      <song url="Track4.mp3"/>
     
    </songs>





---------------------------------

Here is what is in my 'mp3Player1' directory:

mp3Player.as
mp3Player.fla
mp3Player.swf
songs.xml
Track1.mp3
Track2.mp3
Track3.mp3
Track4.mp3


----------------------------------

Any suggestions or help would be greatly appreciated!
I've gone over this again and again.

Thanks

NIk

Mp3player Can't Find All The Xml Datas...
Hi !

I've tried to customise an mp3player, it work properly on my computer (local machine) and on Mozilla + Safari on Macintosh.

But on Internet Explorer PC I just can see the title of the song. The song don't start.

I think perhaps it's due to the path ???
I've tried to change several things but it doesn't work.

So here is a link with all the files: fla, swf, xml and an mp3

http://nonnonnonlesite.free.fr/player/

and here for the test:
http://nonnonnonlesite.free.fr/player/mzik.htm

Any HELP would really appreciated :D

THANKS A LOT

Problem With MP3player Class...
HI.

This is my code:
Code:

class com.mloncaric.soundPlayer {
   var xml:XML;
   var urls:Array;
   var artist:Array;
   var title:Array;
   var album:Array;
   var sound_obj:Sound;
   var index:Number = 0;
   //
   var isPlaying:Boolean = false;
   //
   function loadXML(targetXML:String) {
      xml = new XML();
      urls = new Array();
      artist = new Array();
      title = new Array();
      album = new Array();
      sound_obj = new Sound();
      //
      xml.ignoreWhite = true;
      //
      xml.onLoad = function(success:Boolean) {
         if (success) {
            var temp:Array = this.firstChild.childNodes;
            //
            for (var i:Number = 0; i<temp.length; i++) {
               artist.push(temp[i].attributes._artist);
               title.push(temp[i].attributes._title);
               album.push(temp[i].attributes._album);
               urls.push(temp[i].attributes._src);
            }
         }
      };
      //
      xml.load(targetXML);
   }
   //
   function playSong() {
      if (isPlaying == false) {
         sound_obj.start(0, 100);
         sound_obj.loadSound(urls[index], true);
         sound_obj.setVolume(100);
         isPlaying = true;
      }
   }
}


I'm working on this class for about 1 hour and still not getting it to work properly.

The problem is inside of for statement...
all Arrays inside of it should be filled with correct data and all what I get from tracers is undefined.

If anyone has any idea where is the problem please tell me (this is my first class so it is possible that I've done stupid mistake).

Thanks for now!

mloncaric

Mp3player.swf Wont Load In Movieclip
i dont get it. i have a main movie that has external movies load on button press, but tryin ta load this mp3player.swf just doesnt wanna work. anybody got any ideas as to why this wont work for me? ive tried levels, ive tried root, ive tried loadMovie, and lots of others. im not sure if it has to do with some of the other actionscript i have in my main movie but i also moved scripts around to fix that. still cant understand it. i even tried to use the same actionscript that the mp3player uses to load the mp3.swf, still nothing. i can bring up the mp3player.swf by itself and it will load the mp3.swf and play it just fine. but when i try to load the mp3player.swf in a movieclip on my main swf, i get nothing to load in that movieclip. ok, let me shut up. anybody got any ideas?

thanks for your time,

Struggle To Get Mp3player Funtional = Pweese Help
Hello

I've got an mp3player - decided to put it its own movieclip. Loads the initial track fine but won't play the menu track links.

The code for the track buttons:


on(release){
_level0.artist = "";
_level0.track = "'Falling Alone'";

_level0.newSong = "falling_alone_128k.mp3";
_root.gotoAndPlay("start");
}

Do I need to put the movieclip name in my code somewhere?
This is my script loading the initial track:


s = new Sound();

if(newSong !== undefined){
s.loadSound(newSong, true);
}
else{
s.loadSound("falling_alone_128k.mp3", true);
artist = "";
track = "'Falling Alone'";
}
s.onLoad = function(){
gotoAndPlay("Playing");
}

s.onSoundComplete = function(){
trackVar = "Please Choose Another Track";
gotoAndPlay("Paused");
}


In advance, many thanks
claude

The Missing GotoAndLearn.com Mp3player Code
Hello there,

I was wondering if anyone here happens to have the supplementry .zip file found on gotoAndLearn.com, that accompanied the last Mp3player tutorial before the site was pulled and the content rendered unavailable.

its a bit of a long shot, but i'd thought i'd ask. I just can't find it anywhere on the web, not even http://theflashblog.com/ .

thanks Cam

Problem With Volume Control For XML MP3Player
Hello there,
I'm super stuck on this (getting into the days catagory!) any help is much appreciated.

before i start, here's the link to what my XML MP3Player functions like atm;

http://www.oconnellconstruction.co.n...ayer/test.html

The foundations of the AS for this player are from the gotoAndplay.com tutorials, I'm having two problems with adding this volume slider control,

Firstly the SliderBar onload position, it is positioned on the far left of the screen, you can drag it towards the player, once you get it with'in the player it functions correctly moving between the designatd left and right x values correctly, but how can i get it to load into the player rather than out to the left?

And Secondly, by this stage you may have noticed no sound, i've tried alot of different things but to no avail?

below is the AS on the Volume slider with the instance name 'volslider'


Code:
onClipEvent (load) {

_root.shorat_mask._width = _root.volslider._x-_root.shorat._x;
left=(_root.volslider._x) - 48;
top=_root.shorat._y;
right=(_root.volslider._x) + 48;
bottom=_root.shorat._y;
_root.volslider._x=_root.shorat._width/2;
loadPosition=_root.volslider._x;
volCalc=_root.volslider._x-50
}

onClipEvent(mouseDown) {
startDrag(this, false, left , top , right, bottom)
}

onClipEvent(mouseUp) {
this.stopDrag();
}

onClipEvent(enterFrame) {
sliderx=_root.volslider._x; of slider
myMusicVolume=(sliderx-volCalc);value - n = 50
_root.s.setVolume(myMusicVolume);
_root.currentVolume=_root.s.getVolume();
_root.shorat_mask._width = _root.volslider._x-_root.shorat._x+12;
}
and this is the initial AS that loads the XML ;

Code:
// Setup sound object
var s : Sound = new Sound ();
s.onSoundComplete = playSong;
// Array of songs
var sa : Array = new Array ();
// Currently playing song
var cps : Number = - 1;
//Position of music
var pos : Number;
// Load the songs XML
var xml : XML = new XML ();
xml.ignoreWhite = true;
xml.onLoad = function ()
{
var nodes : Array = this.firstChild.childNodes;
for (var i = 0; i < nodes.length; i ++)
{
sa.push (new Song (nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track));
}
playSong ();
}
xml.load ("songs.xml");


could this VC method be done using fuse or MCtween instead ?
Many thanks to anyone who can help!

Mp3player Component List Selected
i have a as script that plays a mp3 and show the tittles in a list component
what i want to do is when someone clicks on a song that is on the list component , i want that song to play.

this is my code how would i make it work.







Attach Code

//Set up sound object

var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

// url vars
mytxt = _root.vars;

//Array of songs
var sa:Array = new Array();
var p:Array = new Array();

//Currently playing song
var cps:Number = -1;

//possition of music
var pos:Number;

//Laod the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(){
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
sa.push(nodes[i].attributes.url);
p.push(nodes[i].attributes.img);
theList.addItem((i+1) + ". " + nodes[i].attributes.alt,i);
}
playSong();
}

xml.load("songs.php");

// Play the MP3 file
function playSong():Void
{
s = new Sound();
s.onSoundComplete = playSong;

if(cps ==sa.length-1)
{
cps = 0;
s.loadSound(sa[cps],true);
}
else
{
s.loadSound(sa[++cps],true);
}
holder.loadMovie(p[cps]);
theList.selectedIndex=cps;

}

Problem With Volume Control For XML MP3Player
Hello there,
I'm super stuck on this (getting into the days catagory!) any help is much appreciated.

before i start, here's the link to what my XML MP3Player functions like atm;

http://www.oconnellconstruction.co.n...ayer/test.html

The foundations of the AS for this player are from the gotoAndplay.com tutorials, I'm having two problems with adding this volume slider control,

Firstly the SliderBar onload position, it is positioned on the far left of the screen, you can drag it towards the player, once you get it with'in the player it functions correctly moving between the designatd left and right x values correctly, but how can i get it to load into the player rather than out to the left?

And Secondly, by this stage you may have noticed no sound, i've tried alot of different things but to no avail?

below is the AS on the Volume slider with the instance name 'volslider'


Code:
onClipEvent (load) {

_root.shorat_mask._width = _root.volslider._x-_root.shorat._x;
left=(_root.volslider._x) - 48;
top=_root.shorat._y;
right=(_root.volslider._x) + 48;
bottom=_root.shorat._y;
_root.volslider._x=_root.shorat._width/2;
loadPosition=_root.volslider._x;
volCalc=_root.volslider._x-50
}

onClipEvent(mouseDown) {
startDrag(this, false, left , top , right, bottom)
}

onClipEvent(mouseUp) {
this.stopDrag();
}

onClipEvent(enterFrame) {
sliderx=_root.volslider._x; of slider
myMusicVolume=(sliderx-volCalc);value - n = 50
_root.s.setVolume(myMusicVolume);
_root.currentVolume=_root.s.getVolume();
_root.shorat_mask._width = _root.volslider._x-_root.shorat._x+12;
}
and this is the initial AS that loads the XML ;

Code:
// Setup sound object
var s : Sound = new Sound ();
s.onSoundComplete = playSong;
// Array of songs
var sa : Array = new Array ();
// Currently playing song
var cps : Number = - 1;
//Position of music
var pos : Number;
// Load the songs XML
var xml : XML = new XML ();
xml.ignoreWhite = true;
xml.onLoad = function ()
{
var nodes : Array = this.firstChild.childNodes;
for (var i = 0; i < nodes.length; i ++)
{
sa.push (new Song (nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track));
}
playSong ();
}
xml.load ("songs.xml");


could this VC method be done using fuse or MCtween instead ?
Many thanks to anyone who can help!

Mp3Player-volume Resets For Each Track
Hi folks

I have successfully taken the mp3Player tut and it works beautifully. Great tutorial by the way.

I am having an issue I do not know how to fix. I was hoping someone could assist me.

If I turn the sound off on any track, when the track completes and the next track loads, the next track loads with the volume on again. I realize that users should just pause the track instead of relying on volume to kill the sound, but try explaining that to someone who doesnt care. LOL !

I need the volume to stay off regardless of the next track loading.

Thanks in advance to anyone who has time to help with this issue.

Flash Mp3Player Part 2 TUTORIAL ...
I dont have much experience with AS, just a very basic understanding of how some of it works. With regard to this tutorial, the AS is setup so the first song starts playing automatically, but I'd like to have it so the user has to press the PLay button for the music to start.
My attempts at editing the AS to achieve this end up compromising the Pause/PauseIt functions from working, or no music at all. It's the principle/logic that I seem to be struggling with here.

I tried to work the 'playSong' function into the playPause=onRelease section, as well as some other things I'd rather not mention.
Any help would be greatly appreciated.


Code:

//Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

//Array of songs
var sa:Array = new Array();

//Currently playing song
var cps:Number = -1;

//Position of music
var pos:Number;

//Load the songs
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad= function()
{
   var nodes:Array = this.firstChild.childNodes;
   for(var i=0; i<nodes.length;i++)
   {
      sa.push(nodes[i].attributes.url);
   }
   playSong();
}

xml.load("songs.xml");

//PLay the mp3 file
function playSong():Void
{
   s=new Sound();
   if(cps == sa.length -1)
   {
      cps = 0;
      s.loadSound(sa[cps], true);
   }
   else
   {
      s.loadSound(sa[++cps], true);
   }
   playPause.gotoAndStop("pause");
}

//Pauses Music
function pauseIt():Void
{
   pos=s.position;
   s.stop();
}

//unPauses Music
function unpauseIt():Void
{
   s.start(pos/1000);
}

//Music Controls

//Play/Pause toggle
playPause.onRollOver=function()
{
   if(this._currentframe==1)this.gotoAndStop("pauseOver");
   else this.gotoAndStop("playOver");
}

playPause.onRollOut=playPause.onReleaseOutside=function()
{
   if(this._currentframe==10)this.gotoAndStop("pause");
   else this.gotoAndStop("play");
}

playPause.onRelease=function()
{
   if(this._currentframe==10)
   {
      this.gotoAndStop("playOver");
      this._parent.pauseIt();
   }
   else
   {
      this.gotoAndStop("pauseOver");
      this._parent.unpauseIt();
   }
}

//Next Button
next.onRollOver=function()
{
   this.gotoAndStop("nextOver");
}
next.onRollOut=next.onReleaseOutside=function()
{
   this.gotoAndStop("next");
}
next.onRelease=function()
{
   this._parent.playSong();
}

Mp3player With Scrolling Dynamic Textfield For The Title
hello guys...
ive got a little problem! here is my mp3player
http://www.billstedt.biz/adio/player.html
now id like to knwo how i can get this title scrolling alltime....like a newsticker ;-)
any one can help me?

tayfunde

Streaming Music, Playlist, Possibly Using XML, MP3player.
Ok I'm looking to get a working MP3 player sort of thing.
So the design and all will be done in flash, then this would link to a XML sheet with the playlist you want which has the name of the song and the URL then it streams and plays the song for you in the .swf.

I've seen something like this before it was called something like CoolPayer but it gave no code or how it's done so I didn't learn anything =/

If anyone could help me or maybe supply a partial and then help me like that it would be greatly appreciated, thanks for reading

How To Stop My Mp3Player To Reload With Every Page Change
Hi to all!

I got this problem, which I'm not very keen to solve, and would be cool if I can have some help from you guys..

I got AS2 mp3Player on my site's footer (asaucerfulofpixels.com/deuce) which is built with joomla. It's loaded with the XML playlist from the backend, but what is odd is that it reloads from the beginning every time the page is changed ie. clicked on the links in the top nav bar.

Is it possible to achieve that the player keeps playing the same song, once it's loaded, no matter on which page you are?

Thank you so much!

Flash Mp3Player Tutorial - Part 3 Actionscript Error
Hi,

First of all thanks to nebutch & yarcub for their halp on my last problem.

I have followed the video tutorial to get the song information to display through the dynamic text area but when I play the swf file I keep getting the same error. All I have done is added a year attribute to the xml file so that the year of the track may be displayed aswell. Can somebody please point out where I am going wrong again.

(ps; I am a newbie to all this coding!)

The error that comes up is below;

----------------------------------------------------------------------------------------------

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Player
ot working gotolearn.comSong.as: Line 2: ActionScript 2.0 class scripts may only define class or interface constructs.
{

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Player
ot working gotolearn.comSong.as: Line 3: Attribute used outside class.
public var earl:String;

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Player
ot working gotolearn.comSong.as: Line 4: Attribute used outside class.
public var artist:String;

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Player
ot working gotolearn.comSong.as: Line 5: Attribute used outside class.
public var track:String;

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Player
ot working gotolearn.comSong.as: Line 6: Attribute used outside class.
public var year:String;

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Player
ot working gotolearn.comSong.as: Line 8: Attribute used outside class.
public function Song(e:String, a:String, t:String, y:String)

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Player
ot working gotolearn.comSong.as: Line 15: ActionScript 2.0 class scripts may only define class or interface constructs.
}

Total ActionScript Errors: 7 Reported Errors: 7

Error opening URL "file:///D|/OFSYSTEMS/OFSYSTEMS%20WEB%20DESIGN/mp3Player/not%20working%20gotolearn.com/undefined"

---------------------------------------------------------------------------------


below is the actionscript for mp3Player.as:


// Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

//Array of songs
var sa:Array = new Array();

//currently playing song
var cps:Number = -1;

//Position of music
var pos:Number;

//Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
sa.push(new Song(nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track, nodes[i].attributes.year));
}
playSong();
}

xml.load("songs.xml");

//Play the mp3 player file
function playSong():Void
{
s = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);
mute.gotoAndStop('on');
if(cps == sa.length - 1)
{
cps = 0;
s.loadSound(sa[cps].earl, true);
}
else
{
s.loadSound(sa[++cps].earl, true);
}
playPause.gotoAndStop('pause');
}

//Pauses the music
function pauselt():Void
{
pos = s.position;
s.stop();
}

//unPauses the music
function unPauselt():Void
{
s.start(pos/1000)
}

//Music Controls

//Play/Pause Toggle
playPause.onRollOver = function()
{
if(this._currentframe == 1) this.gotoAndStop('pauseOver');
else this.gotoAndStop('playOver');
}

playPause.onRollOut = playPause.onReleaseOutside = function()
{
if(this._currentframe == 10) this.gotoAndStop('pause');
else this.gotoAndStop('play');
}

playPause.onRelease = function()
{
if(this._currentframe == 10)
{
this.gotoAndStop('playOver');
this._parent.pauselt();
}
else
{
this.gotoAndStop('pauseOver');
this._parent.unPauselt();
}
}

//Next Button
next.onRollOver = function()
{
this.gotoAndStop('nextOver');
}

next.onRollOut = next.onReleaseOutside = function()
{
this.gotoAndStop('next');
}

next.onRelease = function()
{
this._parent.playSong();
}

//Mute Button
mute.onRollOver = function()
{
if(this._currentframe == 1) this.gotoAndStop('onOver');
else this.gotoAndStop('offOver');
}

mute.onRollOut = mute.onReleaseOutside = function()
{
if(this._currentframe == 10) this.gotoAndStop('on');
else this.gotoAndStop('off');
}

mute.onRelease = function()
{
if(this._currentframe == 10)
{
this.gotoAndStop('offOver');
s.setVolume(0);
}
else
{
this.gotoAndStop('onOver');
s.setVolume(75);
}
}


---------------------------------------------------------------------------------------------------

Below is the actionscript for Song.as


classSong
{
public var earl:String;
public var artist:String;
public var track:String;
public var year:String;

public function Song(e:String, a:String, t:String, y:String)
{
earl = e;
artist = a;
track = t;
year = y;
}
}



Again your assistance is needed!!!

Flash Mp3Player Tutorial - Part 1 Actionscript Error
Hi,

I have followed the video tutorial to create a flash mp3 player but when I play the swf file I keep getting the same error with the .as file. Can somebody please point out where I am going wrong

The error that comes up is below;

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Playermp3Player.as: Line 19: Unexpected '}' encountered
}

**Error** D:OFSYSTEMSOFSYSTEMS WEB DESIGNmp3Playermp3Player.as: Line 23: Unexpected '}' encountered
}

Total ActionScript Errors: 2 Reported Errors: 2

Below is the script I have entered for the .as file

// Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);

//Array of songs
var sa:Array = new Array();

//currently playing song
var cps:Number = -1;

//Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
}
sa.push(nodes[i].attributes.url);
}
playSong();
}

xml.load("songs.xml");

//Play the mp3 player file
function playSong():Void
{
if(cps == sa.length - 1)
{
cps = 0;
s.loadSound(sa[cps], true;
}
else
{
s.loadSound(sa[++cps], true);
}
}


Your assistance is needed!!!

Help With "simple Mp3player" How To Make It Stop
Hiya all,

Unfortunately I need a helping hand again

On my website I've made a mp3player based on:

http://www.flashkit.com/movies/Soun...-9828/index.php

It's practically the same, except I've reskinned it. It loads external mp3 files to keep the size on the main swf file down. However my "stop" button doesnt function proper. When I pause a song, it simply pauses it for the duration of the clip, and as soon as the next song begin it starts playing again.

My pause button looks like this:

on (release) {
stopAllSounds();
}

How do I make a proper stop button for it?

Thanks in advance for any help, really appreciate it.

[b]need Some Assistance?[/b]
picture this:
scene1; 2 layers: first layer 'actions', second layer MC's; now frame 1 holds 'movie' frame 5 holds 'movie02'(actual names of MC's). from inside 'movie02' i have a button that when released should take me out of that movie back to the _root.movie("start");

this works fine but, i need to go to a specified frame label inside that 'movie' that is on the _root, in frame1 (as mentioned above).

summary-
so on the main timeline, going from frame 5 'movie02' to frame 1 'movie'.

but inside 'movie' to a specified frame label or frame 60 which is the same place.

?
any questions, just ask.
zeb00

Ack Assistance Please
hey there!

I have what either could be a very simple question or perhaps not so simple...

I want to import a graphic that is not a rectangle! how does one make it so that graphics/pictures/other flash can be seen behind non rectanglular pictures. whenever i import the picture it seems impossible to do this. but that cant be true.

It is really really frustrating.

Need Assistance
I have a Button thats takes the user to my other website but i need the button when pressed to promp the user for a login name and password. how is this done? I dont know where to start.

I Think I May Need Some Assistance
Hello,
I am making a movie that has a ball that randomly moves about the screen. I want it so that when you click it five times, it goes to frame 3. That's it. For some reason, it's not working. Maybe I have all the right script in all the wrong places. Here is my script.

Main Timeline:
Frame 1: num=0
Frame 2: stop()
Frame 3: stop()

Ball Instance in Main Timeline:
onClipEvent (enterFrame) {
if (hit=1) {
num+=1
}
if (num=5) {
gotoandPlay(3);
}
}

Ball Timeline:
Frame 1: _x=250; _y=250;
Frame 2:
random1 = 2*Math.random()-1
random2 = 2*Math.random()-1
xvel = random1*10
yvel = random2*10
_x+=xvel
_y+=yvel
if (_x>=500) {
_x+=-50
}
if (_x<=0) {
_x+=50
}
if (_y>=500) {
_y+=-50
}
if (_y<=0) {
_y+=50
}
Frame 3:gotoandPlay(2);

Invisible Button Instance on ball:
on (release) {
hit = 1
}
The ball moves around exactly how I want it. But, no matter how many times I click the ball, nothing happens. I am not sure what I am doing wrong. In theory, it seems like it shoudl work, but...nothing.
I would really really appreciate any help.

I Need Some Assistance
I downloaded a menu from ultrashock.com...the actual file can be found here:

http://www.ultrashock.com/cgi-bin/flas/jump2.cgi?ID=84

i checked out there forum and someone asked the same question i needed answered: "How do I change the "option" links to the text i want for my site?" somebody answered it with this reply:


The labels themselves are not dynamic, so you can't set them to different values. Therefore, i just made them dynamic (click on the text field and goto the text field options panel and choose dynamic from the pull down menu). I also had to give and instance name the movieclip containing the "option" button and text field (click the movie clip and goto the instance panel and type in the instance name). Now the movie clip can be referenced in relation to the rest of the movie.

Now i notice in Odendaal's code he used this:
while (count < VerticeNum) {
count ++;
duplicateMovieClip("Vertex", "Vertex" add count, count );
}

This means that all the movieclips are just going to be "vertex" plus the number that count is equal to. Examples of these names are vertex1, vertex2, and vertex3.


So the path to the "option" button is now vertex1.option.label. The instance name i gave the "option" movieclip was indeed option and the dynamic text field i called label. With this information, we can now set the text fields of each variable.

vertex1.option.label = "Home"
vertex2.option.label = "About Us"
vertex3.option.label = "Contact"




for linking to a url, you could simply add a link variable to the movieclip being duplicated. Then, simply have the button:

on (release)
{
getURL (_parent.link, _blank)
}

Then, simply manually enter in the links as you did the names.



so what exactly does this mean?...i've spent 3 hours trying to figure this out and am getting really frustrated...can someone please help me?



BlAcKjAcKRFD@msn.com

In Need Of Assistance
Hi =)i have a problem (obvious).
I'm trying to make a "box" to follow the mouse cursor but only in a horizontal rectangle and only when the cursur is in the same height as the rectangle, now i have a box as a movie clip and has this script to it:

onClipEvent (enterFrame) {
_x+=(_parent._xmouse-_x)*.3;}

it makes the "box" follow the mouse in a horizontal way all right but it do so no matter were i have the cursor on the sceen and i have no idee how to make the box to stay in the rectangle.

I hope that some one off u script masters understood my problem (and my english) =P

(i attach a fla file that maybe explain it better )
(FLASH 5)

A Little Assistance If You Please.
Flash MX 2004 Pro.

I'm in the middle of a game that needs a certain mechanic while playing.

A grid of 5x5 squares:

X,X,X,X,X
X,X,X,X,X
X,X,X,X,X
X,X,X,X,X
X,X,X,X,X

Each square can have a value of 1 to max_prize.
I'm looking for a function that will select a random grid number and give it a random value between 1 & max_prize. Easy until you realise that there must never be a line of 3 like values in the grid (horizontally, vertically or diagonally).

It would also be handy if I could trigger a line of 3 like values at some point within this function.

Any ideas?

I know that it would probably be best using an array for the grid and perform checks to see what values are already around the grid number.

Many thanks in advance.

Gav

In Need Of Some Assistance
Hello, im relativly new to flash and am usin Flash MX
I am making a website and have come accross a few problems
1 -I have a symbol which has several buttons inside it, there is script attached to these buttons, currently it is "on (release) {gotoAndStop('Scene 1',7)}". What i want it to do is to, in scene 1, goto frame 7. However it just goes to frame 7 of the Symbol.
Why is this and could someone please assist me with my script, as i believe it is currently wrong?

2 -in the same symbol there is flickering when i "test movie", is this normal and can it be stopped?

3 -when i attempt to open my flash project in internet explorer i get a security warning, i am making this web site for a business so it would be desirable for this to not comme up, is there a way of avoiding this?

Please, Please Help Need Assistance
Hi,
HELP, I NEED SOME PRO FlashMX 8 ASSISTANCE!!

I'm currently working on a website for a Jimmy Buffet type band.
Here is the link:

http://www.AltGraphicDesign.com/Mr_Myers/Mr_Myers.html

Is there anyone out there that can help me with a certain scrolling text box inside a movie! I have spent HOURS upon HOURS literally trying to make a certain scrolling text box in my movie.

HERE IS THE BIG PROBLEM I'M HAVING!
The site loads and you then click on the MAP that the parrot is holding in his mouth for the dropdown navigation. All is good so far. Click on "Band Bio" button from the list. The bandbio.swf file loads into a Container in Main Movie Mr_Myers.swf

A bottle comes up with a scroll rolled up inside. You pop the cork and out comes the the paper scroll. Inside the large scroll, when it drops down, I 'm trying to create a scrolling text box on top of the paper scroll. However I am very poor with communicating to target movies etc. and I have spent countless hours trying to get this too work, without loading it externally, to no avail! The text is already there. All I need is for the text to be be able to scroll when the paper opens up.

(I KNOW HOW TO MAKE TEXT SCROLL BY ITSELF. BUT FOR SOME REASON THIS TEXT WONT DO IT BECAUSE ITS INSIDE A MOVIE CLIP)

I have the .fla files. if you need me to email!

The "bandbio.swf movie loads into an empty movie clip with an instance called .Container in the main movie.

"bandbio.swf file doesn't need to load into via .Container. It can just load through a simple loadMovie function.

PLEASE HELP!!!! I WILL PAY $ IF NEED BE IT!!!
I need to get this done very soon! My client awaits, and I'm tired!

Thank You!
http://www.AltGraphicDesign.com/Mr_Myers/Mr_Myers.html

Some Assistance Please...
Population keeps coming up undefined in the popup but traces the correct values. I'm stuck on how to write it properly to display in the dynamic txt field. Thanks guys.


Code:
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("stats.xml");
popup._visible = false;
function loadXML(loaded) {
if (loaded) {
state = new Array();
population = new Array();
for (i=0; i<3; i++) {
state[i] = this.firstChild.childNodes[i].childNodes[0].childNodes[0].nodeValue;
population[i] = this.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue;
trace(state[i]);
trace(population[i]);
}
for (i=0; i<state.length; i++) {
_root[state[i]].onRollOver = function() {
popup._visible = true;
popup.statename.text = "State: "+this._name;
popup.population.text = "Population: "+population[i];
};
_root[state[i]].onRollOut = function() {
popup._visible = false;
popup.statename.text = "";
popup.population.text = "";
};
}
}
}
XML File...

Code:
<?xml version="1.0"?>
<country>
<state>
<name>California</name>
<population>33,871,648</population>
</state>
<state>
<name>Arizona</name>
<population>5,130,632</population>
</state>
<state>
<name>Texas</name>
<population>20,851,820</population>
</state>
</country>

Willing To Pay For Help But Need Assistance Please...
Can anyone offer some insight as to how to generate the ekg type of an effect seen here:

www.rockinwithremedy.com

I'm creating a website for a local pediatric office and they are looking to implement a similar effect. I'm a relative novice with flash so if you can provide help, I'm willing to pay.

Thanks!

Steve

Need Assistance Please
Hello I need some assistance with getting the whole opening a custom browser window in Flash 8.
Here's the thing I have a web page which I want to use as a gallery for photos. I have links which when pressed I'd like a centered browser window to open with the photo in it. I kknow there are many tutorials on this but Im trying really hard to follow them and getting no where.

I've got the whole concept of placing the get URL script on the button but after that Im lost.
I know you have to place code in the HTML file also but it just doesn't seem to be working for me can someone please give me a step by step on this. just where I should be placing everythinng and in which HTML file.

I know I should have an swf file which has my button with the script in it, a HTML file which when I publish the SWF should be generated but that's about all I know. Can someone please assist me I really could use the help.

Thanks much .

Looking For Any Assistance
see script below.. for some reason the createTextfield command does not
display the text but does create the box. any ideas? I am also trying to
repeat the movie clip with dynamic text in it to scroll up the screen but it
is not creating the next instances of the clip when the repeater is called.
please let me know what you would do. thank you!

SW = Stage.width; // scene width
SH = Stage.height; // scene height
_global.MSG_SPEED = 3;
var lvl:Number=0;

MovieClip.prototype.Txt = function(){
trace("clipName:"+clipName)
trace("LVL:"+lvl)
mc.createTextField("mytext",this.getNextHighestDepth(),100,100,300,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
mytext._alpha = 100;
mytext.text = "Text Goes Here";
trace(lvl+" - "+ smText);
};
MovieClip.prototype.Move = function(){
if (mc._y > -100) {
mc._y -=_global.MSG_SPEED;
trace("mc._y:"+mc._y);
} else {
mc.removeMovieClip();
trace("FireFly:remove");
}
};
setInterval( MovieClip.prototype.Move , 20 );

Repeater();
//Repeat interval to write text to screen
function Repeater(){
//Call the new message function every X Seconds
lvl= lvl+1
clipName = "msg"+lvl
trace(" clipName:"+ clipName);
trace(" lvl:"+ lvl);

var mc = this.createEmptyMovieClip( "mc",clipName,
this.getNextHighestDepth());
mc.beginFill (0x666666, 20);mc.lineStyle (1, color, alpha); mc.moveTo
( 200, 200); mc.lineTo ( 200 + 400, 200 ); mc.lineTo ( 400 + 400, 200 +
200); mc.lineTo ( 400, 200 + 200 );
mc.endFill();
mc._x = 30;
mc._y = SH;
mc.Txt();


};
setInterval( Repeater , 2000 );

Looking For Some Assistance
I would be classified as a beginner when it comes to flash. When searching around in the forums, I feel completely lost when I see a huge list of actionscript. However, I was hoping someone would be able to direct me to some great beginner tutorials or assist me right in here. What i'm trying to do is build a website to showcase my work as a game designer; mainly artwork, movies, flash games, and user downloadable modding/mapping files. What I'm looking for is....

1) How to load images/movies from external sources. I managed to find a resource that explains using "load external movieclip". It works perfectly for the images, and seemed to work for .swf files. However, what can I use to load other movie types such as (.wmv, .mpg, .avi)?

2) How to add a simple preloader to the images/movies that will be loading.

3) How to load flash games. I'm not certain, but my best guess is that I could use the "low external movieclip" behavior.

4) The last thing I want to know is how I can allow users to download files from my flash site. I'm going to use a simple button, but I'm unsure of how to set that up.


Like I said, I'm only a beginner, so any tutorials related to what I need or code samples of what might work would be greatly appreciated. Thank you!

Re.: Need Assistance
Dear all,

hope that someone out there could help me with the following queries:
I am a new Flash user and currently using MX2004 Pro. I encountered some problems creating hyperlinks and Contact Me button.
I was following the instructions laid out in

(1) Creating Email Button:
http://www.kirupaforum.com/forums/newthread.php?do=newthread&f=35

Under Mail Button, Step 2
I was unable to find Basic Actions>on mouse event then go to Basic actions> get URL as the menu in Flash MX has changed.


(2) Linking a Button:
http://www.kirupa.com/developer/flash5/buttonlink.htm

Step i
I was unable to locate Basic Actions>Get URL as well..:'(


Would someone help me??
Thank you in advance.


Regards,
ernie

XML Assistance ~ PLEASE
Here are the files...
http://www.truthchurch.com/test/

I dont want to use the "title" attibute because I want the ability to write 5-6 lines of text (not all on one line) in a nice format...

I want this only to have nice formatted text and I am having difficulties...
If there is a simple way to do this please let me know...

I have the gallery exactly how i want it...but now my challenge is displaying the text to look like this...

Giggle Moon
Love, Cherish, Joy
3pc Set (top, leggings, minki dot skirt)
Sizes 3M, 6M, 9M, 12M, 18M, 24M
Available in Pink and Lavender
Price: $48

Rather than what it is currently looking like (non formatted)
I hope I am explaining it well enough. any help would be very much appreciated as I have spent a lot of trial and error time on this today.

thanks a mill!

Me Again... Need Some More Assistance If You Please
thanks to kax i got my flash menu to work! thanks kax. but i added a couple things onto it, i added a rollover onto the buttons. and this is what happened
does anyone know why the buttons are flashing?? i double clicked on the button so it showed the hit states, and i added another layer. and added a frame to the over state. then added a keyframe on the over state for the second layer and then placed my rollover button on that keyframe.... if it's not one thing, it's the next... OY!!!! thanks in advance

Copyright © 2005-08 www.BigResource.com, All rights reserved