Attach Sound Makes First Frame Huge - Preloader Doesn't Show Accurate Count
I'm creating a preloader for a project.
The project includes a music track and the volume changes at one point in the program (there's another sound clip that plays, and the music track drops so that you can hear the sound clip). The music track works wonderfully - I've used the attach sound command to start the clip an adjust the volume at various times throughout the program.
One problem. The preloader doesn't show up until about 20% of the file is loaded. Not a signifcant wait, but long enough to be a problem.
If I go into the linkage properties and deselect "Export on first frame" the preloader works well. But the music won't play. Are there any ways around this?
Thanks, Chris
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-23-2004, 03:02 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Preloader 1st Frame Is Huge
Hi there,
I have this movie which is in total about 160k. On my very first frame of the first scene I just have one keyframe without any content but with the following code behind it:
total = _level0.getBytesTotal();
loaded = _level0.getBytesLoaded();
For one reason or another the size of this frame is 50kb. I don't use LoadMovie stuff anywhere, it's just one plain scene. It doesn't matter whether i turn the Compress Movie option on or off, the result stays the same.
Thanks for your help guys
Selection Screwed Up, Makes A Huge Box
I must have hit a wrong key, but whenever I click with the normal mouse button, it makes this GIGANTIC selection box. Worse, I don't even think it can select anything. I hope someone knows how to fix this cause this pretty much broke Flash and even restarting the app doesn't help.
Actually, it seems like I broke every single tool, more or less. Mostly it just seems like I'm pressing shift while holding them (line tool draws straight, circle tool makes perfect circle, etc), even though shift isn't being pressed (I'm not typing in caps)
(Picture:This is what happens when I click. Poorly drawn mouse in there so cause it doesn't copy with the screen shot)
[MX04] Preloader - Export On 1st Frame, Still Huge Spike In Bandwidth Profiler
Hi,
I have been searching for ages but still stuck.
I have a preloader that only comes in at about 73% of it.
i have read that i should have unchecked all" export of first frame". I have checked every single thing in my library they all have nothing checked at all.
I still have a huge spike in the bandwidth profiler on the first frame.
I have two scenes the first being the preloader and second the actaul movie, and there is nothing but the preloader on the first frame.
Anyone got any ideas?
Thanks for your time.
Streaming Audio Makes File Huge
Hi!
I'm a beginner at this so I'm mostly experimenting my way forward.
I am trying to build a small audio control center for my website.
I stumbeld on to two problems.
The first on is that since I import the music file, a mp3 file, the swf is about 3.5 MB large. That takes a while to load.
There has to be another way to implement the music file so that it doesn't have to be loaded when the swf loads but can load while streaming?
What I've done is simply import it to my movie and then added a function to my play button wich says: "sync = start"
Problem number two is the control part.
Say I have 5 songs (again the issue with swf size) and I want buttons for going though the playlist: Play, Stop, pervious, next.
I have managed to create play and stop but they are specific for one track: they start/stop one file.
Problem is: If I am listening to another track, how do I tell my stop button to stop that track? And how do I tell my start button to start say track 2 instead of track 1 wich is default.
And how do I navigate though the tracks with prev/next buttons since they have to be somewhat dynamic aswell: if at track 2 next would be track 3 but if at track 4 next is track 5?
Atm I have the swf at http://nordenfelt.thinkdot.de/winamp.php but it takes a while to load the file since the swf is so big
Happy with any help I can get with this =)
Would be a really nice feature on my site if I can get it to work.
Regards, Carl Nordenfelt
PS. Explain everything to me like I am a 3 years old child =) DS.
Loader Doesn't Show - Too Many KB In First Frame...
Hi
I have a small but annoying problem.
My loader doesn't show any progress as, according to the Bandwith Profiler, I have over 200 KB in the first frame. In fact, the loader doesn't show up at all, until he has loaded those 200 KB.
I have two scenes in my Flash file:
My loader is in scene "load" (very basic loader which counts and shows the percents loaded),
all the other stuff is in the next scene "main".
I know that I have a MovieClip that is kinda heavy (lots of drawing going on in there), but I only use it in the second scene "main". Thus, I don't understand why Flash wants to load the MC in the first frame of the first scene already...
How can I tell Flash to load that particular MovieClip later? Or is there another trick to get the KB of the first frame/first scene down?
Any input is highly appreciated.
Thanks
Win XP Pro Sp2 Doesn't Show Preloader
I don't get it. Why doesn't this operation system display my (or anyone else's) preloader??? Have you guys noticed this problem? I searched the forums but couldn't find anything related to this. Is this a know problem with a work-around? ARGH.....
Preloader Doesn't Show Right Away
I have a website I'm working on that has 4 scenes. On scene 1 I alloted the first 2 frames to my simple preloader. When I load the movie up from my webserver, it's just white space...after about a minute (I have a cable modem) my preloader finally shows up, but it's already at 90% or so, it loads the last 10% with the preloading visible then goes to the correct page upon completion... I have 2 questions...
1) is the first scene created in the flash movie always going to be the first scene attempted to load when you try to view the .swf online? If not, is there a way to specify which scene is loaded (not just played) first?
2) Why doesn't my preloader show up immediately? It is the first frame on scene 1! Is there something new with flash 8 that won't show the movie till it's nearly loaded?
Any help on this would be greatly appreciated.
Best,
f3ar
Preloader Doesn't Show
Hi,
it seems to me this should work but it doesn't. I Am creating at runtime preloader_holder_MC and img_holder_MC inside another MC also created at runtime, so these 2 clips are syblings. I load preloader.swf (this movie has the same size as the main movie) into preloader_holder_MC and then when loading image into img_holder_MC preloader should appear, but it doesn't. When I change the same code so I load preloader.swf to _level5 everything works just fine! I already spent like 2 days to figure it out... thanks for any help
Here is the code:
Attach Code
init();
//------------------<test button>-------------------\
test_BTN.onRelease = function() {
moveRight();
} // end test_BTN.onRelease = function()
//------------------</test button>------------------\
//************** FUNCTION DEFINITIONS **************\
// define Tween transition
import mx.transitions.Tween;
import mx.transitions.easing.*;
//--------------------------------------------------\
function init() {
this.createHolder("holder_MC");
this.loadImgNow("1.jpg", "holder_MC");
} // end function init()
//--------------------------------------------------\
function createHolder(holderName:String) {
//create MC holder
this.createEmptyMovieClip(holderName, this.getNextHighestDepth());
//create img holder on it
this[holderName].createEmptyMovieClip("img_holder_MC", this.getNextHighestDepth());
//PRELOADER DOES NOT WORK!!!!!!!!!!!!!!!!!!!!!
//create preloaderHolder on it and move it to appropriate x, y coordinates
this[holderName].createEmptyMovieClip("preloader_holder_MC", 90000); //lets make sure it is always above
//and load preloader.swf into it
loadMovie("preloader.swf", holderName + ".preloader_holder_MC");
} // end function createHolder()
//--------------------------------------------------\
function loadImgNow(imgPath:String, holderName:String) {
//load an image into it
//-------------------<MCL>--------------------\
// create the new MCL and Listener Objects
var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
// attach the Listener, myListener, to the MCL
myMCL.addListener(myListener);
//onLoadProgress listener
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
this[holderName].preloader_holder_MC._visible = true;
var preloadPercent:Number = Math.round((loadedBytes / totalBytes) * 100);
this[holderName].preloader_holder_MC.preloader.gotoAndStop(preloadPercent);
this[holderName].preloader_holder_MC.percentage_TXT.text = preloadPercent;
} // end myListener.onLoadProgress = function()
//after movie uploaded make preload invisible
myListener.onLoadComplete = function(target_mc) {
this[holderName].preloader_holder_MC._visible = false;
} // end myListener.onLoadComplete = function()
//-------------------</MCL>-------------------\
//actual loading
myMCL.loadClip(imgPath, this[holderName].img_holder_MC);
} // end function loadImgNow()
function moveRight() {
//tween time
var tweenTime:Number = new Number(20);
var rightTween:Tween = new Tween(this.holder_MC, "_x", Regular.easeOut, this.holder_MC._x, this.holder_MC._x + 100, tweenTime, false);
} // end function moveLeft()
Preloader Doesn't Show.
i always get this problem. my preloader doesn't show from the beginning. it only appears when its 90% or more, sometimes only when its completed. i tried all the sample preloaders but its still the same.
please advise.
thank you..
While Preloading It Doesn't Show Frame 1 - (mx2004)
Hi gang,
This is driving me nuts as I haven't had preloading problems before.
The preloader works, though the movie starts showing graphics when it already loaded 50%. Now for a 2mb animation this rather sucks.
Any idea why this is happening? Maybe it's a v7 bug.. or..?
So again, it preloads, but the progress bar shows up when it's almost done loading. Like the big jpeg has first priority and the player just doesn't want to show the 1byte image that's on frame 1 off the movie...
Thanks,
Rolf
PS>
My preloading script is very simple, among the lines of:
main movie:
[frame 1]
stop();
preloader.onEnterFrame = function () {
loaded = this._parent.getBytesLoaded();
total = this._parent.getBytesTotal();
if (total > 10) {
this.preloadbar._xscale = (loaded / total) * 100;
if ((total - loaded) < 5) {
// fade out preload mc
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
// start actual movie
gotoAndPlay(10);
}
}
}
};
Movie Doesn't Show With Attach Movie
hello,
I have trouble with attaching a movie, i've read the help file and everything i made is what is supposed to be but the movie doesn't show up, here's my code
ActionScript Code:
on (release) { _parent.container.attachMovie("att", "att2", 10);}
att is the linkage name, and container is the movieclip where i want to attach my movie (has instance name) and it's on top layer, i also tried with "this.attachMovie" or "_parent.attachMovie" but still does'nt work.
Can anybody help me ?
Thanks
Ubik
Movie Doesn't Show With Attach Movie
hello,
I have trouble with attaching a movie, i've read the help file and everything i made is what is supposed to be but the movie doesn't show up, here's my code
ActionScript Code:
on (release) { _parent.container.attachMovie("att", "att2", 10);}
att is the linkage name, and container is the movieclip where i want to attach my movie (has instance name) and it's on top layer, i also tried with "this.attachMovie" or "_parent.attachMovie" but still does'nt work.
Can anybody help me ?
Thanks
Ubik
Preloader Doesn't Show Fast Enough
Hi everybody, I have created a simple preloader, but when I open the movie online. the preloader doesn't show until the loading bar is at 50% at least.
Is there any reason for this to happens? I would like it to show up from 0%.
Here is the code:
code:
stop();
var randomNumber:Number = 1 + random(5);
var randomBackground:String = "background_images/background" + randomNumber.toString() + ".jpg";
background_mc.createEmptyMovieClip("imageHolder_mc ", 1);
background_mc.imageHolder_mc.loadMovie(randomBackg round);
background_mc._visible = false;
//SCRIPT FOR THE PRELOADER
//PRELOADER
this.onEnterFrame = function() {
loadedB = background_mc.imageHolder_mc.getBytesLoaded();
totalB = background_mc.imageHolder_mc.getBytesTotal();
totalBytes = this.getBytesTotal() + this.totalB;
loadedBytes = this.getBytesLoaded() + this.loadedB;
if (loadedBytes != totalBytes) {
this.preloader_mc._visible = true;
this.preloader_mc.title_txt.text="LOADING INTERFACE"
percent = Math.floor(100 * loadedBytes / totalBytes);
this.preloader_mc.preloaderBar_mc._xscale = percent;
this.preloader_mc.percent_txt.text = percent + "%";
} else {
_root.background_mc._visible = true;
_root.createEmptyMovieClip("transition", 2);
_root.transition.attachMovie("cojones", "cojones2", 3);
background_mc.setMask(_root.transition);
this.preloader_mc._alpha -= 10;
if (this.preloader_mc._alpha <= 0) {
delete this.onEnterFrame;
_root.gotoAndStop("InitialAnimation");
}
}
};
Preloader Doesn't Show In Explorer On PC
I've got a preloader set up for my site which uses both a bar and text counting down from 100% works on Firefox (PC and MAC) and Firefox on PC, but not explorer for PC.
Here's the code i'm using:
stop();
var myInterval:Number = setInterval(preloader, 10);
function preloader() {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
play();
clearInterval(myInterval)
}
preload_mc._xscale = (getBytesLoaded()/getBytesTotal())*100;
preloadtext_txt.text=Math.round(getBytesLoaded()/getBytesTotal()*100)+"%"
}
and here's the link to the site in case you need it:
http://elr.dennisnet.co.uk/marketing...kit/index.html
Any help appreciated!
PS i'm using Flash MX 2004
Preloader Doesn't Show LoadText [F8]
Hi, I have a preloader on my root movie that works perfectly. This is the 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) {
this.gotoAndStop(3);
}
I used the same preloader inside an external swf that is loaded into the main movie, and changed "_root" to "this":
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndStop(3);
}
This preloader and loadbar work fine, but it does not show the loadText. The weird thing is, it does show the loadText when I test the movie on it's own, but when I view the movie inside the main movie, it doesn't show.
I tried changing the instance/var names and that didn't help either.
Any suggestions?? I'm under a deadline and would greatly appreciate any response!
Thank you.
[F8] Preloader Doesn't Show Till About 80%
I have a site with about 6 scenes, the first of which is a preloader.
From the size report:
Code:
1 1081277 1081277 preloader
2 140276 1221553 index (AS 2.0 Classes Export Frame)
3 85504 1307057
I don 't see why the preloader scene is so large - all it has is a 40Kb image and a movieclip mask.
The preloader doesn't start to show until about 80%. I have exported the classes in frame 2.
What else can I try please?
You can see the offending beast at www.maxelcat.co.uk/tests/index.html
and the fla is here www.maxelcat.co.uk/tests/eeweb5.fla
Would really appreciate any help
Edward
Preloader Doesn't Show Fast Enough
Hi everybody, I have created a preloader, but when I open the movie online. the preloader doesn't show until the loading bar is at 50% at least.
Is there any reason for this to happens? I would like it to show up from 0%.
Here is the code:
//this is first frame of the movie
stop();
//this is to load a background image randomly
var randomNumber:Number = 1 + random(5);
var randomBackground:String = "background_images/background" + randomNumber.toString() + ".jpg";
background_mc.createEmptyMovieClip("imageHolder_mc ", 1);
background_mc.imageHolder_mc.loadMovie(randomBackg round);
background_mc._visible = false;
//SCRIPT FOR THE PRELOADER
this.onEnterFrame = function() {
loadedB = background_mc.imageHolder_mc.getBytesLoaded();
totalB = background_mc.imageHolder_mc.getBytesTotal();
totalBytes = this.getBytesTotal() + this.totalB;
loadedBytes = this.getBytesLoaded() + this.loadedB;
if (loadedBytes != totalBytes) {
this.preloader_mc.title_txt.text="LOADING INTERFACE"
percent = Math.floor(100 * loadedBytes / totalBytes);
this.preloader_mc.preloaderBar_mc._xscale = percent;
this.preloader_mc.percent_txt.text = percent + "%";
} else {
_root.background_mc._visible = true;
_root.createEmptyMovieClip("transition", 2);
_root.transition.attachMovie("cojones", "cojones2", 3);
background_mc.setMask(_root.transition);
this.preloader_mc._alpha -= 10;
if (this.preloader_mc._alpha <= 0) {
delete this.onEnterFrame;
_root.gotoAndStop("InitialAnimation");
}
}
};
Attach Sound At Specific Frame Of Movieclip?
Is there any way to attach a sound at a specific frame of a movieclip? I'm having trouble finding any documentation that might indicate this can be done.
In brief, I have this simulation that responds to a keypad; different animations are triggered based on the button pressed. Some of the .flv's have audio attached, but when audio's attached to the .flv, it's pausing when it goes back to loop. So, I figured I'd try removing just the part of the sound that needs to loop & attach it dynamically. Trouble is, I can't figure out how to attach it to frame 37 of movieclip1, or how to tell it to start once it hits frame 37.
Any ideas?
Thanks!
tigerjade
"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding
Attach Sound, Export In First Frame And Preloder
Hello. i use MX (6) ver. of Flash and I am working on slide show with sound background. I use attache sound method to play sounds. But.
Attached sound work only when i allocate
-Export for ActionSript and
-Export in first Frame.
And problem is all lincked sounds starts loading in very begin. So my preloader doesnot work well. Cuz preloader starts work only when sounds are loaded. To escape this problem i could not allocate -Export in first Frame. But in this case attache sound method doesnot work.
I see only one exit now. Create preloader and main movie in different swf but it is not i really want. How to use attach sound method with linked sounds but do not allow them load in first frame?
Thanks
Preloader Doesn't Show Up, Just A Blank Page...please Help.
Hi.
I did this tutorial.
http://www.kirupa.com/developer/mx/p...epreloader.htm
When I test it out...my preloader doesn't show up, just a blank page. (while it's obviously loading)...then bam..my main page shows up. Any ideas?
Here's a pic of the loading page, then on frame 3 i have my site load.
If you want to see how my site is setup my site is.
www.brett-schulz.com
My first page is just an html splash page and when you click the button it takes you to my flash page which doesn't show the loading process but just goes blank for a few seconds while it's loading...???
Preloader Problem, Doesn't Show Itself Since The Beginning
I was reading the same problem from someone here but no onw gave him a good solution. The problem with my .FLA is about my preloader...the bandwith viewer shows 23kb in the first frame, where it should show only 2 or 4kb for preloader.
I don't want to know how to make a preloader but to make it work it out. What's the problem? I know i could make a heavy movie but how could i make the preloader visible since the begining?
I put the .fla in a zip file in http://www.jgavalos.com/otrasdescargas.html and I attached it here too
This sample is a movie clip that I want to load in other (my main swf). Thank you in advance.
[F8] Preloader Doesn't Show Anything Until Atleast 50kb?
I have a preloader but how come nothing appears until atleast 50kb is downloaded?
Theres no graphics in the scene, just a dynamic text box on a white BG..
It starts tracing bytes downloaded at around 25 or 30kb.. but nothing shows up on the screen til atleast 50..
why is this?
Preloader Not Working Properly - Doesn't Show Right Away
I'm having issues with using an external preloader and I need some help.
I have one variable set to the movieClipLoader class and it is used to load external swf files into an empty movie clip on the stage.
I'm also using an external preloader that is loaded using a different variable set to the movieClipLoader class. The preloader loads into a different empty movie clip than the other external swf files. An FYI, the preloader swf file is small - 15kb
I have a listener attached to the onLoadStart event which, when triggered, loads the external preloader using the loadClip method.
Now, when I test the movie (Ctrl + Enter) and am taken into the swf player, I go to the View menu and choose Simulate Download.
The problem is that there is a long delay in the preloader showing up on the stage. For example, I'll put the Download Settings at 56k and then I'll choose the Simulate Download option. From there, I'll click on a button to load in one of the movies and, based on the code I've written, the preloader should show up immediately. But it doesn't... there is always approximately a 7 second delay before the preloader can even be seen. The preloader file is small so there's no reason that I can fathom as to why it's taking 7 seconds to load onto the stage.
Otherwise, everything works great. The movies being monitored/loaded come in just fine. The preloader's progress bar works fine and accurate bytes loaded and bytes total are reported in the dynamic text boxes that are inside the preloader swf file.
It's just the strange delay that's driving me insane.
I've been doing searches on the internet for about 2 hours and it seems there are others having this sort of issue, but so far no solutions to be found.
FYI, I'm using Flash 8 Professional.
I appreciate any help!!
Brenda
Edited: 04/16/2007 at 09:30:07 AM by "B"
FMX - Preloader Doesn't Show In Geocities Site
Dear all,
I've created a preloader for my movies. It works fine when I tested it in my Flash MX (Ctrl+ Enter). As well as it works fine in my local computer after I created the .html in DreamWeaver.
But when I uplaoded those files to Geocities, I can only view a blank .html page. The preloader doens't appear at all.
Can someone help?
Thank you.
Preloader Query...doesn't Show Until Loaded?
Hi there
here's the fla...290k
i'm concerned abou the preloader. when i test it in the lfash environment - the file preloads but the preloader doesn't appear on screen until around 98% preloaded...can anyone tell me why and how i can get around this?
is it because i'm using a graphic? - i've taken this out and just left the loadng text and teh status bar and it still does the same.
any help much appreciated.
cheers
e
Large .swf File...1st Scene Preloader Doesn't Show Up For About 10 Sec?
I have a large .swf with a preloader on the first scene using getBytesLoaded. The problem is that when streaming, the preloader doesn't show up for about 10 seconds, just a blank screen. The preloader file size is very small, so it's not loading the preloader, seems to be loading some of the rest of the movie before showing the preloader.
Is there any way to correct this?
Possibly have a preloader in a separate .swf from the movie? What code can I use to getBytesLoaded from a .swf loading on a different level. For instance, load a movie on a higher level, but don't display it until all is loaded. Once loaded, it can begin to play over the preloader.
thanks for your help
tony
[F8] Preloader Issues, Export At First Frame & Attach Movie?
Basically i have some movieclips that are loaded dynamically via MocieClip.AttachMovie(). The problem is, they do not show up unless i have "export on first frame" checked, and that kinda defeats the purpose of a preloader doesn't it?
So how can i make them not be exported in the first frame and still be able to dynamically load them?
Mc Doesn't Play/stop Accurate
check this site
www.pasha.be
in the mean movie there's an equalizer on the bottom (right).
if you push the x the clip stops, that's okay
if you push 1 (loop1) the clip starts playing, but if you push it twice, the clip stops again...
anyone?
[CS3] Flash Cs3 Makes Flash 8 Files Huge. Known Glitch? Solution?
Hi. Does anyone know why files created in flash 8, seem to quadruple in size when edited it flash CS3 and then "saved as" version 8 files? I have flash that are 1.2M and when I removed images form them, deleted unused items, and published at a lower jpg setting my fla files are ranging between 3-6.6M and the swf that once was 32K is 1.2M. a swf that was once 684K is now 2.4M. I only removed things from the file, added no new tweens or AS and saved as (getting a huge file) and then published, using the lowest possible settings! does anyone know what's going on here? Thank you in advance.
Preloader Works, But Doesn't Move To Frame 2
For some reason, my preloader seems to be working fine, but is not advancing to frame 2 to start the movie.. Yet, when I reload the page, or click on another link, the animation starts, as if it was preloaded. I can only see the animation after clicking on another link.
Anyone have any idea why?
AS on the preloader, on frame 1 of main timeline:
onClipEvent (enterFrame) {
framesLoaded = (Math.ceil (( _parent.getBytesLoaded() / _parent.getBytesTotal()) * 100));
gotoAndStop (framesLoaded);
info.text = framesLoaded + "% completed";
if (framesLoaded >= 90) {
_root.gotoAndPlay (2);
}
}
Then my mc is on the second frame of the main timeline.
Any ideas out there? This has been driving me crazy!
Preloader For Sound - Doesn't Work
I have 3 frame animation. First frame looks like this:
this.stop();
this.onEnterFrame = function () {
var loadedbytes:Number = getBytesLoaded();
var totalbytes:Number = getBytesTotal();
frame = int(loadedbytes/(totalbytes/100));
_root.loader.gotoAndStop(_root.frame);
if (loadedbytes >= totalbytes) {
gotoAndPlay(3);
}
}
"loader" is a movie clip with one layer and 100 frames motion tween.
Second frame has only "gotoAndPlay(1);";
Third frame has a set of sound controls (taken from Flash F1 Help) and this code:
var song_sound:Sound = new Sound();
song_sound.attachSound("MrJack-Filmowa.mp3");
song_sound.setVolume(40);
if(!isPlaying){
song_sound.stop();
soundstop.gotoAndStop(10);
}
volume_mc.top = volume_mc._y;
volume_mc.bottom = volume_mc._y;
volume_mc.left = volume_mc._x;
volume_mc.right = volume_mc._x + 100;
volume_mc._x += 40;
volume_txt.text = 40;
volume_mc.handle_btn.onPress = function() {
startDrag(this._parent, false, this._parent.left, this._parent.top, this._parent.right, this._parent.bottom);
};
volume_mc.handle_btn.onRelease = function() {
stopDrag();
var level:Number = Math.ceil(this._parent._x - this._parent.left);
this._parent._parent.song_sound.setVolume(level);
this._parent._parent.volume_txt.text = level;
};
volume_mc.handle_btn.onReleaseOutside = volume_mc.handle_btn.onRelease;
soundstop.onPress = function () {
if(isPlaying){
song_sound.stop();
soundstop.gotoAndPlay(10);
isPlaying = false;
}else{
song_sound.start(0,4);
soundstop.gotoAndPlay(1);
song_sound.setVolume(60);
isPlaying = true;
}
}
stop();
Preloader doesnt work (doesnt show). The strange thing is, that if i use this preloader for a picture or sth else than sound, it works ok.
What's the problem?
Preloader Doesn't Work -> 1 Frame Crammed With Data
greetings to all members,
I just included a preloader into my current swf. Problem is, the first frame of the movie loads 80 % of the file(library is the one to blame I guess). But since the preloader doesn't start until all frames of it's scene are loaded I got a blank site when opening the swf in a browser and after loading is completed the preloader doesn't even show up because the main scene is already established.
My question: How can I force Flash to load the preloader scene frames first and/or suspend the library loading till later frames?
I already tested changing the loading order(top to bottom and vice versa), didn't show any effect. I also scanned several tutorials on the theme but they all didn't load that much data in the first frame. Any help on this problem would save quite some of my brains.
thank you for your attention
Frame-accurate FLV Control?
Quick question for the FLV gurus - I have an applicaiton that plays video clips sequentially, as soon as the last frame of video 1 ends, video 2 starts, loops for a variable number of times, then loads video 3, etc. Each transition is seamless.
This can be accomplished easily by embedding the flv's on a timeline, but of course I would prefer to control everything with script. My problem is I have not been able to get frame accurate results - for example if I need video #2 to start playing as soon as the last frame of video #1 ends, I get small pauses if I use either the netStream.onStatus or netStream.time methods to check for the end of the first video.
This is an DVD-ROM disc-based project so there is no issue of network latency, although of course the videos do need to be loaded into memory so they can start playing immediately. Again, loading them into a movie clip's timeline seems to work, but was just looking for a purely code-based approach if possible.
Thank you.
Sound Object - Doesn't Work When Calling Previous Timeline Frame?
Hi everyone.
I'm having this problem that is more theory rather than code and I'm wondering if anyone has had the same issue.
I'm using the sound object in flash to script all my sounds. Everything is fine, exept - when there is a sound playing (looping for example), and my MAIN timeline is called to a previous frame - the sounds just stop working.
Does the sound object not allow sounds to play when called to a previous keyframe?
Wondering if someone has had this problem.
Thanks alot!
Preloader Doesn't Work Properly With My Sound Object.
Hello All.
I have a question about my preloader.
My sound object seems to be downloaded first rather than the preloader being displayed first.
I understand it probably has to do with the fact that I exported the soundobject in the first frame under linkage but I am not sure how to resolve my problem.
If I unclick the "Export into first Frame" option my sound doesn't seem to be playing.
I have used looping sounds in MCs and my preloader is working for those, but this time I want to use the sound object as shown below.
My current home page is http://www.fiskdesign.net
What I would like to do is to have my preloader display first and then the sound to start playing along with the animation.
(I attached below my AS I am currently using.)
I am greatful for any suggestions.
Henrik
// attach sound object
s1 = new Sound();
s1.attachSound("s1");
// Pre Load Function
assessLoad = function (clip, endPreloadFunc) {
var kbLoaded = clip.getBytesLoaded()/1024;
var kbTotal = clip.getBytesTotal()/1024;
var percent = Math.floor(kbLoaded/kbTotal*100);
loaded.text = Math.floor(kbLoaded)+"Kb";
total.text = Math.floor(kbTotal)+"Kb";
bar._xscale = percent;
if ((kbLoaded/kbTotal == 1) && kbLoaded>1) {
endPreloadFunc();
}
};
endPreload = function () {
clearInterval(preload);
};
preload = setInterval(assessLoad, 100, this, endPreload);
http://www.flashkit.com/board/newthread.php#
Loading Youtube Video: Ok, But Show Up HUGE Size
Hi there, i´m making a really simple site to a friend of mine who owns his DVD shop. The simple idea was to make a movie clip that loads you tube video inside it so people can see movie trailer on his site.
I´m using the following code inside of a blank MC:
Code:
System.security.allowDomain("http://www.youtube.com");
System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
this.loadMovie("http://www.youtube.com/v/2inVnj-GygE");
The problem is that instead of loading on youtube normal size (425 x 350px) the movie is loading HUGE size, covering otter parts of the site as you can see here (patient is required, site not ready yet):
http://www.xpromocoes.com/testexyz
Some things i´ve been throught...
With this code
Code:
System.security.allowDomain("http://www.youtube.com");
System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
_root.createEmptyMovieClip("v_mc", _root.getNextHighestDepth());
_root.v_mc.loadMovie("http://www.youtube.com/v/2inVnj-GygE");
On a blank flash movie with default size (550 x 400px) the youtube video loads fine, with 425 x 350px....
http://www.xpromocoes.com/testexyz/tst.html
but the very same code placed on a blank flash movie with the size i´m using (780 x 550) loads huge again....
http://www.xpromocoes.com/testexyz/2.html
weird and anoying..
Anyone has a clue on what´s going on here?
Best regards.
Accurate Preloader For FLV Streaming
Hi Everyone,
I'm working on accurate preloader for FLV video... The problem is that since it's streamed video it starts to play once it buffers enough of it (usualy around 8% to 15%)... So this 8% to 15% is the 100% of the loader bar but since it's changes from video to video I'm trying to find out how I can get this percentage before hand to estimate total size of preloading segment... Is there any way to do it in AS 2.0 (or AS 3.0)? How much of the FLV does Flash needs to preload to start playing video?
I'm using Flash CS and AS 2.0 for this project...
Any hints, thoughts, links and resources will be greatly appreciated...
Thanks for your time,
Peter
Preloader - Works But Not Accurate...
Hello, I made the preloader from the tutorial on this site...
The one that shows a bar and a percent of what is loaded...
It works but the bar will be about half way across when it says it is at like 80%...
Is that just processor lag or something?
Here is the site...
http://www.videolinktechnologies.com/new/
Thanks...
Extremely Accurate Sound / Beats.
How should I go about it. If I use frames, it is not flexible. If i use Timer, it still screws up.
I did hear there was some really cool method where you play a blank file, with a specific time length, and that will loop, and using that sound file, it will dispatch a event when it finishes, hence you get a very accurate loop.
But not really sure how that works. Anyone?
Count All Clicks On A Button And Show Them?
Hi, I want to make a counter for my button and show the entire clicks(How many times ever was clicked(not only for the viewing user)) for this button. Do you have any idea how this could be done.
Thanks in advance.
Changing Bytes Total So Preloader Will Be More Accurate
I have a nice preloader for my current site that shows the total bytes , bytes loaded, remaining bytes and percentage loaded
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("mymovie", 10) {
gotoAndPlay ("mymovie", 1);
}
Everything works well but since I start the movie streaming before the total bytes are loaded, the percentage loader and bytes loaded are about are at about 50% when the movie starts. I would like to lower the total bytes to about half so the preloader is more accurate. I do not want people to see the preloader and leave because they think it will take forever to load. If anyone Knows how to do this let me know.
I guess I could load more swfs as well.
Let me know...
Dave
Show All Mode Doesn't Show The Right Objects
Hello!
I have an urgent problem. If anyone can help me I would realy apreciate it.
Please take a look at: http://www.alphadesign.3x.ro/menu.html
And then at: http://www.alphadesign.3x.ro/oct3-fixes.jpg
The problems highlighted in the picture can only be seen in "Show All Mode". If you zoom in the menu, those issues dissapear.
Can anyone please help me? It is very urgent.
Thank you!
First Frame Is Huge
I've benn having this problem lately. It's a strange one. The first frame of my flash movie, I can see this upon testing the movie, is huge in size. Now this happens even if the content on the first frame is small. FOr example, I have about 10kb worth of content on my first frame, but when I test the movie it shows I have 64kb on that very same frame. Does anyone have any ideas?
Thanks.
Eugene
Huge First Frame
While testing my movie, I came across a first frame of 100 kb. This is a little too much to load a website, so I put some things on the second frame and set up a preloader. But even now the first frame is still 60kb and it remains so even if there is nothing on the first frame ...
Is this normal?
Huge First Frame
I can't figure out why my first frame is so large. there is nothing there. i left the first two blank so that i can use a preloader but since the 75% of the file is in the first frame a preloader is out of the option. Can anyone help me? I am using a lot of differnt clip in the same movie but only 10 pictures. and the total file size is 228Kb. Please help this is for a new job.
Export Sound In First Frame And Preloader Issues
sup all,
I am having some preloader issues. I have my preloader on the first frame and it doesn't show up until about %70 complete. I feel like the issue is because I have some sound clips and I use the export in the First Frame checkbox.
So does that mean it is actually loading the sound first and then it hits my preloader? If I uncheck that option, I never get any sounds? what is deal? i appreciate any help.
here is my little game that has this issue:
http://www.part-time-chiller.com/ptc_game.htm
i'm using using Flash MX
take it easy yo
|