Loader And Progress Bar Synch Probs
loader.autoLoad = false; loader.content = "intro.swf"; pBar.source = loader; loader.load();
Ok... i have this code a loader a progress bar and 2 probs:
My first prob is that the movie in the loader starts playing before the progress is completed resulting not to able to see what is palyed before it reaches 100% while the movie has already started playing ... in a few words no synchronization between the progress bar and the loader...
The second is that i if i put the progress bar behind the loader so that it will be covered by the loader content once loaded the progress bar won't show it's progress and will remain on 0% even though it's loading the content... So what i need is a script that will allow me to have the prog bar in front of the loader and once the content is loaded the prog bar will disappear and not remain over the loaded movie.
I hope im not asking too much but it's kind of urgent and any help will be very appreciated.
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-06-2004, 01:50 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Pre-loader / Progress Bar
Hi.
I'm trying to place a sort of preloader / progress bar in my main fla. I'm loading a bunch of swf's into an empty movie clip instance called "body" upon the users request. I know how to make a preloader that resides in the first scene of a swf but I would like the preloader to reside inside the main flash file and not within each movie. Is this possible and does anybody have some code.....
Something like getbytesloaded.....but can I yse that for an empty movie clip?
Thanks much...
Mik
Loader And Progress Bar
Hi,
I have a directory full of SWF files and I want to design a movie that will allow each one to be displayed in flash as a sequence stopping between each one until a user action moves the movie onto the next one.
These files are fairly large renders from plasma at around 1/2 to 2MB hence the need for a preloader.
Do I need to setup one movie per scene or is there a more dynamic way of pulling in the contents of the SWF directory to display in a movie?
Progress Bar (not A Loader)
Ok, first this isnt a loading progress bar is a bar that just shows you how far along the video is into playing.
how would I create a bar that would show a duration of a clip and have a fill keep getting bigger til it gets to the end. I also have these videos on an array so there are multiple. The bar length and duration would have to change with each video...
can someone help me create this?
-Ronnie
Progress Loader
Hi,
In my application there are certain tasks that take about 5 or 10 seconds to finish. I would like to show the progress of the task to the user, like a progress bar or something. How do I do this?
Now correct me if I am wrong, this is not relatedt to a preloader which is having another SWF loading your application SWF and showing the progress, is that it?
Thanks
Jorge
FLV Progress Loader Within A SWF
I have a swf as a main page. I have created a flvplayer placeholder (by importing video) within the main page fla. The intent is for this welcome video to play and then for the main page flash to work as normal.
Carousel.swf is the main page. The timeline (blank-flvloader placeholder) runs long enough for the flv to play, then at about frame 150 the main page starts. The video is xxx.flv (1 MB) that should preload and play first (BEFORE that blank flvloader period). Note that there is a buffer setting within the flvplayer that I assume will allow some preloading before playing. This seems to work great. The problem is that I want the user to see a progress bar instead of seeing a blank background while the video is loadinguffering.
I used the code belowattached to get started. I created the fla as it states (http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001582.html)
I am unsure where to use this code. I have tested it with my URL target and it works. I thought about dragging it on top of the placeholder?? How can this preloader load the flv with a progress indicator, then continue on with the main page once preloaded and played? Should I use the preloader fla, or just use the code, etc.? Please excuse the loose terminology.
To recap: Carousel.fla has a flvplaceholder that calls an external flv for an intro video that plays first, then the timeline continues on to the main flash. This is all in the same html page.
Attach Code
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("http://www.helpexamples.com/flash/video/typing_short.flv");
this.createTextField("loaded_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
this.createEmptyMovieClip("progressBar_mc", this.getNextHighestDepth());
progressBar_mc.createEmptyMovieClip("bar_mc", progressBar_mc.getNextHighestDepth());
with (progressBar_mc.bar_mc) {
beginFill(0xFF0000);
moveTo(0, 0);
lineTo(100, 0);
lineTo(100, 10);
lineTo(0, 10);
lineTo(0, 0);
endFill();
_xscale = 0;
}
progressBar_mc.createEmptyMovieClip("stroke_mc", progressBar_mc.getNextHighestDepth());
with (progressBar_mc.stroke_mc) {
lineStyle(0, 0x000000);
moveTo(0, 0);
lineTo(100, 0);
lineTo(100, 10);
lineTo(0, 10);
lineTo(0, 0);
}
var loaded_interval:Number = setInterval(checkBytesLoaded, 500, stream_ns);
function checkBytesLoaded(my_ns:NetStream) {
var pctLoaded:Number = Math.round(my_ns.bytesLoaded / my_ns.bytesTotal * 100);
loaded_txt.text = Math.round(my_ns.bytesLoaded / 1000) + " of " + Math.round(my_ns.bytesTotal / 1000) + " KB loaded (" + pctLoaded + "%)";
progressBar_mc.bar_mc._xscale = pctLoaded;
if (pctLoaded>=100) {
clearInterval(loaded_interval);
}
}
Loader/Progress Bar
This is a duplicate. I was getting an error message so I didn't think the post was going thru.
Edited: 05/12/2008 at 08:32:13 AM by dlipscombe
Loader/Progress Bar
I setup a progress bar that works when a SWF is loaded. If I use the URL http://www.rivahrealty.com the loader doesn't move but the movie does load. If I use http://www.rivahrealty.com/index.html the progress bar goes from left to right and the movie loads like it's supposed to. I've been trying to figure this out for 3 days. Can anyone help me with this?
Loader/Progress Bar
This is a duplicate. I was getting an error message so I didn't think the post was going thru.
Edited: 05/12/2008 at 08:30:57 AM by dlipscombe
Progress Bar & Loader
Hi all,
I am very new to Flash. I am running Flash MX 2004 Professional and have just created a photogallery, by following the wonderful tutorial on this site listed below.
http://www.kirupa.com/developer/mx/photogallery.htm
I see that Flash has a component add in feature for a loader and a progress bar. Is their an easy way to implement either one, that would go hand and hand with the tutorial above?
Thanks for your guidance in advance!
Progress Bar & Loader
Hi all,
I am very new to Flash. I am running Flash MX 2004 Professional and have just created a photogallery, by following the wonderful tutorial on this site listed below.
http://www.kirupa.com/developer/mx/photogallery.htm
I see that Flash has a component add in feature for a loader and a progress bar. Is their an easy way to implement either one, that would go hand and hand with the tutorial above?
Thanks for your guidance in advance!
(mx04-MacOS)Movie Clip Loader Class Probs
I've done loads of tutorials from Lynda.com to advance my actionscripting so anyone whos done them will recognise this code, sorry.
Heres code in my first frame:
var myMCL:MovieClipLoader = new MovieClipLoader();
myMCL.loadClip("book_1.swf", 10);
This loads book_1.swf fine.
Then, within menu_mc, I have some buttons. When I assign the code
on(release){
myMCL.loadClip("book_2.swf", 10);
gotoAndPlay("in");
}
and its doing nothing. Why not? Can we only address vars from actionscript on the root timeline or something?
Cheers for any kind help - I'd give you chocolate if it was teleportable!
Progress Bar / Loader Component
I want to preload a swf-movie and use the progressbar component.
Right now I have layer1-frame1 containing the progress bar component (modeolled, source:loader) and layer2-frame2 containing a Loader-component (named:loader, content path:movie.swf) )
The help file says something like that.
But it doesnt work.
Anyone here who can help???
Progress Bar / Loader Component - Example Please
I have expreimented with this for two days now...
and it should be so easy...
I am sure one of you guys could make this for me in a minute so I can have a look behind and see how exactly this is done:
Can't somebody make me a .fla-file with a Progress Bar component linked to a Loader component, that loads an external swf ??
My problem is that the Progress Bar does not show the correct value, my loader content starts to play when the progress bar shows about 80% loaded!!
Content Loader Progress Bar
i have a content loader control in my movie clip, and it loads a random picture file when a button is pressed. it takes some time to load the file, so how do i add a progress bar to it?
Problem With Progress Bar And Loader
I am having a problem with my progress bar and my loader componets. The Progress bar does not display the progress, but it does go away when the file is loaded. I tried to make the site with only one loader and one progress bar with by setting the .contentPath = "file.jpg"; but the progress bar was still visible after the file.jpg was finished loading.
On one frame I have a Loader called webLoaderArchaio and a ProgressBar called myProgressBarArchaio. Here is my code from the frame webArchaio.
//ProgressBar
myProgressBarListenerArchaio = new Object();
myProgressBarListenerArchaio = function (eventObject) {
myProgressBarArchaio._visible = false;
myProgressBarArchaio.removeEventListener("complete ", myProgressBarListenerArchaio);
};
myProgressBarArchaio.addEventListener("complete", myProgressBarListenerArchaio);
myProgressBarArchaio.mode = "polled";
myProgressBarArchaio.source = webLoaderArchaio.Loader;
On the next frame I have a Loader called webLoaderSTPR and a ProgressBar called myProgressBarSTPR. Here is my code from the frame webSTPR.
//ProgressBar
myProgressBarListenerSTPR = new Object();
myProgressBarListenerSTPR = function (eventObject) {
myProgressBarSTPR._visible = false;
myProgressBarSTPR.removeEventListener("complete", myProgressBarListenerSTPR);
};
myProgressBarSTPR.addEventListener("complete", myProgressBarListenerSTPR);
myProgressBarSTPR.mode = "polled";
myProgressBarSTPR.source = webLoaderSTPR.Loader;
here is the code for the buttons
btnSTPR
on(release){
_root.gotoAndStop("webSTPR");
}
btnArchaio
on(release){
_root.gotoAndStop("webArchaio");
}
thanks
Donald
[MX04] Progress Bar & Loader
Hi guys.
I'm doing a site for a photographer, and i'm loading the images using the loader component. Some of them are quite large, and auto-scaled to the size of the gallery. I want to use the progress Bar component, but don't know how.
My loader instance name is "galleryloader". I already made it work, I just want a loading bar to show how much of the image is loaded.
Thanks in advanced,
Aaron
[F8] Music Loader Progress?
Hello there.
I'm trying to build a progress bar the shows how much of an external mp3 has loaded.
the bar instance is an mc named "mpBar" , which is nested in a mc named "mcmpb".
I tried to set the inital _x property to 0, and then have it increment based on getbytsloaded/getbytstotal; but it's not showing working (it starts out in the 100% position).
My code is as follows
var nLoadProgressInterval:Number;
_root.mcmpb.mpBar.setProperty("_root.mcmpb.mpBar", _xscale,0);
function checkLoadProgress():Void {
mBytes = _root.sndAudio.getBytesLoaded()/_root.sndAudio.getBytesTotal();
setProperty("_root.mcmpb.mpBar", _xscale, mBytes);
}
and on the button I have a call to the function like this
_root.track3.onRelease = function():Void {
nLoadProgressInterval = setInterval(checkLoadProgress, 100);
}
Any help here?
Working With The Loader And Progress Bar
Hi
Im using the loader component and the progress bar together to load into my root movie external SWFs ...
Everything works great - ive created a function such as:
function changeContent(newMovie) {
myLoader.load(newMovie);
showProgressBar();
}
So from anywhere I can change my loaders content and show up the progress bar... the problem I have is once you have been through the movie, if you try to load one of the SWF's again they load up very quickly - because they are in the cache/memory ... the problem here is, my progress bar flashes up for a second and then goes off....
Is there some way I can work out if a loaded content is already in the cache - if I know this, then i can set the progress bar not to even bother showing up.
thanks a lot
[F8] Progress Bar And Loader Components...
Hi there I'm having a little trouble with using the progress bar with the loader component.
I have them both in a movieclip and they work fine when you test just the movieclip, but as soon as I put the movieclip in a scene the progress bar doesn't work anymore.
Here's the code...
myProgressBarListener = new Object();
myProgressBarListener = function (eventObject) {
myProgressBar._visible = false;
};
myProgressBar.addEventListener("complete", myProgressBarListener);
myProgressBar.mode = "polled";
myProgressBar.source = "my_loader";
myProgressBar.conversion = "1";
myProgressBar.label = "LOADING %3%%";
myProgressBar.direction = "right";
myProgressBar.labelPlacement = "bottom";
my_loader.loadMovie("http://media.ft.com/cms/3a00e22e-8312-11dc-b042-0000779fd2ac.swf", true);
Like I said when I test the movieclip the progress bar work aas it's supposed to and disappears when loaded. However when I put the movieclip on the stage the progress bar bar stays at 0% and doesn't disappear when movie starts to load in.
Am I missing something?
Best
Steve
Music Loader Progress?
Hello there.
I'm trying to build a progress bar the shows how much of an external mp3 has loaded.
the bar instance is an mc named "mpBar" , which is nested in a mc named "mcmpb".
I tried to set the inital _x property to 0, and then have it increment based on getbytsloaded/getbytstotal; but it's not showing working (it starts out in the 100% position).
My code is as follows
var nLoadProgressInterval:Number;
_root.mcmpb.mpBar.setProperty("_root.mcmpb.mpBar", _xscale,0);
function checkLoadProgress():Void {
mBytes = _root.sndAudio.getBytesLoaded()/_root.sndAudio.getBytesTotal();
setProperty("_root.mcmpb.mpBar", _xscale, mBytes);
}
and on the button I have a call to the function like this
_root.track3.onRelease = function():Void {
nLoadProgressInterval = setInterval(checkLoadProgress, 100);
}
Any help here?
HELP W/ Progress Bar (loader) For A Component
Hi all,
Hope someone can help.
I created a website with a component. I am not that great with code.
• I have a swf which I placed in an html page.
• There's a lot of images.
• They load from an xml file.
• I need a preloader to display while the images load.
Since I am using a "COMPONENT" I have no idea how to create a preloader or progress bar to display while the images load. Any help would be much appreciated! Thank you!
HOPELESS - Using Progress Bar/Loader Components
Hello everyone!
I'm about to start tearing my hair out, and I would be forever grateful for some expert advice.
I am using Flash 8, and want to use a single instance of the loader component with a single instance of the progress bar component to preload multiple external SWFs. I have it working fine for the first SWFs loading in, but when I try to preload in a different SWF further down the timeline using the same loader instance and progressbar instance it doesn't work.
If you can direct me to a tutorial of some kind or put me in the right direction I would be stoked.
Here is the code i'm using for the first external SWF:
PreloaderBar.setStyle("themeColor", 0xD51729)
PreloaderBarListener = new Object();
PreloaderBarListener = function (eventObject) {
PreloaderBar._visible = false;
};
ContentLoader.scaleContent = false;
ContentLoader.contentPath = "home.swf";
PreloaderBar.addEventListener("complete", PreloaderBarListener);
PreloaderBar.mode = "polled";
PreloaderBar.source = "ContentLoader";
PreloaderBar.direction = "right";
stop();
Then for the next SWF I want to load in I have added a keyframe in my actionscript layer further down on the timeline and inserted this code:
PreloaderBar.setStyle("themeColor", 0xD51729)
PreloaderBarProductsListener = new Object();
PreloaderBarProductsListener = function (eventObject) {
PreloaderBar._visible = false;
};
ContentLoader.scaleContent = false;
ContentLoader.contentPath = "products.swf";
PreloaderBar.addEventListener("complete", PreloaderBarProductsListener);
PreloaderBar.mode = "polled";
PreloaderBar.source = "ContentLoader";
PreloaderBar.direction = "right";
stop();
Just changing the contentPath to a different SWF
Please let me know if this is the right way to go about doing this, if there is an easier way, or if my code is completely wrong.
Thanks!
Quinn
(pre)loader Progress Bar Doesn't Appear Until 90% Complete
In the site I'm building, all the code and elements are in frame 2 of the main timeline.
Frame 1 contains a preloader, which is supposed to display loading progress while the user waits for all the frame 2 stuff to load.
For some reason, the preloader doesn't appear until loading of the entire swf is 90% complete, at which point it appears at 90% and completes its progress.
Here's the preloader:
Code:
stop();
var sw:Number = stage.stageWidth;
var sh:Number = stage.stageHeight;
var preLoaderWidth = 150;
preloader_mc.x = (sw - preloader_mc.width) / 2;
preloader_mc.y = (sh - preloader_mc.height) / 2;
addEventListener(Event.ENTER_FRAME, loading);
function loading(event:Event) {
var bytestotal = stage.loaderInfo.bytesTotal;
var bytesloaded = stage.loaderInfo.bytesLoaded;
preloader_mc.preloaderBar.width = Math.round(bytesloaded * preLoaderWidth/bytestotal);
if (bytesloaded >= bytestotal) {
gotoAndStop(2);
removeEventListener(Event.ENTER_FRAME, loading);
removeChild(preloader_mc);
}
}
Is there some way to get the preloader to display before the swf is loaded? To somehow force its display to take precedence over loading all the stuff that happens on frame 2?
Or do I need to rip all the frame 2 stuff off into a separate external swf?
- Bob
Loader / Progress Bar Component Issues.
I have a Loader component in a movieclip and a Progress Bar component in a movie clip.
Instance name of Loader is ThumbLoader
Instance name of Progress Bar is Progress_bar
I have the following code which works fine in the authoring and bandwidth simulation environment.
But doesn't work in the real life through the HTML page.
Code:
ThumbLoaderListener = new Object();
ThumbLoaderListener.progress = function(eventObject) {
Progress_bar.setProgress(ThumbLoader.percentLoaded, 100);
};
ThumbLoader.addEventListener("progress", ThumbLoaderListener);
Then I tried the following which also didn't work.
Code:
Progress_bar.mode="polled";
Progress_bar.source=ThumbLoader;
Then came across the issue between the Loader & Progress Bar components here http://www.macromedia.com/cfusion/kn...fm?id=tn_19442
Code:
Flash TechNoteProgress Bar does not sync with Loader Component in a movie clip
Issue
When a ProgressBar component and a Loader component are in the same movie clip, and the ProgressBar component links to the Loader component using a relative link, the ProgressBar component will not show the correct percentage corresponding to the Loader component's status.
Reason
If you simply add the name of the Loader—for example, myLoader—in the ProgressBar Component Inspector, the component's source actually points to _parent.myLoader. The ProgressBar is therefore unable to locate the Loader component.
Solution
When you use the Component Inspector to set the source, the source is defined to use a relative path. However, since an absolute path is required, make sure to specify one when using the Component Inspector to set the source. For example, if linking to the same Loader component (myLoader), and both components are in a movie clip named mcName, set the source to mcName.myLoader.
Last updated: July 26, 2004
The solution according to Macromedia is
Code:
Progress_bar.source=MovieClipInstance.ThumbLoader;
Now I have three movieclips (Thumb1_mc, Thumb2_mc, Thumb3_mc) and the Loader & Progress are inside those three move clips. How to set the Progress_bar.source=???
I am really confused.
It seems the progress event of the loader doesn't work at all.
Somebody please give me a workaround or some solution.
I did lot of searching in the net for this issue and found no solution. Please help me.
Kannan.
Loader Issues With Progress Text
hello guys,
this site rocks by the way, i am learning a ton. So thanks and keep it up.
My problem right now is that i created a loader and it works but i wanted to modify it a little bit by having the load percentage display text to rotate along with the circular progress bar. The thing is that i can't figure out what is wrong with the code, it works well when it is on the main timeline but when i insert it in a movie it stops working.
on my site below, i included the fla and the swf for both the working version and the modidied one (with the MOD at the end of the file name).
http://www.nicolaszein.com/flash/!/
thanks for everything and i hope you guys can help me with this.
ciao
Progress Bar Loader On A Scrollpane Source?
Is it possible to add a ProgressBar component (just like on a loader) but to an image being loaded into a ScrollPane - been trying to figure this out but haven't a clue if it's even possible!
Cheers,
Pt
AddChild To A Loader Progress Target
I want to display a loader when the progress is happening
so i have
Code:
var la:LA = new LA();
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fademein);
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
function showProgress(e:Event):void {
e.target.parent.addChild(la); // error.. i also tried e.target.addChild(la)
trace("loadeing"); // traces fine
}
I know this is something thats done all the time.. i just cant figure it out
Loader / Progress Bar Component Issues.
I have a Loader component in a movieclip and a Progress Bar component in a movie clip.
Instance name of Loader is ThumbLoader
Instance name of Progress Bar is Progress_bar
I have the following code which works fine in the authoring and bandwidth simulation environment.
But doesn't work in the real life through the HTML page.
Code:
ThumbLoaderListener = new Object();
ThumbLoaderListener.progress = function(eventObject) {
Progress_bar.setProgress(ThumbLoader.percentLoaded, 100);
};
ThumbLoader.addEventListener("progress", ThumbLoaderListener);
Then I tried the following which also didn't work.
Code:
Progress_bar.mode="polled";
Progress_bar.source=ThumbLoader;
Then came across the issue between the Loader & Progress Bar components here http://www.macromedia.com/cfusion/kn...fm?id=tn_19442
Code:
Flash TechNoteProgress Bar does not sync with Loader Component in a movie clip
Issue
When a ProgressBar component and a Loader component are in the same movie clip, and the ProgressBar component links to the Loader component using a relative link, the ProgressBar component will not show the correct percentage corresponding to the Loader component's status.
Reason
If you simply add the name of the Loader—for example, myLoader—in the ProgressBar Component Inspector, the component's source actually points to _parent.myLoader. The ProgressBar is therefore unable to locate the Loader component.
Solution
When you use the Component Inspector to set the source, the source is defined to use a relative path. However, since an absolute path is required, make sure to specify one when using the Component Inspector to set the source. For example, if linking to the same Loader component (myLoader), and both components are in a movie clip named mcName, set the source to mcName.myLoader.
Last updated: July 26, 2004
The solution according to Macromedia is
Code:
Progress_bar.source=MovieClipInstance.ThumbLoader;
Now I have three movieclips (Thumb1_mc, Thumb2_mc, Thumb3_mc) and the Loader & Progress are inside those three move clips. How to set the Progress_bar.source=???
I am really confused.
It seems the progress event of the loader doesn't work at all.
Somebody please give me a workaround or some solution.
I did lot of searching in the net for this issue and found no solution. Please help me.
Kannan.
View JPG In New Window Using Loader & Progress Bar
Hi there,
I am currently loading my JPG files into my flash presentation using the Loader component.
Together with the loader component, I used the progress bar to display what the status of the loading is. Each frame contains another loader component and loads his jpg as you enter the frame.
Now I would like to make the loader component or a button that maximizes the view of the picture. This should be a blank page where the jpg is viewed in its original size.
Can I do this with code? The loader component on each frame already knows which jpg should be loaded, so can't I make a function that checks which jpg to display and add a blank page so the picture can be viewed?
Thanks in advance for all your reply's!
Greetz,
D2C
Progress Bar/Loader Component Question.
I've read the tutorial on UI Components here on UltraShock and you guys did a great Job on it. However i don't understand something: What's the point of having a progressbar/loader when it has to load a differnt swf file? so i thought well i could just use the progressbar and when it's finished it would goto a different frame, but from my reading the eventlistener doesn't seem to work in mx 2004 for the progress bar so how would i make the progress bar load the swf file and then go to frame 2?
Loader Progress Bar Working On Broadband But Not Dial Up
I am using the loader and progress bar components to load in external images to my main swf. These appear to work fine on broadband but when I test on dial up (with the latest flash player installed) the progress bar does not work. Any suggestions anyone??
I am using FLash MX Professional
ProgressEvent.Progress - How To Detect Which Loader Called Me
Evening.
I have a ProgressEvent.PROGRESS event listener, used by four individual loaders, which load images into seperate movieclips once loaded.
Each of my seperate movieclips are to have preloaders, modified during the progress process. This means the progress function needs to know which loader called it.
If I attempt to detect ev.target.loader, I get the following error:
ActionScript Code:
Error: Error #2099: The loading object is not sufficiently loaded to provide this information.
at flash.display::LoaderInfo/get loader()
at About/loadProgress()
Short of making four seperate progress functions (yuck), how can I get the progress function to detect which loaders ProgressEvent called it??
Any help would be greatly appreciated, thanks.
Loader.close() Method Won't Stop A Progress
Hello,
I'm running into some problems using the close() method.
I'm trying to build a class that checks a resource size before loading it.
it's very simple: I use the Loader class to load the resource, listens to the first progress event and immediately closes the connection with the Loader.close() method.
However, the close() doesn't seem to stop the Loader after the first progress event dispatched.
here is a quick copy & paste frame code just to demonstrate my point:
Code:
Code:
import flash.display.Loader;
import flash.events.ProgressEvent;
import flash.net.URLRequest;
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, printProgress);
loader.load(new URLRequest("big.jpg"));
function printProgress(evtProgress:ProgressEvent):void
{
trace("progress");
loader.close();
trace(evtProgress.bytesLoaded);
}
The ProgressEvent is thrown until the big.jpg loading is complete.
How could I stop it just after the first progress event ?
Thanks a lot,
Me.
Progress Bar For Showing Progress Of Loading Data From A CFC?
Hi all,
I wondered if anyone knew any way of showing a progress bar when calling a CFC through actionscript? I have a CFC which returns a ton of data, and so would like to show the progress of the data being loaded.
I know you can do this when loading a webpage, through using URLLoader, and getting the progress by listening to the ProgressEvent.PROGRESS event. However, when I call the CFC, I don't use the URLLoader class. My code for calling the CFC service looks like below
Code:
var service : RemoteObject = RemoteObject( ServiceLocator.getInstance().getService( "productService" ) );
var responder : GenericResponder = this.initResponder( getProductOptionListResult, getProductOptionListFault, resultHandle, faultHandle );
var call : AsyncToken = service.findOptionsForProduct( product );
thanks in advance for your help!
Mark
AS3 - Coding A Progress Bar To Show Progress Of A Timer.
Coding a progress bar to show progress of a Timer.
I have a timer that is set for (8000, 0). Pretty much what I would like to do is show the progress of where the timer is at but with a graphic. Something simple like a loader bar. Pending on where the timer is at the progress bar would load accordingly.
I am going to give it a try with out help but thought I would ask on the forum incase someone has an idea of how to do this before I go on a wild goose chase. Anyhow here goes the chase. If I figre it out before someone can help me I will post my code here.
Thanks,
Artofacks1
Lip Synch Possible?
Hello people! this is my first post in the forums.
I wanted to know if it's possible in flash 8 to detect whether a mp3 is sounding or not so I can put a mouth animation to a character dynamically
thanks in advance
AS3 - Lip-synch
Hi,
for years I've been using flashAmp lite 3 for lip synching in AS2 but now, I'm going to go one step further and see if it is possible to use AS3 and create a dynamic real time lip-sync on my cartoon animations?
I've googled the net but haven't found some useful tutorial. please let me know where I can find some more info about this? as I feel like flash CS3 and AS3 is able to take care of these things...
Please correct me if I'm wrong.
Hadi
Loop Synch
Hy again, i have to make a small and interactiv presentation for a Music firm and is almost done except one thing: i have 10 loops and the client want me to make a small Dj "thing" inside this prezentation. I've made the interface and all but the problem is that the loops are not synchronized!!! If you play a loop and then another one you have to "guess" the synchronization or have luck ))
So, anybody have a link to a tutorial on how to make synchronization loops?
Thanx
Mouth Synch
Hi everyone,
I need some help on mouth synching. Every time i try to do it with tween, it never ends up right. I want, for example, to start at a closed postion and then to an open position with teeth showing and stuff and then to a different position. So my question is, can someone give me a way or tips on how to do this right; mouth synching?
Thanks a lot
Best Lip Synch Strategies?
I am making an animated movie, with MANY voiced lines, and I want to lip synch. I have been doing some, very slowly, but I am wondering if there are any tips or tricks that any of you know of that could speed the process up.
Synch Problems
When I run a test movie from inside the fla. everything is synched in my demo with the voice over - - when I publish my movie things are not synched with the voice over ---- help please!!!!!
Quicktime Synch
I'm exporting a Flash 8 Pro file to swf and .mov. The synch in the swfs is fine - but the sound in the movs slips later and later. I've tried various codecs etc with the same result. I sense there's a pref I've missed in Flash. Can anyone help please?
Why Are My Mp3s Out Of Synch?
When I publish my movie at 32kb per second, the animation is perfectly in synch with the sound.
But when I lower the quality to 16kb per secont, the sound goes out of shynch and progressivly plays quicker.
I need to lower the quality to 16kb to reduce the file size of my animation (to meet a criteria in my brief).
Is there an easy way or sorting it out, or do I have to space my sound files differently to accomodate for the un-synching?
Thanks
Sound Synch
Hi,
I need to synch streaming sound to a slideshow. I want it to start on the first frame and end on the last, no loops.
It works on some brwosers but not on all. How do I ensure the synch is same everytime and in all browsers.
thanks,
Why Are My Mp3s Out Of Synch?
When I publish my movie at 32kb per second, the animation is perfectly in synch with the sound.
But when I lower the quality to 16kb per secont, the sound goes out of shynch and progressivly plays quicker.
I need to lower the quality to 16kb to reduce the file size of my animation (to meet a criteria in my brief).
Is there an easy way or sorting it out, or do I have to space my sound files differently to accomodate for the un-synching?
Thanks
Sound Synch
Hi,
I need to synch streaming sound to a slideshow. I want it to start on the first frame and end on the last, no loops.
It works on some brwosers but not on all. How do I ensure the synch is same everytime and in all browsers.
thanks,
Graphics Out Of Synch
Hi, I'm fairly new at Flash, and have been having a problem which I assume is a fairly basic one, but I haven't had any luck finding anyone or any resource with specific suggestions on how to fix it.
I've been working with some fairly simple Flash files in Flash MX. No ActionScript, just basic graphics, symbols, and layers.
My problem is this: When I try to line up different graphical elements, they may display perfectly when I test the movie, but when I export the movie, some of the elements will have moved a fraction of an inch out of alignment. This usually seems to happen when I have a text box that I am attempting to annotate with some overlaid graphics, as per the following examples:
Example #1: I have some text that I am displaying on the stage, like a poem or haiku:
This is line 1.
This is line 2.
This is line 3.
Then I try to annotate the poem with a red circle around the number "2" on the second line, so I make a separate layer with that circle. When I test the movie, it displays fine, but when I publish it, the circle shows up offset, so it's actually circling the area between the "1" and the "2".
Example #2: Again, I have some text like the above 3-line poem, and I want each line to appear one at a time. So I made a mask on a separate layer which was the same color as the background, and then I moved the mask downward in steps, so as to make the second and third lines "appear". Again, in "Test Movie" it works perfectly, but when I publish the movie, the mask shows up in a different spot, so I'll get the display of line 1, and then most of line 2, and then only the top half of line 3, and so forth.
I've also had similar problems where I'm just layering graphics on top of graphics, so it's not only a problem with text boxes.
Any suggestions on how to fix the problem would be much appreciated!
Thanks,
Elonka :)
|