ActionScript 2.0 :: Flash 9 - How To Preload The Main Timeline
Oct 14, 2006how to prealod the main timeline with or without the document class. I know i've to use loaderInfo but don't know where and how.
View 1 Replieshow to prealod the main timeline with or without the document class. I know i've to use loaderInfo but don't know where and how.
View 1 RepliesI want to preload the main swf file, but I am learning/programming in OOP using just ActionScript3.
View 0 RepliesIn trying to keep file size down for download time... I have a SWF file that I have placed using the "UILoader" component (not sure if this is the correct thing to do)... what I would like to work out is how to make a preloader within my main timeline for this SWF file when it comes in. I hope that makes sense - I am very new to all this and struggling with terminology etc. I figured Actionscript would be what I need - but no clue right now...
View 10 RepliesI'm new on AS3 and have NO IDEA how to build a preloader. I need a preloader to loads my main file and another preloader to load the external files.. Both are with different preloader layout.But first, i'd like to know how do I preload my main file. The main file has a lot of actionscript codes in one frame;
View 3 RepliesIn my flash site I have one main swf that is preloaded using:
Code:
onClipEvent (enterFrame) {
framesLoaded = (Math.ceil (( _parent.getBytesLoaded() / _parent.getBytesTotal()) * 100));
gotoAndStop (framesLoaded);
info.text = framesLoaded + "% completed";
if (framesLoaded >= 100) {
_root.gotoAndPlay (2);
}}
Works great, main swf preloads, then begins to play. On frame 5 it calls my external swf using:
Code:
_root.createEmptyMovieClip("container", 1);
loadMovie("externalmovie.swf", "container");
setProperty ("container", _alpha, "45");
container._x = 64 ;
container._y = 135 ;
It calls the external swf directly onto level 1 of the main swf at the location and alpha specified. I need this external swf to preload! I want to use the exact same method as the code I used for the main preloader, but it conflicts....being that it uses _root, _parent? However, being new to actionscript, I have no idea what "paths" need to be changed to make this work and not conflict.
The basis of this question is why my code won't work to preload an external swf into my main swf. I have a main swf this calls the external swf using:
Code:
_root.createEmptyMovieClip("container", 1);
loadMovie("externalpreloader.swf", "container");
setProperty ("container", _alpha, "45");
container._x = 64 ;
container._y = 135 ;
I've attached an example fla like the external swf I'm trying to load, and you can see the preloader I'm using in that file. All that happens when this swf is brought in is a quick flash of the outline for the preloader and then the swf starts playing. It's not just because of the small size either, because no matter how big I've made the swf, that's all it ever does. I think it must have something to do with referring to _root, but I don't know how to change it! To test it add a large pic or sound file on the frame that I just drew a rectangle.
how to preload external swf's into my main site. I have tried all sorts of differents codes and ways to set it up, but nothing seems to work. I have a preloader I use to load the whole site, with this code
myProgressBarListener = new Object();
myProgressBarListener = function (eventObject) {
myProgressBar._visible = false;[code].....
is there a way i can take this code and the preloader i have made and place it on one frame in my timeline and change the code a little bit to provide for my external swf to be loaded into a holder?If anyone has links to how to do this easily that would be awesome. I am having quite a headache trying to figure this out. I have a lot of photo galleries that i need to preload when the button is hit and you are directed to that frame in the movie, so people have something to look at while that photo series loads.
I have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number. how do I do that?
see the code and comments
public function mainClass()
{
//stage declaraction
stage.align = StageAlign.TOP_LEFT;
[Code]....
I have made a presentation in flash AS2. I have a main.swf and 14external .swf files and each has its own preloader.
I want that when main.swf plays, the external swf should starts preloading sequentially so that the presentation will run smoothly.
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]....
why the timeline inside these movie clips and the timeline on the main scene have to correspond to work. [URL]
View 1 RepliesI cannot seem to find anything of what I need from google.(Well, I can find the reverse method to what i need ) Basically I wish to access a variable declared in the Root Timeline from my Movie clips timeline.
[Code]...
I simply want to assign a variable to the current frame of the main timeline (not movieclip timeline) I already know about _currentframe and it doesn't help in this case.
View 4 RepliesI am in the learning process. Working with FlashCS5 and AS3. if the issue appears to be too simple for you. Placed a movieclip(mcassessJohn) on the main timeline and moved to the frame labelled "johnFeedback" in the movieclip timeline using the following actionscript code.
[Code]...
I have a file comprised of 1 scene and two movie clips. The clips are instanced into the Main Timeline and occupy Frames 1 and 2 respectively.MovieClip1 is an animation that has navigation buttons that appear at the end of the clip. I'm trying to get mouse click navigation to make Frame 2 on the Main Timeline active.
Here is what I'm trying but it is not working:
btExplore.addEventListener(MouseEvent.CLICK, ExploreClick);
function ExploreClick (evt:MouseEvent):void {
gotoAndStop(2);
}
this takes the animation to Frame 2 of the Movie Clip Timeline not Frame 2 the Main Timeline.
I'm having some problem with the workflow of flash.I make web banners everyday att my work att it is important to me to have the banners easy structured so I can copy effects, tweens and symbols to a new banner. I have Flash CS3 pro.I always start by making a symbols. And then in the symbols own timeline I make the animation or effect.
The big problem I'm having is when I have the main (scene1) timeline with many frames, and then have symbols on that timeline, with it's own timeline with some frames. The frames in the symbol timeline is okey, but at the main timeline the frames is too short or too long so the animation of the symbol cuts of early or it plays more than one time (too many frames).
How do I calculate how long a symbols timeline should be so It maches the main timeline?What happens to me is that I always have to adjust the symbols timeline and the main timeline, and this I have to do many times.
I created a movie in MX and I was publishing it in Flash 6 which worked fine. But now I now need to export its as Flash 4 so I can also export as .mov. But I keep getting an error regarding my script when I attempt this. "Scene=Sc1, Layer=Script, Frame=207: Line 1: You must export your movie as Flash 5 to use this action._root.gotoAndPlay("LL2");" Im guessing my actionscript isnt valid for flash 4. Any thoughts on what is the correct code for flash 4?
View 2 Repliesso here's the function on main stage:
[Code]....
and here's the code that wants to call this function in a another movie clip. I've attached this clip dynamicaly to the main stage as well.
[Code].....
How can i acess slideImage function on the main stage. in AS2 _root.slideImage(btnNumber); would work. How Would I do this in AS3?
I have a main.fla which has 3 movieclips inside it. All 3 mc's have timelines that run 40 frames. The main.fla timeline has each mc instance on a frame. mc_1 is on frame 1 mc_2 is on frame 40 mc_3 is on frame 81 as the main timeline plays the clips each one fades to the other. I need to know how to target this scenerio after mc_3 plays I need to have a goToAndplay (20) set up so the animation inside mc_1 starts playing (frame 20) of mc_1.
View 5 RepliesI have a magic cloud effect. On frame 30 of the nested effect I would like an mc on the main timeline to become visible.Not too sure how to code with frame numbers,a) Do I put AS on the timeline of the nested clip ORb) Write code on the main timeline to listen for when the nested mc gets to frame 30
View 5 RepliesI have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn't catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
View 3 Repliesbasically i would like to dynamically display and preload an image onto my main movie clip. this image would be the first item in my xml file. on my main timeline i would like to have a few buttons that a user could click to change the default image on the page.
when they select a new image, i would like to have the preloader appear above the default image and then tween between the old and new image (one fading out and one in kinda thing).i sourced some code but i've been having problems preloading the first image. the image loads but the preloader doesn't do anything. it seems like the preloader doesn't seem to recognise that i'm trying to load an image. it thinks it's fully loaded and carries on before the load can begin!i would also like attach a different preloader for the first image displayed than the ones being loaded via the buttons.
this is one of those upsurdly basic questions for which google does not work. I have usually dispatched events from my classes and dealt with the user interface in the document class. But now i want to separate all the UI in a separate class, accessible by other classes. have added it as a child to the main/document class, but how do i reference the main class without going through parent.parent shananigans?dit. one more thing i remembered. Some of my UI elements are not programatically added.here is the code i have. i get possibly undefined property error.
package rpflash.ui {
import flash.display.Sprite;
import flash.display.MovieClip;
[code].....
I have a air for android project going and I am wanting to import a actionscript class for use in the main timeline. I wrote the class and imported it, but I get the following errors: Line 1 5001: The name of package 'com' does not reflect the location of this file. change the package definition's name inside this file, or move the file. Here is from the timeline
[Code]....
can a movie clip which is loaded from an external source control the main timeline? For example I have a set of buttons contained within a movie clip which is loaded externally onto my main timeline...can those buttons direct the swf to a specific frame on the main timeline? Also...is there any way to load an external movie clip into a specific LAYER rather than Level?
View 2 RepliesSo I make my site in flash, forget to add a preloader for the main timeline. I go back and add the extra frames to allow this but as soon as I add even just one more frame it make all my graphics go jaggy edged!?! See diagram below.
View 6 RepliesSo this was quite simple in AS2, but considering that _root is no longer around, how can I call a function that is on the main time line from a nested movie clip?
This is what I have inside my movie clip:
Code: this.hit_mc.addEventListener(MouseEvent.CLICK, updateScore); I tried using Stage.updateScore, but that didn't work either. This is the error I'm getting:
1119: Access of possibly undefined property Stage through a reference with static type flash.display:Stage.
On my main timeline, I load a mc from the library with:
text_content.attachMovie("text_content", "text_content", 10);
There is a marker inside this mc called "news". I need a script in the main timeline that will gotoandStop "news" within the "text_content" mc.I have tried, amongst others
[code].....
I have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn�t catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
View 3 RepliesI declared a variable & it's value in the main timeline. Then I created a movieclip and have some actionscript inside that movieclip. Is it possible to read the varialbe's value within the movieclip?
Let's say I have this variable in root timeline var myVar:Number = 100; and I want to read myVar's value within a movieclip like following trace(root.myVar);