Circle Preloader...
Hello there,
Does anyone knows how to make a circle preloader like the one on Macromedia web page?
Thanks
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 04-28-2003, 08:54 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Circle Preloader
Hi,
how should i code a preloader that show values in a circle. It's like a part of a circle that's growing as the getBytesLoaded are growing, untill there's a full circle.
do I make myself clear?
thankx in advance
Genius
Circle Preloader?
I'm not sure if this is the correct forum for this question, but here it is anyway.
I need to make this kind of circle preloader (see attached). Coding the loader is no problem, but I'm not sure how to approach the circle part.
My first thought was just use a shape tween as a mask to reveal the white circle... It didn't' work very well.
Now I'm thinking of doing it with code.... Problem is Friday and my brain doesn't work.
Does anyone have any tips or tricks for achieving this effect.
My slacker brain thanks you.
[AS] Circle Preloader
I want to do a preloader like the below one. Wonder how they did it.
http://www.24-7media.de/wl/
Circle (Shockwave?) Preloader
The only place that I've seen this lately is on purevolume - click on a band and watch the music player. You'll have to be quick if you want to see the loader inless you have a slow connection.
I saved a screenshot of it:
I seem to remember this being used a lot with shockwave, am I wrong?
I know how I could do it - two images, one faded and one that isn't, then mask the one that isn't and animate the mask.
Is this the best way to do it? Could I do it in actionscript? And also what is the best way to create the little squares and rotate them uniformly. I always find it very tedious doing it in Photoshop since when you copy the square the point of rotation is in the center of the square again, rather than in the center of the circle (if you know what I mean).
I know that this is easy, it's just that I want to get the simple stuff right. All I want to know is how other people are doing it.
Also, when I create something like this how can I make it so that I can use it in all my flash work. Would I turn it into a component? I just want to be able to drag it in easily.
Thank you,
Peter
Circle Preloader Having Trouble
I am having troublr creating a preloader with the bar as a cirlce umm I am not a genisu when it comes to actionscript so I am relying on flash 8 book and tutorials and its not working is there a tutorial that someone may know of to help me?
Circle Loading Preloader
Hey I does anyone know where I can find a tutorial on how to make a circle preloader bar for a preloader?
Thanks,
Puig
Missing Something Simple In This Circle Preloader
I'm trying to get this tutorial on a "circular preloader" from blog.log2e to work.
I'm missing a parenthesis at
Code:
color:uint = 0×0000FF
in the public function SpinningPreloader.
Flash error: expecting right paren before 0000
I can't seem to nail it. Any Ideas?
Thank you
D
Code:
package
{
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.events.TimerEvent;
import flash.utils.Timer;
import gs.TweenLite;
public class SpinningPreloader extends Sprite
{
private var _target:DisplayObjectContainer;
private var _container:Sprite;
private var _centerX:uint;
private var _centerY:uint;
private var _radius:uint;
private var _steps:uint;
private var _rectWidth:uint;
private var _rectHeight:uint;
private var _color:uint;
private var _count:uint;
private var _timer:Timer;
private var _timerInterval:uint;
private var _fadeOutDuration:Number;
public function SpinningPreloader (target:DisplayObjectContainer,
centerX:uint = 0,
centerY:uint = 0,
radius:uint = 15,
steps:uint = 24,
rectWidth:uint = 4,
rectHeight:uint = 2,
color:uint = 0×0000FF,
timerInterval:uint = 20,
fadeOutDuration:Number = 1.5 )
{
_target = target;
_centerX = centerX;
_centerY = centerY;
_radius = radius;
_steps = steps;
_rectWidth = rectWidth;
_rectHeight = rectHeight;
_color = color;
_timerInterval = timerInterval;
_fadeOutDuration = fadeOutDuration;
}
public function start():void
{
_container = new Sprite();
_container.x = _centerX;
_container.y = _centerY;
_target.addChild(_container);
_count = 0;
_timer = new Timer(_timerInterval, 0);
_timer.addEventListener(TimerEvent.TIMER, drawRectangle);
_timer.start();
}
public function stop():void
{
if (_container)
{
TweenLite.to( _container, .5, { alpha:0, onComplete:onContainerFadeOutComplete } );
}
}
private function onContainerFadeOutComplete():void
{
_timer.stop();
_target.removeChild(_container);
}
private function onRectFadeOutComplete(rect:Sprite):void
{
_container.removeChild(rect);
}
private function drawRectangle(e:TimerEvent):void
{
var rot:Number = _count * 360 / _steps;
var rect:Sprite = filledRectangle(_rectWidth, _rectHeight, _color);
rect.x = _radius * Math.cos(rot * Math.PI/180);
rect.y = _radius * Math.sin(rot * Math.PI/180);
rect.rotation = rot;
_container.addChild(rect);
_count++;
TweenLite.to( rect, _fadeOutDuration, { alpha:0, onComplete:onRectFadeOutComplete, onCompleteParams:[rect] } );
e.updateAfterEvent();
if (_count == _steps)
{
_count = 0;
}
}
private function filledRectangle(width:uint, height:uint, color:uint):Sprite
{
var rect:Sprite = new Sprite();
rect.graphics.beginFill(color);
rect.graphics.drawRect(-width/2, -height/2, width, height);
rect.graphics.endFill();
return rect;
}
}
}
}
Flash Preloader That Looks Like A Circle Drawing Itself
Hi everyone - I'd like to make a simple preloader that looks like a stroked circle is being drawn - when the circle connects with itself, the loading is complete.
It sounds easy enough but I'm not sure how to mask off the circle. I tried using another circle as a mask and rotating it into place but it doesn't quite have the effect I want.
THanks for your help!
Circle Preloader Effect W/ SetInterval
I'm working on a modified version of the slideshow demo. I'd like to add a count down circle MC so the viewer knows the slide is changing soon. I found a thread in the forums that provides the code to create a growing pie-chart effect, but it's based on getBytesLoaded/getBytesTotal and bounces between two frames until the file is loaded.
I'm wondering if there's a way to substitute getBytesLoaded/getBytesTotal for setInterval and I could make the preloader an MC and put an instance of it on the stage vs. it being the first two frames of the movie.
Anyone care to join me in brainstorming? Free beer
API - Preloader - Circle Mask Going Round?
I'm working on a preloader which has a circular bar instead of the regular straight progress bar. I'm trying to draw the mask using flashs api rather than timeline it. I've got the circle drawing in fine and the size of the mask etc is perfect, but it just doesn't want to mask. does anyone have any ideas for suggestions!!???
ActionScript Code:
this.createEmptyMovieClip("preloaderMASK", 1);
var radius = 110;
var targetDegrees = 280;
var degrees= -100;
var speedV = 20;
lineStyle(25, 0xFF00FF, 100);
moveTo(273.5, 84.25);
preloadBAR.setMask(preloaderMASK);
preloaderMASK.onEnterFrame = function(){
if (degrees < targetDegrees) {
degrees = degrees + ((targetDegrees+0.1) - degrees) / speedV
}
if (degrees > targetDegrees) {
degrees = degrees - (degrees - targetDegrees) / speedV
}
radians = degrees * (Math.PI/180);
follower_mc._x = centerPointMC._x + (radius * Math.cos(radians));
follower_mc._y = centerPointMC._y + (radius * Math.sin(radians));
follower_mc._rotation = degrees + 100
lineTo(follower_mc._x, follower_mc._y);
endFill();
}
stop();
Circle Preloader + Movieclip Loader Class = ?
I am trying to make a circle preloader, so i need to convert it to be frame based. Can one help me understand why this is not working?
Check it out: http://0-style.com/test/test.html
Zip with Fla: http://0-style.com/test.zip
Code:
function loadExtMov(movieName, targetMovie, transEnabled:Boolean) {
var mcListener:Object = new Object();
mcListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
status_txt.text = Math.round((bytesLoaded/bytesTotal)*100);
// Radius Preloader
frame = int(bytesLoaded/bytesTotal/100);
tellTarget (progress_mc) {
gotoAndStop(frame);
}
};
var image_mc:MovieClipLoader = new MovieClipLoader();
image_mc.addListener(mcListener);
image_mc.loadClip(movieName, targetMovie);
}
loadExtMov("1.jpg", container_mc);
Frame Independent Circle To Circle Detection
I am having trouble trying to get my head round this part of programming.
I know it is used for detection between movieclips such as snooker balls. I just cant get my head around it and it is driving me nuts!
Does anyone know of any good tutorials that I can use to solve this problem?
Thanks
The Toffee
Circle Collision Plus Direction Circle Should Go
I need help (or code) on how to figure out the direction a circle should go after it is hit by another circle. I know how to get the circles to know when they hace hit each other but i need to know how to find the angle at which the circle would bounce off at. Thanks to anyone who can help.
Moving A Circle Over Half A Circle
how do i move over the half circle
up and donw the circle line?
how do i move it to a certain point?
and how do i calculate it for example 5 point that will be in equal spaces between the circles?
thnaks in advance
peleg
Circle-circle Reactions, With A Twist..?
All right, I'm not as dumb as I sound -- no, really! But here's what's got me stumped:
I have a series of circles that gradually spin toward the center of the screen. The circles are randomly placed at the outer edge of the screen and randomly assigned a speed. Because the balls don't travel in a linear fashion, I'm having trouble figuring out how to adjust their movement. As the circles get closer to the center, they also get "spun" a certain amount -- they have a property called "theta" that gets appended with another property called "spin." Anyway...
I can detect when a collision is taking place: I'm just completely blank regarding how to make the circles react. I've searched a bunch of places, but nothing I've found is making any sense to me...and I'd like to think that I'm not brain-dead...
If anyone has any suggestions, I would LOVE to hear them! Thanks in advance!
Regards,
Blake
Moveable Circle Around Another Circle - No Overlap
Hey all. I have two MC's, circular in shape. One of the circles is stationary and you can drag the other. I'm trying to get the moveable circle to be able to move around the circumference of the stationary circle, but not overlap. I'm able to detect when they overlap, not using hittest. I just can't figure out how to code it so that the draggable circle can't be moved over the stationary circle. Any suggestions, comments, or help is greatly appreciated. Thx.
Drawing A Animated Circle, Dot To Circle
Can some one help me??
Im new in Flash, I want to make an animation of a circle, begining from a small dot and ending in a circle (like wen we draw in a paper), I allready tried everything I know (not a lot!!!! ) .
Is it possible to make this? I will trie to explain:
I want to make a animation of a small pencil drawing a circle from nothing. Begining with the pencil drawing a dot then that pencil will make the complete circle like wen we draw in a paper by hand.
Sorry my English is not very good.
Please Help!
Arcanjo
Circle-Circle Detection
I need some serious circle to circle collision detection. I used one from jobe makar, but I don't think it works for circles that are'nt both moving. Some of the variables are 0, so when it divides by them, it returns NaN. Anybody know any collision detection scripts? <--Sorry, I just wanted to put that in there
Circle Vs. Circle Ricochet.
I'm working on a game that involves circle vs. circle collision detection (More specifically moving circle vs. static point). I am able to project the circle out of the point but I have no Idea how the change the velocity of the circle so that it is physically accurate.
I whipped up a quick thing to Isolate the circle vs. point collision here.
Here's the script:
Code:
var GRAV:Number = .22;
var RADIUS:Number = ball.width/2;
var vx:Number = 0;
var vy:Number = 0;
var dx:Number = 0;
var dy:Number = 0;
stage.addEventListener(Event.ENTER_FRAME, enterFrame);
function enterFrame(Evnt:Event):void {
ball.x += vx;
ball.y += vy;
vy += GRAV;
dx = ball.x - dot.x;
dy = ball.y - dot.y;
if (Math.sqrt(dx*dx+dy*dy)<RADIUS) {
ball.x = dot.x+dx*RADIUS/Math.sqrt(dx*dx+dy*dy);
ball.y = dot.y+dy*RADIUS/Math.sqrt(dx*dx+dy*dy);
// I have no Idea what to put here to simulate ricochet
}
}
If anybody could tell me how I would manipulate the vx and vy variables that would be grand.
Circle
I'm having difficulty making an object (circle) go around a guide layer (also a circle). My circle only goes half way. Is there a way to place the circle at a starting point and have it go all the way around the guide layer and finish at the starting point? I've been able to do essentially creating a duplicate guide layer and a duplicate object and having the object complete the movement of the other half of the circle.
I've seen it done so I know it can be done. Thanks in advance.
Arc And Circle
Hi people. Well here is my question:
I have a big circle which is always a constant size. Now my navigation is dynamic and the amount of small circles on this big circle's arc has to be devided evenly on this arc of the big circle, now what I am trying to do is see ho many menu items I have, work out the angle between them to space them evenly on the big circle....
I'm totally confused in how to approach this. The thing is I have all the functionality for the duplication, all I need is a function to work out the plotting of the small circles on the big circles' arc...
Thanx in advance
Circle..?
emm..could someone tell me..how to write an actionscript..that draws a circle in real time...slowly..or...how to make such animation..or whatever..tnx
What Is The Circle In A MC?
I noticed that MC has + sign (crossed hair) which is the registration point of the movie clip. This is where (0,0) of the object. I also noticed a circle that sometimes it's inside but sometimes it's outside of my movieclip. What is that for?
TIA,
Circle Instead Of Bar
how can i create of a circular preloader, it is just like a normal bar that fills up when loading but instead make it circular
Circle Tween
How do i make a dot on the screen into like a circle. Like... use a tween to start with a point of something similar then go around and extend into a circle. Anyone understand? Basically, it starts out with a point then it goes around and makes a circle.
Rotating 3d Circle
How do i rotate a circle and give the affect that it is 3d, with an image on the 3d circle.
like the 3d circle at matinee.co.uk
Circle's Equation....
Hi
Can somebody tell me what is the equation for the "circle" in maths?
as i am trying to do something in AS to assign the MC to move in a circle...
Thanks in advance...
MKit de HK
Tweening A Circle
Im tired so give me a break on this one, but I want to TWEEN a circle STROKE ONLY! No fill, I want it to tween the outline around the circle. --You know, like start with nothing then start going around with some color to make a complete circle
For the life of me I cannot think of how to do this. I though of making 4 level with four straight lines that cover up the circle and tweening them in order...but is there a better way?
Am I missing something easy?
thanks! tv
[Edited by TVance.Net on 01-30-2002 at 01:51 AM]
Cutting In A Circle? Help
Listen I have pictures that I want to be perfectly round in Flash and cant for the life of me find out how to cut these out!
When I import into Flash it comes in like a square or rectangle or whatever and I break it up, and I want the very center (they are pics of people) in a Circle to be the only thing left...
Someone help..please?!?
Spinning Circle
I have a circle that is filled. I now need this circle to spin on the screen. I will have another layer on the circle that will have some text on it, but I don't want the text to move. How would I go about getting the circle to spin in place? (I tried doing the rotate thing, but that is not the effect I'm looking for - it actually moves the circle as it does the rotate...) I have to have the circle stay in the same spot all the time while spinning.
Thanks,
Kathi
Circle - How To Animate?
Hey~
Thank you for taking time to look in to this post.
I have a problem (probably quite a minor one) but am clueless as how to solve it.
I want to animate a circle being drawn through scripting.
Is it possible? If so, how?
If it can't be done, is the only way to do it through drawing a frame by frame progression of it?
Once again, Thank you~
Cheers~
The 4th Circle Hates Me
4th circle "contact" won't keep in line...what is wrong with my script?
you can see the swf here:
http://www.eight.nl/test/circletest.swf
my script is
Code:
onClipEvent (load) {
navigation = ["info", "divisies", "agenda", "contact"];
max = navigation.length;
i = 0;
function Circle() {
Radius = 200;
Speed = 3;
for (i=0; i<max; i++) {
_root.attachMovie("Box", "Box"+i, i);
var targ = _root["Box"+i];
targ.attachMovie(navigation[ i ], "mc"+navigation[ i ], 1);
targ.Rotate = i*(360/max);
targ.onEnterFrame = function() {
xpos = (targ._x - _xmouse);
if (xpos<=0) { this.Rotate +=Speed
} else {
this.Rotate -= Speed
}
this._x = 380+(Math.cos(this.Rotate*(Math.PI/180))*Radius);
this._y = 280+(Math.sin(this.Rotate*(Math.PI/180))*Radius);
};
}
}
Circle();
}
does anyone know what i'm doing wrong in my script?
(problems: contact doesnt keep in line, when mouse is held still the rotation jerks)
Circle To Square
i'm trying to change a circle to a square, but the shape tweening wouldn't work. any suggections?
Help Making A Circle...
Does anyone have a good code for howto draw a cirlce using moveto and curveto? In flash's explanation it has a code but its a square with rounded corners and isnt quite a cirlce. Thanks alot. I want it for http://phildman14.homeip.net/flashmx/paint/v1.swf
Fill My Circle :)
Every time you think you are well and truly past the newbie stage something comes along and brings you back to earth. In my case it's a malformed circle.
Picture if you will a circle (the bottoms been flattened a little) and then imagine filling the circle with a colour. Doesn't sound so hard does it? We're talking flash basics here. But, well, this particular circle of mine refuses to be filled with a colour. It's not grouped or anything, and the frame properties box suggests all is well (and filled). The shape was once part of a shape tween, but I copied a key frame (and removed any notions of tweening in the frame box) to arrive at my current situtation.
So what is my problem (in the very specific case )
Regards
Shan
Circle Percentage. How To Do This?
Hello,
I created a preloader which includes the variable "Percent". This variable gives the loaded percentage of the .swf file.
1) I have a circle inside a MC. I want the circle be a line, when Percent is 0, and to become a circle when Percent is 100.
Imagine a circle being 1/8 then 2/8, 3/8 and so on.
2) I also want a line to start as vertical and change its angle from vertical position to vertical position again, doing 360 degrees, while Percent goes from 0 to 100.
How to do this?
Thank You,
Miguel Moura
Circle Motion
I cant get my mc to move in a circle motion.
here is the as
onClipEvent (load) {
radius = 10;
degrees = 0;
}
onClipEvent (enterFrame) {
angle = degress*(Math.PI/180);
degrees += 2;
xposition = radius*Math.cos(angle);
yposition = radius*Math.sin(angle);
this._x = xposition+_root.cross._x+1;
this._y = yposition+_root.cross._y+1;
}
What is wrong with it.
cross is the center of the rotation. It is a mc called cross lol.
Masking And Circle
Ok first question. I am just learning flash and i am doing the lessons that come witht the program and they just had me creat a layer mask and that was it can someone breifly tell me what the point is of a layer mask? thanks.
Second question. I was just woundering if someone could tell me ohow to creat a circle or a square that dose not have a fill. i want to have a circle that is drawn with a dotted line but i can see through to the layer under it. Thanks Oh and while i am at it i might ask if there is an easy way to make stars?
How 2 Do Smart Circle?..can U Help Me?
..
" (english is not my mother languge) "
_______________________________________
hi all,,,
i want a code ( i hope .fla file ) to do the folowing:
circle, stopped , rotate clockwise while rotation speed from zero increase then increase then increase, until speed at highiest value "choose Any value u want and tell me how can i change it"
then speed dicrease, dicrease, dicrease until speed = 0 , then rotate counterClockWise in smae idea..
am I claer?! i hope that,
thanks a lot
nehaya
Drawing A Circle
This may seem simple to you guys, but I haven't used flash for ages...so I'm a little rusty.
Anyway, what I want to do is to make an animation where it looks like a circle is being drawn - like you would by hand. I've tried using a mask, but just can't get it to work.
I was wondering if I can do this using actionscript, I'd prefer to use actionscript.
Drawing A Circle
Hi
Using FlashMX. I want to make an animation where it looks like someone is drawing a circle. I know how to do this without actionscript, but I'd much prefer to use actionscript to do this. Please someone show me the light!
BTW I haven't used flash for a while, so I'm VERY rusty...
Dot - Circle - Trail
Can anyone help me!
I want to make a black dot follow the path of a circle and for the dot to leave a gradient trail behind it.... so by the time the dot has done a full rotation the trail is gone and ready to start the rotation again?
Is this even possible?
Circle To Square? Possible?
yeah im a crazy beginner and i wanna turn a circle into a sqaure. how the mother do i do that? i thank in advance whoever helps me. it is ten thousand times appreciated!
--crazy joolie
Rotating Circle
I have a cirlcle of buttons for the main page of a website I am creating. I want to have the whole circle rotate slowly at all times, except when the user mouse-overs one of the buttons. When the user does that I want the circle to stop rotating at that point. If the button is clicked it stays like that even with mouse-off. If the mouse is taken off without the button being clicked I want the circle to continue rotating.
The problem is that the movie clip containing the buttons continues to rotate when I mouse-over a button. Thanks in advance for the help.
Text In A Circle
Is there an easier way to make text take the shape of a circle without breaking it up and placing each letter?
Thanks
3D Circle Nav Menu
G'Day FK,
Looking for some source code to get me started on a menu that is similar to the Mac OS menu, but operates in a 3D perspective circle instead. Ive seen works similar in the past, but not quite sure where to find them now that I need them. Im searching FK now to no luck, if someone could point me in some direction Id appreciate it!
Geoff
|