•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Graphics and Multimedia section within the Web Development category of DaniWeb, a massive community of 391,662 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,853 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Graphics and Multimedia advertiser:
Views: 573 | Replies: 6 | Solved
![]() |
•
•
Join Date: May 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Hello
I have purchase a template and need some help with changing the music in the template. I have never seen this type of action script before so I am not sure how the music is loading. I am used to seeing it in the time line and library which it is not.
I don't see a icon for the music in the libary. I only see a movie clip called player and a movie clip called sound componet that both have some action script ing that reads the following:
THIS WAS ALSO SOME ADDED SCRIPT IN A MOVIE CLIP CALL SOUND- COMPONET
Hopefully this is something simple. I just want to change the song and I am not sure what is happening here.
Please help anyone.
I am new at this which I sure you can tell.
Thanks
Mary
I have purchase a template and need some help with changing the music in the template. I have never seen this type of action script before so I am not sure how the music is loading. I am used to seeing it in the time line and library which it is not.
I don't see a icon for the music in the libary. I only see a movie clip called player and a movie clip called sound componet that both have some action script ing that reads the following:
var numtrack = 1;
var maxTracks = 3;
var my_sound:Sound = new Sound();
var _this:MovieClip = this;
var txt:TextField = this.txt;
txt.autoSize = true;
//
my_sound.onLoad = function(success:Boolean) {
if (success) {
_this.txt.text = "";
my_sound.start();
_this.txt._x = 0;
clearInterval(_this.interval);
}
};
my_sound.loadSound("music/track1.mp3", false);
function loader(sound:Sound) {
if (sound.getBytesLoaded() != undefined && sound.getBytesTotal() != undefined){
var gbl:Number = sound.getBytesLoaded();
var gbt:Number = sound.getBytesTotal();
} else {
var gbl:Number = 0;
var gbt:Number = 100;
}
_this.txt.text = "track "+numtrack+" "+"loading "+Math.round(gbl/gbt*100)+"%";
//_this.txt._x = -15 - _this.txt._width;
if (gbl >= gbt){
_this.txt.text = "";
}
}
my_sound.onSoundComplete = function() {
numtrack++;
if (numtrack == 4) {
numtrack = 1;
}
my_sound.loadSound("music/track"+numtrack+".mp3", false); var interval:Number = setInterval(_this, "loader", 1, my_sound); } // var interval:Number = setInterval(_this, "loader", 1, my_sound); // player controls btnNext.onRelease = function() {
numtrack++;
if (numtrack == maxTracks+1) {
numtrack = 1;
}
my_sound.loadSound("music/track"+numtrack+".mp3", false);
_this.interval = setInterval(_this, "loader", 1, my_sound); };
btnPrev.onRelease = function() {
numtrack--;
if (numtrack == 0) {
numtrack = 3;
}
my_sound.loadSound("music/track"+numtrack+".mp3", false);
_this.interval = setInterval(_this, "loader", 1, my_sound); };
btnStop.onRelease = function() {
my_sound.start();
my_sound.stop();
};
btnPlay.onRelease = function() {
my_sound.stop();
my_sound.start();
};THIS WAS ALSO SOME ADDED SCRIPT IN A MOVIE CLIP CALL SOUND- COMPONET
var s_volume = 40;
var widthVolumeLine = s._width;
s._width = s_volume*widthVolumeLine/100; var mySound = new Sound(); var maxvolume = 100; var minvolume = 0; var soundFlag = false; controlSound.onEnterFrame = function() {
mySound.setVolume(s_volume);
if (soundFlag == true) {
s._width = _xmouse;
if (s._width>69) {
s._width = 69;
}
// end if
if (s._width<0 || _xmouse<0) {
s._width = 0;
}
// end if
s_volume = s._width*1.520000;
}
};
var mouseListenerVolume:Object = new Object(); mouseListenerVolume.onMouseDown = function() {
if (controlSound.hitTest(_root._xmouse, _root._ymouse)) {
soundFlag = true;
}
};
mouseListenerVolume.onMouseUp = function() {
soundFlag = false;
};
Mouse.addListener(mouseListenerVolume);Hopefully this is something simple. I just want to change the song and I am not sure what is happening here.
Please help anyone.
I am new at this which I sure you can tell.
Thanks
Mary
Last edited by peter_budo : May 28th, 2008 at 6:47 pm. Reason: Keep It Organized - please use [code] tags
my_sound.loadSound("music/track1.mp3", false); This tells me that the music is being downloaded and is not actually in the flash movie or library. Look in the folder that you downloaded. It should contain a subfolder named music. Inside (I think) will contain mp3's named track1.mp3,track2.mp3, & track3.mp3. my_sound.onSoundComplete = function() {
numtrack++;
if (numtrack == 4) {
numtrack = 1;
}This is all just a guess but hopefully it will help get you going in the right direction.
Last edited by buddylee17 : May 28th, 2008 at 5:39 pm.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Graphics and Multimedia Marketplace
•
•
•
•
aac adobe animations aol apple audio beatles copyright dell digital downloads drm dvd emi facebook fairplay files flash flash flv free hard drive interactivity. internet radio ipod itunes laptop legal linux media memory mp3 multimedia music napster news pandora riaa sales sandisk scripting security store stream streaming video web development youtube
- Flash not working?! (Web Browsers)
- I want to make my music not downloadable (Graphics and Multimedia)
- Flash 9 Equalizer Demo and Source (Graphics and Multimedia)
- Music Quiz Round 8 (Geeks' Lounge)
- Freeprodtb!! (Viruses, Spyware and other Nasties)
- problem w/ multiple mp3 flash players on one page (Graphics and Multimedia)
- Music ON (Graphics and Multimedia)
- Flash within DHTML (JavaScript / DHTML / AJAX)
- Backround music won't play in any browser (Web Browsers)
- ASUS Flash Bios - Boot Problem (Motherboards, CPUs and RAM)
Other Threads in the Graphics and Multimedia Forum
- Previous Thread: photoshop image into flash
- Next Thread: flash movie help


Linear Mode