Preloader And Starting Point
Hello,
I am having a trouble with my script. I am loading a swf (via a button) into an empty movie clip using a movieclip loader, but my new swf starts although it is not fully loaded. Here is the script :
//*****variables and instances******* var mcPreloader:MovieClip; var mcSwfLoader:MovieClip; // empty movieclip var mcSwfLoad:MovieClipLoader = new MovieClipLoader(); mcPreloader._visible = mcSwfLoader._visible=false; // ********create objects********** var myListener:Object = new Object(); //********functions************** function SwfLoading(swfname:String) { mcSwfLoad.loadClip(swfname, mcSwfLoader); }
myListener.onLoadProgress = function(mcSwfLoad:MovieClip, nloaded:Number, ntotal:Number):Void { if (nloaded>1) { mcPreloader._visible = true; mcSwfLoader._visible = false; percent = int(nloaded/ntotal*100); mcPreloader.txPourcent.text = " "+percent+"%"; } if (percent>99) { mcPreloader._visible = false; mcSwfLoader._visible = true; //trace(percent); } }; //************************************************** ***** var btnEnter:Button; btnEnter.onRelease = function() { btnEnter._visible = txIntro._visible=false; SwfLoading("homepage.swf"); }; mcSwfLoad.addListener(myListener);
Can anyone tell me how to make my SWF start only when it is fully loaded ? Thank you !
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-19-2007, 10:43 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
.flv Starting Point
I have an .flv movie on a webpage and the client doesn't like the blank black screen. How can I advance the starting point of the movie so that it displays the beginning of the movie when idle?
Just Need A Starting Point
Hello,
I am somewhat new to flash but not as new as I use to be (he he).
Ok enough of that I am trying to create some training videos. In short; what I need to do is take a .bmp and be able to highlight certain areas of the pic. Once that area is highlighted to have some info pop up about that component, then I would like to be able to click on the highlighted component and send it to another URL page. I have a pretty good Idea on how to create buttons (may have to get some help later), but where I am running into problems is how to I break up the different parts of the Picture? Will I have to use something like fireworks to do this, or can this be done in Flash itself? I just need a starting point. If any of you know where I can get this info I would be so appreciative.
Frame Starting Point
Hello,
Ive built a site with flash mx nav, is it possible to have the flash movie start from differnt frames on different pages? The problem being an image is displayed on click but when th new page is loaded the flash file returns to the start.
many thanks
todd
Random Starting Point
Is there a way to make a listing of 10 different phrases that appear as an introduction on a page to randomly start with a different phrase every time someone comes to the page and then just run through the rest?
Flash Starting From Some Point When Url Is Www......
hello, i´m trying to put a flash menu inside a html page. for now i could do this, but it was wrong and didn´t work with some browsers such as firefox first i´ve done this in flash:
and that in the html page:
<script type="text/javascript">
var so = new SWFObject("flash/menu2.swf", "menu", "100", "475", "9", "#FFFFFF");
so.addVariable("flashvars", value="url=clientes");
so.write("flashcontent");
</script>
<script type="text/javascript">
var so = new SWFObject("flash/menu2.swf", "menu", "100", "475", "9", "#FFFFFF");
so.addVariable("flashvars", value="url=home");
so.write("flashcontent");
</script>
<script type="text/javascript">
var so = new SWFObject("flash/menu2.swf", "menu", "100", "475", "9", "#FFFFFF");
so.addVariable("flashvars", value="url=contacto");
so.write("flashcontent");
</script>
and like that for the other ones.....
but it din´t work perfect in firefox( every time you open the "home" and "servicios" it woked well, but for the others it use open the same menu for "servicios") i don´t know why!!! it work perfect at safari and internet explorer!!
so some one post me a web to teach me, as i´m new to flash, i could not understand very well and i´ve tried this for the flash instead:
// AS3
var url:TextField = new TextField();
url.text = root.loaderInfo.parameters.clientes;
gotoAndPlay(30);
// AS3
var url:TextField = new TextField();
url.text = root.loaderInfo.parameters.sevicios;
gotoAndPlay(20);
// AS3
var url:TextField = new TextField();
url.text = root.loaderInfo.parameters.home;
gotoAndPlay(10);
// AS3
var url:TextField = new TextField();
url.text = root.loaderInfo.parameters.acercade;
gotoAndPlay(40);
// AS3
var url:TextField = new TextField();
url.text = root.loaderInfo.parameters.contacto;
gotoAndPlay(50);
and for the html the same.....
is that correct? because it doesn´t work for me...
to be clear i just need to open a "menu2.swf" related in what page i´m ex. if i´m at ww.xxxxxxxxxx.com/clientes.html, i needed flash to start a "menu2.swf" from frame 30 and playing
thank very much, if someone could help out i would be very happy!!
Set Starting Point For X Y Position
I've never used a program as frustrating as Flash CS4. How can I change the location of the X and Y starting point? I have some that are bottom left, some are near the center, others top left. It's very annoying.
Novice Starting Point
Two questions - first, can anybody recommend a good NOVICE PRIMER on Actionscript. I don't expect to become an Actionscript genius but want to be resonably versed in it so I can work with various Flash components such as drop down menus, accordian menus, slide show controls and slide show navigation. My partially completed website is www.blueorbimages.com - a place for my photography and that of a friend. My specific task right now is to improve the navigation within each gallery.
Second question - is is possible to use Actionscript in a button instance to control layers on a web page? I have one page with 3 layers, each containing a swf and want to be able to click on a button with the name of a specific swf to show that layer and hide the other two. I've done this using DW 8 and behaviors but would like to do it in Flash with Actionscript so I can do some other things in the process.
Any feedback will be much appreicated.
Starting Point Of A Movieclip
Got an interesting problem; it may not be solvable with existing tools.
A coworker wants a 'scrub bar' for her flash animation, so that users can scan back and forth through it at their will, recap what confuses them, rewind, play, fast-forward, etc. I've seen this done in a couple places online, but when I investigate, I find that the movie that's being scrubbed is all on the timeline, and doesn't use any clips. My coworker's animation does use clips, and is far too massive to break each of them into its component frames to embed directly.
So, my question is this: is there a way to tell at what timeline frame a given clip is instantiated? I figure that if I know that, and I know how long the clip is, I can calculate what frame the clip should be in if the timeline is at a certain frame. This should allow me to figure out recursively what frame every clip currently instantiated should be at, and so allow me to calculate the entire state of the animation knowing only the current frame of _root.
Many Thanks,
Bob Robertson
Carousel Starting Point
Hey I love this site,it's really helped me understand flash a lot better.
I was modifying the carousel that's shown in the tutorial. I have a rather large list of items in the carousel, I just want it to start at a random point each time the swf is loaded. The code I used is pretty much the same as from the tutorial. Any help would be great, thanks!
[MX] Starting Point For Scrollbar Component
Hey all,
I've been working on a sort of Shoutbox using PHP and Mysql.
It's done now, but what I would like to do is make the scrollbar start at the bottom, and not at the top.
I've tried messing with the scrollbar component, and I can make the scrollbar appear at the bottom, but the big problem is that the text field that goes with it does NOT scroll down.
So atext of 10 lines, 5 lines visible in the field shows the upper five lines of text, even when the scrollbar is down.
Is there a way to alter the code so that it starts at the bottom instead of at the top?
If not, I guess I'll have to make my own scrollbar.....
Thnx for the help,
Return The Mc To Its Original Starting Point
Hi i found the top part of this script and it works very well.
I tried to add the bottom if statement to return the mc to its original starting point. It dosnt work..
Any suggestions.
thanks
onClipEvent (load) {
var distance = 500;
var d = 0;
}
onClipEvent (enterFrame) {
if (d<distance) {
this._y -= 1;
d++;
if (d>distance) {
this._y = 0;
}
}
}
A Good Starting Point For A Noob?
Hello all,
I have just purchased a copy of Flash MX. I have no clue what it takes to produce an animated anything. I really would like to learn flash instead of having to try and use Flash Typer, when it gets back up and running. I have learned Dreamweaver on my own, and think it is the greatest thing since canned beer! I would love to be able to make sites that include flashy animated flying text, that would bo too kewl.
My question is, where can I find tutorials that I can prnt off and follow along in the program, or a book that wont break my budget that offers great help?
(I have trouble clicking back and forth between the online tutorials and flashMX)
thanks in advance for your time and effort!!!!!
Tony Cultice aka countryman
Random Constrained Starting Point
ok guys i need some help here.
Below is the pattern of the stage. i need to animate 10 stars starting from anywhere within a constrained area on Z to anywhere on X. i can animate the stars randomly from Z to X but how do i constrain the starting point for Z. anyone?
--------------------------- X
000 000 000|0000/0000/000
0000 000 00|000/0000/0000
00000 000 0|00/0000/00000
--------------------------- Z
|--------------|
constrained area for starting point on Z
thanks.
damian
[F8] How To Create A Random Starting Point?
I have several move clips that I have set up in one flash file so when the first clip is done it goes into the second one. However, I want it to randomly start at the beginning of any one of my clips, meaning that it starts at frame 300 and next time refreshed/loaded it starts as 850 and next time 1? Does that make sense? Any input would be great!!
Drag From Starting Point And Grow
Basically I need to have an arrow(mc) start from a specific point and when you drag a slider to the right the arrow grows from the origin of the slider to where you let go of the slider. It should grow in proportion to the dragging. I tried doing it with _xscale, but didn't get the desired effect. Any thoughts?
JSFL / Commands Starting Point
Maybe I just such at searching. Can anyone tell me where I should start for researching the following.
I want to create a "command" (JSFL i think) that has a stored AS in it so when I run the command it will type the AS in the AS panel.
Any cool links or such
Drag From Starting Point And Grow
Basically I need to have an arrow(mc) start from a specific point and when you drag a slider to the right the arrow grows from the origin of the slider to where you let go of the slider. It should grow in proportion to the dragging. I tried doing it with _xscale, but didn't get the desired effect. Any thoughts?
Starting Point Of Large Project
Howdy;
I'm not completely new to flash, but I have recently been assigned to a project I'm going to need some outside opinions on.
What it is is a standalone application, to do with the company I work for (we do embroidery, screen printing, wide format prints, web development and promotional products). It is to contain a whack of video, images, audio, basically outlining who we are and what we do. This is to be displayed on a 42" plasma tv in our board room. I've scoured google, flashkit, and various other spots for answers, but haven't really found anything concrete.
I found out the ratio of a widescreen application, but beyond that, I'm just not sure where to start. I've designed the main navigation in photoshop. I just don't know how big to make the flash file.
Any thoughts, links, help is greatly appreciated.
Setting The Starting Point Of A Sliding Menubar
hi everyone>
i'm building a site with a horizontal sliding menu not unlike the one shown in the "add thumbnails" tutorial. the one that i'm building involves a row of generated movieclips to be placed inside a parent called "displayarea", and "displayarea" needs to line up starting at a point in the middle (for now, it's hard-coded as the negative _x value of a generated movieclip called "menu15" --see below).
my problem is: the way it's displayed using the code below, when the user mouses out of the area that activates the scrolling, the movie clip "displayarea" always snaps back to the original _x position.
how can i set the starting _x position of "displayarea", and tell the code to only use it as a starting point, and the scrolling will take over once the clip has loaded?
i've attached the swf so you can have a look at the problem.
<--this code is attached to the first frame of the timeline that contains "displayarea"-->
alignPoint = getProperty(displayarea.menu15, _x);
reelPos = displayarea._x;
displayarea._x = -alignPoint;
if (_ymouse>-150) {
if (_ymouse<0) {
if (_xmouse<-400) {
if (displayarea.hitTest (hitLeft)) {
reelSpeed = (_xmouse-center)/15;
reelPos = Math.round (reelPos-reelSpeed);
displayarea._x = reelPos;
}
}
else if (_xmouse>400) {
if (displayarea.hitTest (hitRight)) {
reelSpeed = (_xmouse-center)/15;
reelPos = Math.round (reelPos-reelSpeed);
displayarea._x = reelPos;
}
}
}
}
<--end code-->
thanks in advance for your help!
Tween Class - How Do You Change The Starting Point
hi,
this might be an easy question but i have not found the answer.
i want a MC to move vertically upwards and then stop. i have the code below but this tweens downwards. i tried changing the -30 value but it doesn't seem to change the starting point. any tips please??
import mx.transitions.Tween; import mx.transitions.easing.*; var xPosT:Tween = new Tween(kText, "_y", Bounce.easeOut, -30, 56, 3, true);}; xPosT.onMotionFinished = function() {};
Carousel Question: Alternative Starting Point
Hi all,
First post and I'm actually a bit sorry to say it's about the darn carousel
There's a ton of posts here that got me rockin' already but there's one thing I couldn't find in here or figure out myself.
Here's the deal:
I've set up a carousel holding 7 items. Now when I publish out it renders the carousel nicely. The thing I want it to do is make it start with the first item (eg 'Home' or whatever) "zoomed in".
Then when you click the icon the carousel appears like it normally would.
I'm I real noob concerning AS so any help would be greatly appreciated.
Fritsie
Preloader Starting At 82% And Another Preloader Not Working
i have two new problems now , my global preloader is starting at 82% , i do imagine why but not sure, i suposse that all my MC are been loaded at 1st frame althouth my movie starts at 5th frame in scene 2 ... is there any way to tell MCs to load at 5th frame ?
and another preloader working when i use Crtl+enter But not working at the web when i upload it into internet, here is the code of the preloader (the second one)Code:
function fotografia(numero, texto) {
_root.MCInstalaciones.ventanita.fotoin.createEmptyMovieClip('holder', 1);
//load the external movie into the new movieclip
_root.MCInstalaciones.ventanita.fotoin.holder.loadMovie('imagenes/'+numero+'.jpg');
_root.MCInstalaciones.ventanita.notainsta.textodefoto.text = texto;
};
//check the download status of the external
//movie once every frame
_root.MCInstalaciones.ventanita.fotoin.onEnterFrame = function() {
//trace the porcentajeage of the movie that has loaded
porcentaje = (_root.MCInstalaciones.ventanita.fotoin.holder.getBytesLoaded()/_root.MCInstalaciones.ventanita.fotoin.holder.getBytesTotal())*100;
if (!isNan(porcentaje)) {
_root.MCInstalaciones.ventanita.porcent.text = porcentaje;
} else {
_root.MCInstalaciones.ventanita.porcent.text = porcentaje;
}
if (porcentaje == 100) {
delete _root.MCInstalaciones.ventanita.fotoin.onEnterFrame;
}
}; this code is called when mouse moves over and now that i write this i am getting an idea why is not working......maybe this code only executes once , a single time, due to that is called from a mouseover event? if so why does it work when i do crtl+enter
could that be the cause?
Here is the link to my temporarely work where preloaders fail to do their job http://sultanos.shinranet.com/pupito.html
second preloader is to load images at INSTALACIONES link
Preloader Starting At 40%
I am using the PreLoader component in my movie which is about 400Kb and I'm having real problems with it waiting until 40% when it appears.
I know the problem is related to linkage but what are my options? Most of the stuff in my flash movie is dynamically placed on the stage rather than being manually placed.
If I put my preloader on frame 1 and then all the assets except the audio on frame 2, would this help? The trouble is that the only stuff that has its linkage set to export in first frame is the audio.
I really need to have the preloader appear immediately.
What are my options?
thanks in advance,
Chris
Preloader Starting At 70% Why?
Hi !
My preloader starts at 70% everytime I access my web site.Why is it happening?
I have two preloaders...The first one for the main movie and the second one for the sound.swf file.
The problem is on the first preloader ,the one for the main movie.
Preloader Starting 20k Late
My preloader bar doesnt even show up until it is already 20k loaded.. why isnt it starting at 0? Heres my script:
loadedbytes=getBytesLoaded();
totalbytes=getBytesTotal();
loadedkbytes=Math.ceil (loadedbytes/1000);
totalkbytes=Math.ceil(totalbytes/1000);
if (loadedbytes == totalbytes) {
nextScene ();
}
frame = int(loadedbytes/(totalbytes/100));
tellTarget (_root.loader) {
gotoAndStop (_root.frame);
}
I copied that straight from a flashkit tut, and it works fine except mines starting 20k late and leaving a big empty black screen while the first 20k loads, which looks very bad.
Anyideas???
Preloader Starting At 40% Urgent
i am using the PreLoader component in my movie which is about 400Kb and I'm having real problems with it waiting until 40% when it appears.
I know the problem is related to linkage but what are my options? Most of the stuff in my flash movie is dynamically placed on the stage rather than being manually placed.
If I put my preloader on frame 1 and then all the assets except the audio on frame 2, would this help? The trouble is that the only stuff that has its linkage set to export in first frame is the audio.
I really need to have the preloader appear immediately.
What are my options?
Preloader Assistance - Starting At 7%
Ok I have built a preloader which works fine but the only thing is when testing it starts off at 7% instead of 0. Probably something stupid for whatever reason, but I am out of ideas.
Issue With Preloader Starting At 15%. Why?
Hi everyone:
I'm about to tear my hair out trying to solve it. Here's a test example of my original FLA project that is supposed to incorporate a preloader. Somehow my preloader doesn't start from 0%. Can someone tell me why?
I'm attaching a FLA project to show what I mean. To see it open the TestPreLoader.fla file in the Adobe Flash CS3 and test it by hitting Ctrl+Enter, then click Ctrl+Enter again, or "Simulate Download" at 56K and see what I mean.
Preloader Starting Problem
I have a flash file with a preloader in it, and his is what happens:
first it's just grey (the background color), and then suddenly the preloader 'page' pops up (when it's at 50%). (its a 1.2 MB file)
So it loads up half, and then shows the preloader, but I want the preloader to be seen from the very beginning of 'loafing', not start at 50%...
Anybody have any info on why it's like this???
This is very disturbing...
Preloader Starting After 49% .. Any Solution
hi all,
very basic question, but i was having no luck to find any suitable answer. I have a movie, who's first frame is 350Kb, and thats the problem, bcz of some classes that r exported in first frame, and i have a list box that is loading some song titles from the xml file. But i came to know through many threads that if u have few KBs in first frame then the preloader starts fine.
I tried to export the classes in second frame and the loader shows after 13% but then it stucks there and just start again at after 49%.
I applied the solution i.e i shift all frames one step forward so that first frame of all layers become empty, now preloader should start up smoothely BUT its doing the same thing.
Is there any other solution to have a smooth preloader, even if u have some components on first frame.
Preloader Shows Starting At About 50%
Hi,
I followed the tutorial preloader with % bar.
the preloader bar appears when about 50% of the file has been loaded, and then increases up to 100%. How can I fix this?
when I simulate the loading process, the first frame is 8KB and exceeds the loading treshold (200B). Can anybody help me, pls?
thanks a lot
Alessandra
Preloader Starting Late.
I know this has been discussed a million times on the forums and I have been reading a ton about preloaders etc. But for some reason my preloader is loading late. It loads about 80% of the file and then appears.
My .fla and .as files are attached in the .zip on this message. I have some fonts that I am exporting on the first frame. That's the only thing I can think of that is causing a problem.
Anyone have any advice? Thanks!
Preloader Starting Late
i've tried several different preloader versions. im useing flash 8 but publishing & exporting in flash 6 the prob is my preloader which is for 6 wont start till about 82% then runs normaly. i didnt think this is a code issue but more so a publish settings issue. i can provide more info if asked.
thanks
bbb
Preloader Starting At 40% Urgent
I am using the PreLoader component in my movie which is about 400Kb and I'm having real problems with it waiting until 40% when it appears.
I know the problem is related to linkage but what are my options? Most of the stuff in my flash movie is dynamically placed on the stage rather than being manually placed.
If I put my preloader on frame 1 and then all the assets except the audio on frame 2, would this help? The trouble is that the only stuff that has its linkage set to export in first frame is the audio.
I really need to have the preloader appear immediately.
What are my options?
thanks in advance,
Chris
Flash Background Appears White Before Starting The Preloader
Hello
well I have this flash anim with a preloader. I have a green background for my flash anim. It is also incorporated in HTML on a black table. When you first open the html page, you see a white rectangle before the preloader starts. I think it is very ugly on my design, is there any way to fix that? I know it is flash that is reading the animation and that just didn't get enough time to read the preloader yet. But there must be a solution to at least change the white to black for instance?
thks a lot
rania
Preloader That Loads Both The Animation And Sound File Before Starting The Movie
I've made an animation swf file with a preloader.
The animation loads another swf file when it is triggered to start. That swf file is the music that runs in the background.
How can I make a preloader that loads both the animation file and the sound file before displaying the start animation button?
The movie im working with is here: http://home.c2i.net/dhl/oestmoe.swf
And the sound file that should run in the backround is here:
http://home.c2i.net/dhl/loop.swf
DassMario
Help Need Preloader That Plays Animation Fully Before Starting Main Movie
Hello, I'm in need of a preloader, (or easy tutorial on how to create one), that will run a progress bar and also play a short welcome animation all the way through... regardless of connection speed. One that checks total frames of mc against total bytes loaded or something.
I am SO not a coder, mainly design... so EASY is key. :]
I really appreciate any help you can give me. [desperate!]
Mx04: PRELOADER: BUT-only Preloading To A Certain Point/label
Hi, I know that there are millions of questions on here about preloaders but heres one i can't seem to find an answer to. Firstly i don't know much abut prelaoding but don't worry i'll figure that out myself what i would like to know is this:
Q:Is there a way in which i can preload my movie up to a certain label or frame No? Then use seperate preloaders to load in mc's on my main timeline as each one is 'clicked on'
All i seem to find are preloaders that do this; gettotal bytes = totalbytes loaded type thing when i really need something (if its possible) like;
preload up to mc "01 kitchen" then play
or
preload up to frame (4) then play.
My idea is I can preload the intro page, then when the user clicks onto a certain button they go into one of my mc's which i'm also going to preload. this way instead of preloading 2.5mb of site i can split it into severla preloading 'scenes'
Thanks in advance
Draw A Line From Any Point A To Any Point B Dynamically Through Actionscript
I am trying to make a file where there are several locations made on a map. If a person clicks on one location A and then another location B, there is a plane that flies from A to B and there are 2 text fields that get populated with the names of A and B destinations. This animation is scripted. I wanted to animate a dotted line from point A (from destination of the plane) to point B(to destination of the plane) through action script too so that there is a dotted line following the plane animation.
Thanks
Aneesha
[CS3] Find Highest Point And Farthest Point Of A Parabola
Hi Guys, I've been using for forum extensively over the past few weeks and have found almost everything I needed until now...
I'm moving a ball using something similar to the following code:
Code:
var spx:Number = 3;
var spy:Number = 7;
var g:Number = 0.1;
var bmove:Boolean = true;
onEnterFrame = function() {
if (bmove) {
move_ball();
}
stop_ball();
}
function stop_ball() {
if (ball._y > 350) {
bmove = false;
}
}
function move_ball() {
spy = spy-g;
ball._x += spx;
ball._y -= spy-g;
}
Is there a way to find the maximum height and farthest point of the parabola it describes? I want to display a path guide using curveTo which shows the route of the ball.
Thanks.
Moving Object From Point A To Point B - Mathematical Problem
Hi,
I have mathematical problem.
I want to move object from point A to point B but not just X or Y aixis. For example point A(0,0) and point B(500,500).
Please if somebody can send me generic equation to put in ON_ENTER_FRAME event so on each frame object is a little bit closer to point B.
Thanks,
Find Highest Point And Farthest Point Of A Parabola
Hi Guys, I've been using for forum extensively over the past few weeks and have found almost everything I needed until now...
I'm moving a ball using something similar to the following code:
Code:
var spx:Number = 3;
var spy:Number = 7;
var g:Number = 0.1;
var bmove:Boolean = true;
onEnterFrame = function() {
if (bmove) {
move_ball();
}
stop_ball();
}
function stop_ball() {
if (ball._y > 350) {
bmove = false;
}
}
function move_ball() {
spy = spy-g;
ball._x += spx;
ball._y -= spy-g;
}
Is there a way to find the maximum height and farthest point of the parabola it describes? I want to display a path guide using curveTo which shows the route of the ball.
Thanks.
|