Possible? Load External MP3s To Flash Movie
Okay, I'm sure someone's asked this before, and I DID do a search in the forums, but the results were endless and didn't pertain to my question:
Can a Flash movie load an external MP3 and control it in the same manner as an embedded sound file?
If so, what would be the statement(s) used to load the MP3?
Thanx
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-09-2002, 07:29 PM
View Complete Forum Thread with Replies
Sponsored Links:
Flash 8 Problem Linking To External Mp3s
I am using date and sound classes to upload mp3s based on date. It works fine as long as the sounds are in the library... Unfortunately I cannot have them reside there - the file gets too huge. I had them placed on our server.
I removed the mp3 files from the fla library and then pointed the action script to call up the sounds from the urls where they now reside. I get an undefined error - it is looking for the mp3s on my desktop. How do I get the fla to point to the urls??? Anyone had this problem?
View Replies !
View Related
Playing External Mono MP3s In Flash
Hallo all.
Just wanna know if anyone else has got this problem where external mono mp3s play twice the speed in Flash. I think I heard something about this quite a while ago but cant remember what the deal with it was. Anyone know how to fix this? Any help appreciated a lot.
Thanx
L.
View Replies !
View Related
1 Play/Stop Flash Button - Many External Mp3s
I've searched around and can't seem to find an exact answer to my problem, so I'm hoping a FlashKit'er could lend a helping hand or at least a push in the right direction.
OK, lemme explain first. I have a very simple HTML site that has a list of ringtones for mobile phones. The list is: Artist, Title and then a Listen/Buy .gif button. The button opens a popup with information about how to 'install(?)' the ringtone onto your phone. What I would also like it to have is a simple Flash audio player, just with Play and Stop (maybe a progress timeline thing).
Now my question:
Is there a way to make one standard .swf that will play the external mp3 that is targeted from without the .swf, in just say, the HTML code or JS or even a .txt file?
The reason I ask is because I don't want to have to make 20+ seperate .swfs, plus it will make it easier for me to add or alter new ringtones in the future.
Can this be done? Can you understand my ramblings? Hahaha, I hope so.
I look forward to hearing from you all soon. Many thanx in advance...
View Replies !
View Related
Flash MX: Load External Movie
I am loading external *.swfs into a blank movie clip that sits in the main timeline of the master movie using the following code:
_root.loadMovie("module1.swf","container");
When the new movie loads, it seems to replace the entire master movie with the new *.swf. I want it to simply sit on top of the master...this is probably pretty obvious, but I appear to be missing something.
Any clues?
TIA
Shawn
View Replies !
View Related
Load Movie In External Flash Player
hi there,
i have a main movie, lets call it 'apartment'
on one frame in the 'apartment' there is a word 'cat' on it.
what do i haev to do if what i want is,
when my interacter clicks on teh word 'cat' there is another flash movie player pop-up and shows another movie.
please tell me, i dunno how to do that but i want that.
thank you,
lolli
View Replies !
View Related
Load External .JPGs Into Flash Movie
I have recently completed working on a Flash MX 2004 file that displays a panoramic photo that can manipulated using interactive controls (plays forward, reverse, zoom in/out, etc.). However, the .jpg image was imported into the Flash file. I would like to be able to load the graphic externally (using actionscript?) to be able to change it with another .jpg of the same size/dimension without opening the .fla. Does anyone have any suggestions?
Thanks
View Replies !
View Related
How Do I Load External Mp3 Files Intop My Flash Movie
Ok
Well i am a bit embarrassed as I ave made some movies so far that are not that simple but as yet I have not found out how to load in mp3's
I want to be able to load a mp3 file dynamically from outside the flash movie in the sense that it doesnt have to be in the library. It can be loaded dynamically like a text file.
So I click a button and the mp3 is loaded in dynamically and streamed.
Can someonme show me how to do this. Would love if someone could send an example .fla to my email address so i could see how they did.
have tried loadSound etc so if someone does have a working example where mp3's are loaded I would be most grateful.
please only send to my email as i cant download attachments from flashkit for some reason.
any idae of how to control the volume of the track with a slider and using sound.setVolume
my email is
pixelmagikau@yahoo.com.au
cheers
Pixelmagik
View Replies !
View Related
I Want To Load Mp3s
I have used loadsound a counple of time and this fuction is working fine as long as I use Windows 2000 but when I tried it out in UNIX it failed to load any sound can anyone tell me why is that its Urgent do replay as soon as possible
View Replies !
View Related
Help Trigger External Movie To Load From Button In Another External Movie - Stuck
I really hope someone can help me!!!
I am loading movie C.swf into movie B.swf which gets loaded into movie A.swf the main movie. All loading works except C.swf has buttons that need to trigger another movie E.swf to load into A.swf and that is not working!!!
Here is the structure I am using:
A.swf (main final movie loads B.swf on start)
B.swf (loads main nav C.swf and scrolls it infinitely)
C.swf (main nav with buttons that trigger sub nav E.swf to load into A.swf)
E.swf (sub nav with buttons that trigger F.swf to load into A.swf)
F.swf (scrolling images of portfolio)
The actionscript I am using for the button in C.swf to trigger E.swf to load into the main movie A.swf is:
metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);
this.enabled = false;
loadMovieNum("E.swf", 1); // trigger sub nav E.swf to load into A.swf
};
I am so stuck with this and seems so simple a problem, but I'm just pulling hairs out at this point, can anyone please help me!
View Replies !
View Related
Best Way To Load And Control Several Mp3s
I have noticed a couple different ways that folks are treating streaming mp3s. I have about 22 of them that are about 1MB each that will serve as examples in a portfolio.
This is obviously a lot to download, and folks may not want to download all of them, maybe one or two, so it wouldn't make sense to force them to download every one of them.
Therefore, I want to stream each one individually, but I also want to be able to control their volume. I have found a couple of tutorials for sounds that are in the library, but not for streaming mp3s.
Anyone know of any tutes on this, or if there is a better approach?
muchas gracias.
View Replies !
View Related
Publishing From F8 To F6: MP3s Don't Load
So I made a website using Flash 8. It included buttons that streamed MP3s from an external file on the server and displayed text about the song in a text field. When all was said and done, and I published and prepared my Flash SWF in Dreamweaver, I noticed that certain computers I used could view the site in its entirety, while others displayed the site with missing buttons and other oddities. So to correct it, so that more computers could view it, I was advised to publish the movie as an older Flash 6 SWF. Well this corrected the problem, as all the buttons were visible and everything looked fine, but now the MP3s don't play. How can I get the external MP3s to stream and play? Is there a problem with the ActionScripting? They were able to play before I published in Flash 6. Any help is greatly appreciated!!
View Replies !
View Related
Trouble Getting Mp3s To Load
Hi everyone. I have an mp3 song play list but having some trouble getting songs to load. I followed a tutorial at http://kennybellew.com/tutorial/preload_multiple.htm, but it seems that some songs don't play after loading has finished, I'll have to hit play a couple times for it to play. My only guess is the fact I am using Flash 8? maybe the coding should be a little different? a little confused. Ive attached the fla with songlist txt files to load but adding audio files would be to big. The audio files are sample 30 sec clips.
View Replies !
View Related
For Loop To Load MP3s
I'm trying to load a bunch of mp3's as sound objects with code. Here's what I thought would work,
Code:
//create an array of mp3's to load
mp3s = ['3-1.mp3','3-2.mp3','3-3.mp3','3-4.mp3','3-5.mp3','3-6.mp3','3-7.mp3','3-8.mp3','3-9.mp3','3-10.mp3','3-11.mp3']
//create a sound object for each movie clip
for(i=0;i<mp3s.length;i++){
_root."narr"+i = new Sound();
_root["narr"+i].loadSound(mp3s[i]);
}
But flash doesn't like the _root."narr"+i part. How do I do this properly?
Thanks,
Jake
View Replies !
View Related
External MP3s
I have a button created where I would like the user to click to open an MP3 file. But the file is large enough where I don't want to embed it into the swf file. I would like a Quicktime or Real player to open to play this file externally. I've tried a few things and not much seems to work.
Can this be done? Can anyone help me?
Thanks
View Replies !
View Related
Undesired Load Order Of FLV And MP3s
Hello
I have added a scrolling Flash page with a FLV and several MP3 files in each their own player to site below.
I have set the video to autostart.
The MP3s are set to not autostart.
When I export the FLA the swf nicely plays the video first, and the mp3s are loading in the background simultaniously.
When viewing the page in Firefox and Netscape the same happens, just as intended.
Problem:
But in IE and Safari all the sound files are loading first (and not playing) and not until they are fully loaded will the video start loading and playing. This results in viewing an empty video window for a long time.
1) Is there are way to make all browsers load the video first and play it first?
2) And in general manage load order of video and audio files in a Flash file?
Thank you on beforehand.
ggaarde
http://www.corpstory.com/video.htm
View Replies !
View Related
Linking External Mp3s
i'm building a psuedo-jukebox. i ideally want to dyamically import mp3s into my flash movie using the loadMovie function, having the title being pulled from a .txt file. however, i'm using mysound.attachSound("idName")to control all my audio. since the sounds will not originate in the fla's library, i cannot set them for export in its symbol linkage properties.
is this possible to link and control the sounds once they're imported into the swf? rephrased: how do i give an imported mp3 an "idName?"
i can build invid swfs that contain the linked mp3s, but this is removing one level of dynamic control, so is a less desired solution.
thanks
JWT
View Replies !
View Related
Problem: External Mp3s In W2k
Hi,
I am creating CD-ROM based training program that has a lot of narration. I am loading external mp3s. For the most part its working great. However, on W2k about halfway through the program (intermitently and never in the same spot), the audio starts to break up and eventually stops. If I quit and start again the audio is working again.
When I used to have this kind of problem in Director I would unload memory and that would fix the problem. This is acting the same way but I don't know of a way to unload memory in FlashMX. Maybe this has nothing to do with memory...
Any Suggestions?
PS - I posted this to the Sound and Music Forum as well... sorry if that's bad etiquette, but I'm a bit desperate!
View Replies !
View Related
Preloading External Mp3s
Hi,
I new to flash so you'll have to excuse my newbiness lol, but I have a couple of questions about audio.
I am trying to create a new flash site based on what we already have at Clan Sixth Sense, and so I am attempting to try and reproduce the streaming of the mp3 files, and was hoping that one of you guys could give me a quick tutorial, nothing fancy...
I will most likely just need it to randomly play mp3 files I ask it to, and have a mute sound button, obviously to stop the sound, that would be the only visual thing.
So if possible could some kind hearted soul figure out the actionscript so I can learn from it? All the other tutorials etc that I have found are way too complicated, and I'm just learning.
I can create buttons etc, I just haven't a clue what to set in ActionScript to accomplish something like this...I hope that you can help me :)
Also, I don't know how easy/hard this is (optional to me), but I was hoping I could have those bars that move with the music, you know like the bars visualisation on Windows Media player, the bars pop up and down in synch with the music.
I would appreciate any help with this!
Thanks for reading :)
EDIT: I would like the music to stream, so its like the site loads, and the music loads in the background, I think that its some sort of preloading external mp3 files or something?
Thanks
View Replies !
View Related
Embedded Vs External Mp3s
Hello people,
I've showed one of my games to a few people and have had some of them say that the game takes a bit of time to load; I'm wondering if this is because I'm embedding the game's music? The code and graphics come to something like 200kb, and the music is close to 1mb; if I made the music external and then only played it once it had loaded, would this get round the problem? And if so, then when distributing my swf would I need to supply the mp3 in question separately? It seems a bit cumbersome to me, but it's the only way I can think of speeding up the loading process; do you think this is the best solution?
Cheers,
Mike.
View Replies !
View Related
Loading External Mp3s
Hello... I am still somewhat of a Flash Novice, but I have already built a site. On my site, I would like to be able to have separate play/stop buttons so a visitor could choose which song they would like to play. I would like the mp3s to be loaded only when they click the buttons though, in order to keep the site size as it is. (Eventually, I would like to do the same with jpgs, and I assume it will be a similar process.) Anyway, I'm not sure how to go about loading the mp3s with such a button (presumably a movie type button), and I don't know if I have to have them as their own swf files or what. Any help would be appreciated. Thank you.
View Replies !
View Related
Preloading External MP3s
I need to pre-load multiple external MP3s. I have a preloader on my flash piece that preloads the SWF file and shows a progress bar and all that jazz. I am using the Sound class to load all the MP3 files when I need them (they are voice overs).
Is there a way to hook the preloading of those sound files into the preloader that I already have and then just call them up when needed?
View Replies !
View Related
Preload External Mp3s - HELP
I am somewhat of an AS noob, so bear with me. I have a preloader already on my flash movie that basically just preloads the movie.
Code:
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_root.loadBar._width = getPercent*100;
_root.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay("start-fade");
}
Along with this movie, I have about 25 mp3 files that are used for voice over (the movie is a sort of tutorial). The files total about 6mb combined.
How would I include these mp3 files in the preloader so that when I call them (using loadSound) later on in the movie, they don't skip when they start playing?
View Replies !
View Related
Gaps In External MP3s
I read on Macromedia TechNotes, that there is a bug with gaps in MP3 audio, and i know about the onSoundComplete problems with it being aligned to 2048 samples or something. So i tried to load an external mp3 using this code:
//loop = a filename
MySound = new Sound();
MySound.loadSound("loops/" + loop + ".mp3",false)
MySound.onLoad = function(){
MySound.start(0,9999);
}
That still makes gaps at the end of each loop.
I tried the following code:
MySound = new Sound();
MySound.attachSound("1");
MySound.start(0,9999);
With mp3s and wavs. The mp3s had gaps and the wavs didnt, even though i exported all sounds as MP3 in the flash export setting, as the technote instructed.
But i wanted to be able to go mysound.swf?loop=sound
and it would work... but the loadSound doesnt work with Wavs, nor am i using wavs for internet streaming....
any ideas?
Macromedia Flash MX 2004 Professional
View Replies !
View Related
Position Slider For External Mp3s
I'm working on an audio player for a record label's website and they use external mp3s and they want a slider to show the song's playback position.
I know there's a way to get the total bytes of a sound object, and a way to get the playback position. Now all I need is a way to get the total length of the sound and i'll be good. Is that possible? Please, someone say yes! Or that there's another way.
Thanks in advance,
-Luke
PS before someone says is, I can't convert all the mp3s to swfs and set the timeline for each one
View Replies !
View Related
[F8] Problem W/External MP3s And LoadSound
Problem in IE. Firefox OK.
I understand that local file access has been severely hobbled in Internet Explorer. Nevertheless, I would like to use loadSound to grab an mp3 file. This is because I am passing the id3 tag info into text boxes.
Is there currently a workaround for allowing loadSound to get the mp3? I've tried using the full URL and it is still disallowed.
Here is the entirety of the code(with URL placeholder). Thanks. I really need some help.
code:
this.createTextField("display_txt1", this.getNextHighestDepth(), 57, 43, 100, 100);
this.createTextField("display_txt2", this.getNextHighestDepth(), 57, 77, 100, 100);
this.createTextField("display_txt3", this.getNextHighestDepth(), 57, 112, 100, 100);
display_txt1._width = 160;
display_txt1._height = 20;
display_txt1.multiline = false;
display_txt1.background = true;
display_txt1.backgroundColor = 0x303F47;
display_txt1.textColor = 0xFFFFFF;
display_txt2._width = 160;
display_txt2._height = 20;
display_txt2.multiline = false;
display_txt2.background = true;
display_txt2.backgroundColor = 0x303F47;
display_txt2.textColor = 0xFFFFFF;
display_txt3._width = 160;
display_txt3._height = 20;
display_txt3.multiline = false;
display_txt3.background = true;
display_txt3.backgroundColor = 0x303F47;
display_txt3.textColor = 0xFFFFFF;
//Set the initial loading message.
display_txt1.text = " Loading...please wait";
display_txt2.text = " Loading...please wait";
display_txt3.text = " Loading...please wait";
// Create a new Sound object to play the sound.
var song_sound:Sound = new Sound();
// Create the polling function that tracks download progress.
// This is the function that is "polled." It checks
// the downloading progress of the Sound object passed as a reference.
function checkProgress (soundObj:Object):Void {
var numBytesLoaded:Number = soundObj.getBytesLoaded();
var numBytesTotal:Number = soundObj.getBytesTotal();
var numPercentLoaded:Number = Math.floor(numBytesLoaded / numBytesTotal * 100);
};
// When the file has finished loading, clear the interval polling.
song_sound.onLoad = function():Void {
clearInterval(poll);
};
song_sound.onID3 = function():Void {
display_txt1.text = " " + song_sound.id3.artist + "
";
display_txt2.text = " " + song_sound.id3.songname + "
";
display_txt3.text = " " + song_sound.id3.album + "
";
};
// Load streaming MP3 file and start calling checkProgress(),
song_sound.loadSound("http://www.fulldomainname.com/song1.mp3", false);
var poll:Number = setInterval(checkProgress, 100, song_sound);
View Replies !
View Related
[F8] Using Multiple Buttons And External Mp3s
Hey Guys,
I've been trying to set up an Soundboard as a personal project where I have about 30-40 buttons, which each are linked to an external mp3.
Currently I have it set up as 40 Separate Play and Stop Buttons using the code below. Now I'm not sure how to do this next part, but how can I modify this code, to have only 1 Stop Button for 40 Separate External Mp3 Files
On the Frame:
Code:
var theme:Sound = new Sound(this);
theme.loadSound("song1.mp3");
on(release){
theme.stop();
theme.start(0,1);
}
On The Stop Button:
Code:
on(release){
this.onEnterFrame = function(){
so = _root.theme;
rate = 5;
newVolume = so.getVolume() - rate;
if(newVolume > 0) {
so.setVolume(newVolume);
} else {
so.setVolume(0)
so.stop();
so.setVolume(100);
this.onEnterFrame = null;
}
}
}
on(keyPress "<Space>"){
this.onEnterFrame = function(){
so = _root.theme;
rate = 5;
newVolume = so.getVolume() - rate;
if(newVolume > 0) {
so.setVolume(newVolume);
} else {
so.setVolume(0)
so.stop();
so.setVolume(100);
this.onEnterFrame = null;
}
}
}
View Replies !
View Related
[CS3] Play/pause On External Mp3s?
I have been searching the sound forums, but didn't quite found what I was looking for...
I have a little music player on my website, which loads about 20 external mp3s, the code I have is this:
Code:
var soundLoader:Sound = new Sound();
soundLoader.loadSound("audio/01.mp3", true);
Is there any way I can "pause" a song, and then hit play again and have the sound start where it stopped????
any help would be much appreciated..
View Replies !
View Related
Loading/Playing External .mp3s
Hoping you guys can help. I finished my site, but I actually have my music samples loaded into the movie itself, so of course it's takes a minute to download the site. I think I've tried every tut you could think of and nothing works. I have to admit that they are sometimes a bit overwhelming with the AS. Is it easier to make the samples .swf files and load them that way or leave them as .mp3s and play them externally. Thanks in advance.
View Replies !
View Related
F8 Problem Linking To External Sound (mp3s)
I am using date and sound classes to upload mp3s based on date. It works fine as long as the sounds are in the library... Unfortunately I cannot have them reside there - the file gets too huge. I had them placed on our server.
I removed the mp3 files from the fla library and then pointed the action script to call up the sounds from the urls where they now reside. I get an undefined error - it is looking for the mp3s on my desktop. How do I get the fla to point to the urls??? Anyone had this problem?
View Replies !
View Related
External MP3s Playback Ultra Fast... : (
Hi All,
Is a bit of wierd one this...
I am streaming external MP3s into a game and it all works fine most of the time however occasionally the MP3 will play back very quickly and at a high pitch (all the mp3s are at 11khz) almost like a cartoon telephone voice,
If anyone has any ideas they'd be much appreciated
Cheers
Dan
View Replies !
View Related
External MP3s Playback Ultra Fast... : (
Hi All,
Is a bit of wierd one this...
I am streaming external MP3s into a game and it all works fine most of the time however occasionally the MP3 will play back very quickly and at a high pitch (all the mp3s are at 11khz) almost like a cartoon telephone voice,
If anyone has any ideas they'd be much appreciated
Cheers
Dan
View Replies !
View Related
Dynamically Load Images, .mp3s Doesn't Work Online
I'm building a slideshow that dynamically loads .jpg's and .mp3's. It runs fine when I test the .swf locally but when I publish it to the web the .jpg's and .mp3's don't load at all. I'm publishing to the Flash 6 player and I have the latest player for my browser. Any idea what's going on?
Here's the link:
http://www.jsonline.com/Mjsdev/kahle...ad_images.html
Attached is the .fla file.
Thanks!
View Replies !
View Related
Problem Loading External Mp3s On Web ( Works On My Desktop, But Not On Web)
I'm using the student version of Flash mx that I bought earlier this year.
I've created a button that loads an external mp3 file. It works on my
computer with no problem, but when I put the mp3test2.swf file and the
test.mp3 in the same directory on my web site, it doesn't work. Here is my
code:
//(relative path)
var bOn1 = true;
button_btn.onRelease = function(){
if(bOn1){
var s1 = new Sound();
s1.loadSound("test.mp3");
s1.start(0,99);
}else{
s1.stop();
}
bOn1 = !bOn1;
}
// (absolute path)
var bOn1 = true;
button_btn.onRelease = function(){
if(bOn1){
var s1 = new Sound();
s1.loadSound("http://www.healingwords.org/test/test.mp3");
s1.start(0,99);
}else{
s1.stop();
}
bOn1 = !bOn1;
}
Has anyone else run into this problem? Any solutions?
Thanks in advance,
Don Drake
View Replies !
View Related
How To Load An External Movie Using A Link Within An External Swf - Urgent
Hi all
Flash CS3 but coding in AS2 - mac.
I believe I have asked this question before but i was using loadMovie() - I am now using loadClip and the MovieClipLoader class and obviously I have managed to break something.
I have a number of external swfs which load fine, with preloaders using MovieClipLoader, into an empty MC on the stage called holder_mc. In one of the external swf's, there are two links to separate external swf's - if you click on either of them, the current swf is unloaded and the new one is loaded. I used:
Code:
myButtonWithinSwf.onRelease = function() {
this._parent.loadMovie("newMovie.swf");
}
However now that I am using a different code (because before, evrything wasnt preloaded, i just had a white space until it appeared) the code within the swf obviously has to change. The only problem is, I cant for the life of me work out what it is, I have tried all sorts of combinations and probably missed the most obvious one. I do not want to create empty movie clips, I want the movie to load into the MC which I have defined - holder_mc - and usually I would tell it to unloadClip() before loading the new one, but it cant load a new one if it has unloaded itself. I hope that makes sense!
This is the code I am using on the main timeline to control the preloading of the external swf's:
Code:
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
loadListener.onLoadStart = function() {
holder_mc.stop();
};
loadListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number) {
pleaseWait._visible = true;
var preloaded:Number = Math.floor(loadedBytes / totalBytes * 100);
preloaderMC._visible = true;
preloaderMC.loadText.text = preloaded.toString() + "%";
preloaderMC.loadBar._yscale = preloaded;
};
loadListener.onLoadInit = function() {
preloaderMC._visible = false;
pleaseWait._visible = false;
holder_mc.play();
};
/**** register listener object with MovieClipLoader object ****/
mcLoader.addListener(loadListener);
anotherButton.onRelease = function() {
mcLoader.unloadClip(holder_mc);
mcLoader.loadClip("anotherMovie.swf", holder_mc);
}
my preloader is called preloaderMC and pleaseWait is just a movie clip that is placed on the other side of the screen for another reason. loadText and loadBar are the dynamic text and loading bar within the preloaderMC.
I really hope someone can help me ASAP as this was all working before with loadMovie() and now suddenly I cant get it working!
Thanks in advance
Theo
View Replies !
View Related
How To Load An External Movie Using A Link Within An External Swf - Urgent
Hi all
Flash CS3 but coding in AS2 - mac.
I have asked this question before but i was using loadMovie() - I am now using loadClip and the MovieClipLoader class and obviously I have managed to break something.
I have a number of external swfs which load fine, with preloaders using MovieClipLoader, into an empty MC on the stage called holder_mc. In one of the external swf's, there are two links to separate external swf's - if you click on either of them, the current swf is unloaded and the new one is loaded. I used:
Code:
myButtonWithinSwf.onRelease = function() {
this._parent.loadMovie("newMovie.swf");
}
However now that I am using a different code (because before, evrything wasnt preloaded, i just had a white space until it appeared) the code within the swf obviously has to change. The only problem is, I cant for the life of me work out what it is, I have tried all sorts of combinations and probably missed the most obvious one. I do not want to create empty movie clips, I want the movie to load into the MC which I have defined - holder_mc - and usually I would tell it to unloadClip() before loading the new one, but it cant load a new one if it has unloaded itself. I hope that makes sense!
This is the code I am using on the main timeline to control the preloading of the external swf's:
Code:
var mcLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
loadListener.onLoadStart = function() {
holder_mc.stop();
};
loadListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number) {
pleaseWait._visible = true;
var preloaded:Number = Math.floor(loadedBytes / totalBytes * 100);
preloaderMC._visible = true;
preloaderMC.loadText.text = preloaded.toString() + "%";
preloaderMC.loadBar._yscale = preloaded;
};
loadListener.onLoadInit = function() {
preloaderMC._visible = false;
pleaseWait._visible = false;
holder_mc.play();
};
/**** register listener object with MovieClipLoader object ****/
mcLoader.addListener(loadListener);
anotherButton.onRelease = function() {
mcLoader.unloadClip(holder_mc);
mcLoader.loadClip("anotherMovie.swf", holder_mc);
}
my preloader is called preloaderMC and pleaseWait is just a movie clip that is placed on the other side of the screen for another reason. loadText and loadBar are the dynamic text and loading bar within the preloaderMC.
I really hope someone can help me ASAP as this was all working before with loadMovie() and now suddenly I cant get it working!
Thanks in advance
Theo
View Replies !
View Related
External Movie Will Not Load, But Does Load When I Use 'test Movie'?
I had my external movies loading wonderfully then all of a sudden one of the externals (that I use 'loadmovie' on) will not load? The weird thing is that when I test my movie using 'test movie' in my main movie, it works fine, but when I go to my staging (test) site: www.gbebos.com/Liz/Hit.htm the one movie in 'Earth elements' page will not load, but the other movies i.e. 'Crystal Elegance' and 'Silver Essence' work fine. I made sure that the .swf and .html were transfered to the domain and they are both there.
Any help for this newbie would be greatly appreciated!
Thanks again to ya all at Flashkit!
gbebos
View Replies !
View Related
I Cant Seem To Load An External Movie, Within An External Movie That Has Been Loaded
Ok. I created a button.. and added a behavior that loads an external swf into a movie clip. Now the external swf movie that loads into the mc also has a button that loads a second exteral movie. Nesting several movies swf files in the main movie.
http://www.dondi.biz/newsite06/ (click on portfolio)
When I view the final movie. It only loads the first external movie showing the buttons (web, Print etc.). But when I click on the button it doesnt load the third movie.
but when I view the second movie it loads it just fine when not nested in the first movie. http://www.dondi.biz/newsite06/portfolio.html it loads just fine.
Can I not nest these movies together to work just fine? Why is this so frustrating? Can anyone help me please?
View Replies !
View Related
[fcs3] External Mp3s, Multiple Play Buttons,1 Stop Button With Fade Out - Please Help
Hey Guys,
I've been trying to set up an Soundboard as a personal project where I have about 30-40 buttons, which each are linked to an external mp3.
Currently I have it set up as 40 Separate Play and Stop Buttons using the code below. Now I'm not sure how to do this next part, but how can I modify this code, to have only 1 Stop Button for 40 Separate External Mp3 Files. (Please Don't Suggest stopAllsounds(); like someone did on another forum, that's not want I wanted)
I First Posted this on here on August 9th, and had no help, and I'm hoping that this time I can get some help for this.
On the Frame/Button:
Code:
Sound = new Sound(this);
theme.loadSound("song1.mp3");
on(release){
theme.stop();
theme.start(0,1);
}
On The Stop Button:
Code:
on(release){
this.onEnterFrame = function(){
so = _root.theme;
rate = 5;
newVolume = so.getVolume() - rate;
if(newVolume > 0) {
so.setVolume(newVolume);
} else {
so.setVolume(0)
so.stop();
so.setVolume(100);
this.onEnterFrame = null;
}
}
}
on(keyPress "<Space>"){
this.onEnterFrame = function(){
so = _root.theme;
rate = 5;
newVolume = so.getVolume() - rate;
if(newVolume > 0) {
so.setVolume(newVolume);
} else {
so.setVolume(0)
so.stop();
so.setVolume(100);
this.onEnterFrame = null;
}
}
}
View Replies !
View Related
Interrupt Loading Of Movie Clips And MP3s?
I am helping a friend out with an audio player and have hit the wall because of a problem loading movie clips and MP3s (I've tried it with both types, and am currently using streaming MP3s, with the same problem).
4 buttons on the menu - click one to play one of 4 internal movie clips of an audio player. When the player pops up, it calls to load an external MP3 as such:
ActionScript Code:
stop();
// set audio player to active state
_root.sndBloodUp = true;
// music load
_root.myMusic = new Sound(myMusicMc);
_root.myMusic.loadSound("http://audio-clip-url", true);
_root.myMusic.start(0,1);
// play out when done
_root.myMusic.onSoundComplete = function() { play(); };
It loads and plays fine - even streams the audio when enough data is loaded. If you click on another of the 4 buttons while this audio is playing, it stops and starts loading the next audio clip. The problem comes when you interrupt the second one. The next clip will not load for a long time, possibly because it is still downloading the MP3 data for the first 2 clips. And sometimes the audio clips will overlap - you can imagine what that sounds like.
You can check out the preview of the project at this URL:
http://www.seetwg.com/m2/
Go to the "Our Tunes" section.
My question is this - how can I interrupt the download of a streaming MP3 file? I want to have the browser immmediately STOP downloading the clip when the user moves on to another song file.
I've been wrangling with this for 3 weeks, and am having a bitch of a time with this. If I'd been in on this at the start, I would have recommended building the movie a different way, but the project is almost done and I have to cobble a solution after the fact. And as a freebie for a friend. OY!
Any help or suggestions would be appreciated.
View Replies !
View Related
Load And External Movie From A Base Movie Help...
Hi i have a movie clip called base movie which i want to load up with its content, when its finished playing i want the movie to load an external movie whilst the base movie is still playing. When the base movie is finished i then want to recall the already loaded external swf in to its place. Is this possible and are there any tutorials on this or working examples i can browse?
Thank you
View Replies !
View Related
Load A Particular External .swf Into A Movie
Hi, I seens smth like this in some other tutorials , but it wasn't exactly. What I want is to---
While my main .swf is playing to load other small swf(s) into it in particular places. Let's say it to be content of one of the small "screens".
How to do tht?
Maybe a link or smth.
Thanx.
View Replies !
View Related
|