IDE :: Use The Progress Bar Component To Load The Main Swf?
Apr 28, 2010I've searched a little and in tutorials the progressbar always loads an external mc...I was wondering, is it possible to make the bar load the main movie?
View 1 RepliesI've searched a little and in tutorials the progressbar always loads an external mc...I was wondering, is it possible to make the bar load the main movie?
View 1 RepliesI'm trying to set up a preloader to show the load progress of the main swf, which has all of it's assets embedded. I found the factory class method as described on bit-101, but no load progress ever seems to show. The swf loads fine, but the bytesLoaded is always equal to bytesTotal and therefore the preloader is never called.
[Code]...
This correctly calls the Factory class first, and then instansiates Main and calls init(). But as I mentioned above the preloading is never shown as it seems to be loading everything straight away.Is this a problem with the way I'm embedding the images or because I'm testing locally?
I have a Flash site that I'm designing. The movie that I'm working with is the main movie into which my external .swf's will get loaded into. Now in the very first frame of my main .swf I have the progress bar component setup running in manual mode (I'm running in manual mode because I'm not using the loader component in conjunction with the progress bar. I figured that I wouldn't need the loader just yet because this is the progress bar for the main movie and not for an external .swf...) with this code:
Code:
var kalarahProgress:mx.controls.ProgressBar;
kalarahProgress.mode = manual;
kalarahProgress.indeterminate = true;[code]....
Now when I test it in FlashMX 2K4 Pro using "Simulate Download", everything works fine EXCEPT: Theres this white box that shows up right where my progress bar is in the first frame. After the progress bar loads (itself) then, you actually see the "candycane" indeterminate load bar and then after my other frames in the movie loads, it goes into my second frame and everything is cool.How can I make that white box go away? I tried using actionscript that would make the progress bar invisible until after it finished loading and then go to visible, but when I tried that, the component never came back visible. I just need to make that white box go away, it's taking away from the "beauty" of everything else. Also, my load bar doesn't show any percentages. It just flashes "loading" until after the rest of the frames are loaded. How can I get it to show the percentage of whats loaded so far?To download a copy of my .fla, just click here.
I'm having issues with a progress bar of a flv component. It goes beyond the limits and cannot control the movie or see the load progress. My problem can be seen here: [URL] To see the problem: Click ARQUITETURA -> Click REPRESENTAÇÃO -> Click VIDEOS DIGITAIS
[Code]...
I am trying to use the Progress Bar Component. Does anybody have examples of its implementation?
View 2 RepliesIs there a surestarter preloader in AS3 with CS4? Meaning here, showing a progress bar or percentage value before loading the main swf, right away at the start of the loading.I tried 3 different versions:
1- I used the code from a video (and accompanying files), and simply changed the content.swf to my own swf file (rename my swf content.swf), so that the original code would load my swf instead of the original content.swf. (original content.swf was too small to see anything before loading, because my loading speed is too fast).Here is the code from the original preloader (loads a small swf which then loads the main swf file):
var l:Loader = new Loader();l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);l.load(new URLRequest("content.swf"));
function loop(e:ProgressEvent):void{ var perc:Number = e.bytesLoaded / e.bytesTotal; percent.text = Math.ceil(perc*100).toString();}[code].....
Never had any problem with loading and monitoring loading progress of external files. Having some problems on monitoring progress of downloading of the main swf file...
In document class constructor: I add listeners to loaderInfo of document class...
Code:
loaderInfo.addEventListener(Event.OPEN,openListener);
loaderInfo.addEventListener(ProgressEvent.PROGRESS,progressListener);
loaderInfo.addEventListener(Event.COMPLETE,completeListener);
[Code]....
I'd like to add a progress bar to my image. The problem is that the image is in a custom component. In the Application, I make server call to get the pathway to the photo. I set photo1 in the Application. Please find below the custom component[code]...
View 1 Repliestrying to load a JPG. Here is my code:
import fl.controls.ProgressBar;
var pic_loader:Loader = new Loader();
var my_pb:ProgressBar = new ProgressBar();
my_pb.source = pic_loader.contentLoaderInfo;
[Code]....
The image loads but it does not "take the place" of the "pic_loader" movieClip like it did in As2. The main issue is I am getting this erroe message:
TypeError: Error #1034: Type Coercion failed: cannot convert loader@40fad881 to flash.display.Loader.
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at as3_test_file_fla::MainTimeline/finishLoading()
I am developing a audio player in flex. I need a seekbar kind of like on youtube's video player. To implement the basic seek functionality the HSlider component is enough. But I also want to show the stream progress on the seek bar. (youtube colors the already streamed part of the seekbar red). Is there a way I can achieve the same? drag and drop audio player component with play/pause and seek functionality.
View 1 Repliesthe following code traces the loading status of '1.swf', and once it has loaded, starts loading '2.swf':
preload1.loadMovie("portfolio/100_design/1.swf");
onEnterFrame = preLoadMeter;
var tl:MovieClip = this;
[code]....
I have a background swf that has been coded so that it scales with the browser. I want to load the main swf file (main.swf) on top of this bg so that it is always centred on the page.
View 2 RepliesI have a fla file that loads a slide show from an XML file. The xml file contains info about each slide. There's over a 100 slides so the loading takes some time. However I'm not getting actual load progress. It traces nothing until after the load is complete and then it shows the progress that it should have traced one by one, however it traced them all at once on the complete. Because it's not firing the onProgress correctly my preloader is rendered useless. Am I doing something wrong on is this a bug in Flash?
[Code]......
I am trying to create a interactive video presentation for a company seminar. In this ppt slides will loads according to the cue points in a FLV.
I am successful in loading external jpeg (ppt slides) as the movie reaches at any particular cue point. I am also able to jump to a particular time frame in FLV using navigation cue point.
But the issue is, when someone drag FLV progress bar and it is left between two cue points then the slide doesn't change according to the location of the FLV progress bar.
Real novice here, I have an xml gallery that works just fine my only problem is that i have no way to show the user the load progress between each image. Being as rubbish as I am I cant update my code to indicate this.Im sure that someone here will find this challenge really quite easy.I have placed my code beneath for anyone willing. I have also highlighted where my when my photo loads (i think). Thought I would add the whole code just in case it was needed.I would like something as simple as this below for each image, this is what I use to load the whole gallery
Code:
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
[code].....
I have a function that loads a room and when I load the room I have progress bar that displays with the percentage downloaded. The percentage text seems to be resetting with each load of an image but not the progress bar. How do I reset my progress bar?
Code:
// add room image to the viewport
function addRoom(event:MouseEvent):void {
//trace(rmPictures[event.currentTarget]);
var rmloader:Loader = new Loader();
[code]....
This might be a tough one, so brace yourself I have a .swf file that plays until a certain frame.
Once the certain frame is reached, I'm trying to play an external FLV file that it loads onto the stage.
Everything works fine so far, I can display a Progress Bar while downloading the external FLV file using this script:
[Code]...
I have a function that loads a room and when I load the room I have progress bar that displays with the percentage downloaded. The percentage text seems to be resetting with each load of an image but not the progress bar. How do I reset my progress bar?
[Code]...
why the preloader script below might not be working correctly in all browsers? It definitely loads the files properly, but the progress bar does not show in firefox. It just shows a blank screen until the files are 100% loaded, then the enter site logo appears.
I have tried the following things:
1. Using relative vs absolute file paths for the external swfs makes no difference to the behaviour.
2. Changed publish settings to export AS classes in other than the first frame - didn't have any anyway. No change.
3. Unchecked "export in first frame" for absolutely everything. Tried both checking and unchecking this for the actual loader_mc. No change.
I'd post my fla instead of code, but I'm using Flash 8 and can't save any earlier than MX2004 and people don't really seem to look at them that much when I post them. If anyone would like to see, I will upload.
Preload code (on main timeline)
Code:
stop();
onEnterFrame = function()
{
[Code].....
i want to load a swf in a MC called frame and want to display the load progress of the loaded swf. i tried sth like that:
[Code]...
I have created the following preloader saved as "preloader.swf" that loads an external SWF file as follows:[code]I was reading to try avoid the PROGRESS and COMPLETE events since these events don't work 100% of the time.Now my question is this: is there a way of how I can go about to have the same functionality of loading an external SWF file (as above) but WITHOUT using the PROGRESS and COMPLETE events?
View 1 RepliesIn preloading a movie, I need to listen to the load progress of an external FLV that resides on the next frame-- the grandChild of a movieClip on the stage.This is the actionScript of the mentioned grandChild:
Code:
import fl.video.*;
function onFLVComplete(event:VideoEvent):void {
event.target.play();[code]....
Now, if I understand it correctly all I have to do is listen to (making sure my child mapping is correct) this loader....correct? I have the following in on the first frame throwing a 'reference to null object or property' error:
Code:
container.main.myVid.loaderInfo.addEventListener (ProgressEvent.PROGRESS, onProgress);
container.main.myVid.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
I have an SWF movie (1375 frames) and created a progress bar (248px wide) with a slider that moves according to the movie progress. I'm doing that next way:Calculating the distance for the slider to be moved each frame (248 / 1375) On each ENTER_FRAME moving the slider for the calculated distance The problem is - the movie ends far before the slider reaches the end of the progress bar.
I'm thinking that the distance (Step 1) is is somehow ends floored by Flash and the actual distance it moves the slider is smaller than required. That's why the movie ends, but the timeline control just passed the 2/3 of its way. My question is - is there any solution for the problem? Or any other way to go, if it's a wrong one?
I'm trying to set up a preload system that can load multiple XML files and manage an overall progress bar but got immediately screwed by ProgressEvents not bubbling. My basic code set up is: Document Class
XMLManager extends EventDispatcher
XMLloader extends EventDispatcher
So document class up an array of xml paths and passes that to the XMLManager, that then iterates through the array and creates a new XMLloader for each path and stores those XMLloaders in another array. The XMLloader goes off and creates an URLLoader that loads the XML. It has listeners for Event.Complete, IOErrorEvent.IO_ERROR and ProgressEvent.PROGRESS which is fine.
I'm getting the correct progress data in my progress handler but what I want to do is broadcast that progress data straight back up to the Document Class which I had thought would be where dispatchEvent would come in by doing something like this in the XMLloader class:
[Code]....
I am pulling double duty with this question as it serves two purposes. I am developing a total flash controlled ad system for myself, but also need to use the same theory for a project for work.
Concept: I have a main movie (ad rotator system) that I then want to randomly load other swf's (individual ads) into this main swf after a set period of time. The random load I got set no problem. The problem I am having is to get it to move to the new Frame label of the main movie which then loads the smaller swfs. I am using the LoadMovie with nInterval time delay command in flash to load the movies.
[Code]....
I want to load six seperate .swf's into the main movie while the main movie loads too. So in simpler words, i want to be able to load all of the swf's the same time i am loading the main swf.
View 2 RepliesI have a progress bar inside a repeater and therefore I will need to use getRepeaterItem to set it's progress as suggested in this question.
How can I do that such that the value of progress may be taken from repMonitor.currentItem.threatLevel?
<mx:Accordion id="monAccordian" includeIn="Monitoring" x="10" y="10" width="554" height="242" change="monAccordianChange()" >
<mx:Repeater id="repMonitor" dataProvider="{monitoringArray}">
[Code]....
I have a 4 1/2 minute Flash Demo: first minute is Intro Flash animation, next 3 minutes is a progressive video with a FLV playback component, and last 30 seconds is conclusion Flash animation. When I press the pause button on the FLV it pauses the video but the main time line continues to play in the back ground so that the last 30 seconds will play no matter what the stat of the FLV. If the FLV is paused the conclusion will just start to play when it reaches that part of the timeline or worse if you pause the FLV and resume it after say 30 seconds the video and the last scene sound plays at the same time at the end of the video. I have a toggle play/pause button on the intro animation that works fine and the FLV play/pause works but I don't know how to pause the end of the timeline when the FLV is paused.
View 9 RepliesHow do I get "close" button to run runFunction() from within component to outside declaration? FxGlobals.topLevelApplication doesn't seem to be working for this.
<fx:Declarations>
<fx:Component className="MyNativeWindow">
<s:Window>
[Code]....
i'm trying to change components states through a control bar button (id=btn) in main... so i add an event listener to it ... the code goes like this
import flash.events.EventDispatcher;
import flash.events.MouseEvent;
import mx.core.FlexGlobals;
[code].....