Home  | Login  | Register  | Help  | Play 

Flash: JukeBox without XML - Collab'ed With Althorne

 
Logged in as: Guest
  Printable Version
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> Flash: JukeBox without XML - Collab'ed With Althorne
Forum Login
Message << Older Topic   Newer Topic >>
9/3/2008 13:58:03   
dominic_r_monroe
Member

Welcome, This is my tutorial for making a jukebox. After reading Althorne's tutorial I noticed that the sound quality was unfortunately Lowered.
So after a while of searching I discovered some AS2 Code that would help !


quote:

//FRAME ACTIONS

var songID:String; //Declares the variable SongID a string value (text and numbers)

songInfo = new Array(); //Declares the variable songInfo an array
//ALL KEYS MUST BE DIFFERENT, BUT VALUES CAN BE THE SAME!!
songInfo["Key"] = "Value"; //An Example Value in the array with the key 'Key'. Duplicate the line, and change the key to one you like. Change the value on the variable to the FILENAME of your mp3 WITHOUT THE .mp3

loadSong=function(songID){ //Declares loadSong a function. When the function is run, a value for the variable SongID
stopAllSounds(); //Stops ALL Sounds
loadedSong = new Sound(soundLoader); //The variable loadedSong is a new sound. When a sound is loaded into it, it is given the instance name soundLoader
loadedSong.loadSound(songInfo[songID] + '.mp3', true); //Loads a song into the variable loadedSong. The name of the file is songInfo[theKeyYouGiveInTheButton] and it adds the string .mp3 to the end.
} //Ends the statement block


The script is pretty Much Self Explanitory. Add this to the frame. On a new layer called Actionscipt

//BUTTON ACTIONS

quote:

on (release) { //Executes The Following Block of Code When The Mouse Is Clicked
loadSong("Key"); //Runs the loadSong() function that is declared in frame 1. The "Key" refers to the key declared in the array on frame 1. Look there for full description
} //Ends code block

Yet again Very Self-Explanatory. Thanks to Althorne. He pretty Much just Array Versioned my script. :L.
Key = Song Name
Value = Name of .mp3.mp3 n the end is not required.

Now test your jukebox by hitting Control + Enter. Before exporting in flash. If wanted you could Add colours and other wonderful effects. I may Make an equalizer bar tutorial using the Mask Feature at a point.
But until Then Good Luck. Export as .swf. And put in the FOLDER Containg .swf and Music files

Notes: Now make sure the Sound files are in the same folder as the swf file. Remeber to rename nameofsongfile.mp3 from the code to what the .mp3 file is E.g Glamorous-LudacrisFtFergie.mp3.
If you try and upload The swf alone it will not work ! You must upload the folder. I know that BiG Frend was doing free hostin not long ago, contact him for details.

I will try and get my Jukebox up somewhere on the internet. I am planning on getting a new site.


Thanks to Althorne for contributing his Arrays Etc. TO my Tutorial !

< Message edited by dominic_r_monroe -- 9/4/2008 13:33:54 >


_____________________________

AQ  Post #: 1
9/5/2008 11:04:14   
The Illusive Man
Member

Whee! I helped!

I might try to add a list function to it, but no promises.
Post #: 2
9/5/2008 11:18:12   
swenn
Member

Woah.. this I didnt know we had this advanced AS at the forums.. I will try this sometime^^
AQ MQ  Post #: 3
9/5/2008 11:18:22   
biG frend
Member

Using your method would not increase the filesize would it though? I just skimmed and haven't tried it but nice semi-tut.
AQ DF MQ  Post #: 4
9/5/2008 11:21:36   
dominic_r_monroe
Member

You Arent adding the MP3 to the file. Your still leaving it in the folder.
AQ  Post #: 5
9/5/2008 11:36:51   
biG frend
Member

Well I assumed their was a quality loss would of caused a file size to fall as well.
AQ DF MQ  Post #: 6
9/5/2008 14:44:25   
dominic_r_monroe
Member

No. The quality was lowered because it was a .SWF. And the quality size was smaller once inside the .swf which was loaded externally.

AQ  Post #: 7
Page:   [1]
All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy >> Flash: JukeBox without XML - Collab'ed With Althorne
Jump to:



Advertisement




Icon Legend
New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts




Forum Content Copyright © 2018 Artix Entertainment, LLC.

"AdventureQuest", "DragonFable", "MechQuest", "EpicDuel", "BattleOn.com", "AdventureQuest Worlds", "Artix Entertainment"
and all game character names are either trademarks or registered trademarks of Artix Entertainment, LLC. All rights are reserved.
PRIVACY POLICY


Forum Software © ASPPlayground.NET Advanced Edition