Rapid Blink?
its kinda complicated to explain so i uploaded the fla
http://www.dx-p.com/shape4.fla
if you check menuitem7, it blinks rapidly. Why is this happening?
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-14-2001, 10:49 AM
View Complete Forum Thread with Replies
Sponsored Links:
Rapid Fire
Hi,
Im tryin to clone a movie clip (LibaryName: Bullets, Instance StageName:B1) to clone a new bullet and place it where the mouse is on the stage. In layer 1 frame 1 this is my code:
Code:
var i
_root.onMouseDown = function() {
i = 0
_root.B1.duplicateMovieClip(i = i + 1,1)
i._x = _xmouse
i._y = _ymouse
}
Why dosn't it work?
How do i make it work
Thx
P.S: CAn i duplicate movie clips straight from libary?
View Replies !
View Related
Rapid Fire
So I'm creating this game where I shot these bugs that fly across the screen.
My spacebar acts as the fire button, but, when I hold down on it, it starts to rapid fire.....I don't want that to happen.
:::::::::::::::::::::::::Here's my code::::::::::::::::::::::::::::::::::::
function shootBullet() {
// see whether there has been enough time to reload
if (getTimer()>nextBulletTime) {
// create bullet clip
numBullets++;
attachMovie("bullet", "bullet"+nextBullet, nextBullet+9999);
// set location
_root["bullet"+nextBullet]._x = bunsen._x+2;
_root["bullet"+nextBullet]._y = bunsen._y-55;
// add to array
bullets.push(nextBullet);
// get set for next bullet
nextBullet++;
nextBulletTime = getTimer()+400;
}
}
"""""""""""""""""""""And the code for the space Bar:::::::::::::::::::::
on (keyPress "<Space>") {
_root.shootBullet();
}
View Replies !
View Related
Rapid Line Movement...?
I dunno if this is the right section....but here it goes....
On This tutorial, how can I make those lines in the background move like they do ?
P.S I still havent found the guide to having a Flash Footer
View Replies !
View Related
Rapid Removal Of Mouse & Mc Sticking
I have code which works well, but it seems to stick if I move my mouse off the flash movie (which is embedded in a web page) too quick. I've seen this problem in numerous other flash movies, and am just wondering what I can do to fix the problem.
Regarding my specific example, a hit test returns true upon contact with the mouse cursor, but seems to remain true if the removal of the mouse cursor is too quick. Here's the code if it'll help:
code:
var dir = new Array();
_root.onEnterFrame = function() {
for (i=0; i<16; i++) {
dir[i] = "back";
if (_root["orange_mc"+i].hitTest(_root._xmouse, _root._ymouse)) {
dir[i] = "fwd";
} else {
dir[i] = "back";
}
if (dir[i] == "fwd") {
_root["orange_mc"+i].nextFrame();
}
else {
_root["orange_mc"+i].prevFrame();
}
}
Any help would be great.
TIA,
aaroneousmonk
View Replies !
View Related
Rapid Fire Weapon For Game
I know how to make a basic shoot em up game with the aimer and the people and all that but I want to make one with automatic weapons. So when I click down I need an animation (for the gun) to loop and I need it to keep doing damage as its shooting. Anyone kno of a tutoiral or anything to help me with this?
Moved it to http://flashkit.com/board/showthread...42#post3424642
View Replies !
View Related
I Got Rapid Fire To Work Come Look Guys
Hey guys ty to all who tried to help me with my code .. i figured it out i stared at the code all morning and i was trying to play around with quadratics to make the shots fire wierd .. and upon that i discovered the variable that controls the number of bullets .. And instead of using _root.onMouseDown i used onmousemove .. so much ezier to configure rapid fire. I got the idea down but i gotta play with the fps or the speed of the bullets cause collision is very low using rapid lol ..
_root.onEnterFrame = function() {
// move the defender with the mouse.
_root.defender._x = _root._xmouse;
_root.defender._y = 448;
// bullet move
var y = 0;
while (y<60) { (<< RAISED THAT .. it was at like 6 lol..)
eval("_root.bullet"+y)._y -= 30;
y++;
.. so i want to ty for trying to help me i almost gave up lol .. im sure ill get stuck again so ill be back ^^ ..
ne way if u want to see what i did check it here
http://img35.exs.cx/my.php?loc=img35...s222234999.swf
View Replies !
View Related
Rapid Loading Of External Images
Hey all,
I want to rapidly load an image over and over again. Basically it's from a security camera that has a web server running on it, and it stores the current image in a file called now.jpg. I can do this from AS2 fairly easily as I can just keep calling a loadMovie() on the image, replacing the old one. At one point, I had what looked like 15fps going with that. BUT, with AS3, I can't seem to get this going very fast at all. It takes at least a second to load each image. I am using the code attached to do this. It uses an interval to load, but could be done through other methods. I can run the video out of the security cam into a converter and bring it in USB with the Video() and Camera() classes, but that only gives me 640x480. The camera is actually able to generate 1280x1024 images, which is what I am loading with my AS2 code. So, any ideas as to rapidly load these images? The web server on the camera can display a live image by using javascript to keep loading the image. There must be a way to do it in AS3 if it can be done in AS2 and javascript.
- B
Attach Code
function loadImage(myPhoto) {
var photoLoader=new Loader ();
photoLoader.contentLoaderInfo.addEventListener(Event.INIT,photoListener);
var url = new URLRequest(myPhoto);
photoLoader.load(url);
}
//
function photoListener(e:Event):void {
var tempPhoto:BitmapData=Bitmap(e.target.content).bitmapData;
addChild(new Bitmap(tempPhoto));
}
setInterval(loadImage,50,"http://192.168.0.187/now.jpg")
View Replies !
View Related
Components Interfere With Rapid Clicking On Buttons
Hi guys, new here and for good reason.
I've been flash dev. for 3 years now and I'm having a problem i never saw before.
To simplify the situation, i've recreated the scenario:
i have combo boxes and other components on my stage.
i also have a generic input text field.
I then have a button.
I've created something that requires the user to press this button multiple times and sometimes even very fast.
However, once u click on the button, it does the action once and then after that the cursor randomly switches between the arrow cursor and hand cursor and the button doesnt work unless i press it a few times.
My button seems to be losing focus because of the combo boxes and text input field components.
for example, if i only have a textInput component and a button: i cant click the button fast and the textInput field on my stage constantly has the blinking line in the field meaning the textInput symbol has tocus, but if i remove the textInput and the comboboxes from the library, i can click the button on the stage as many times as i want a quickly.
anyone know how to prevent the combobox and textInput from taking focus away from my button?
If I've confused you, I apologize.
View Replies !
View Related
Rapid Image Transition Using Advanced Effects. Plse Help?
I know how to do this but not exactly. I want to create a rapid image transition from white to colour like in this movie http://www.templatemonster.com/scree...1600/1697.html . Please check out the way the image of the server fades from white to colour. I know to use motion tweening but I cant get it exactly right. Can anyone help, please?
View Replies !
View Related
Handling Next / Prev Rapid Successive Mouse Clicks
lets say i have a next / prev button, sprite or movie clip.
i then register a MOUSE.click listener / handler for the next / prev button that increments or decrements a counter var and then calls a function doLoad(counter) to load an img based on the counter.
is there any way to make the listener handler either:
1) determine which of the rapid click events received within a given rapid interval is all but the last click?
My goal is to allow the handler to increment the counter for EVERY click event received but ONLY execute doLoad() ONCE for the last click. Otherwise it fires doLoad for every click which isn't necessary for the loading scenario i'm trying to create.
OR
2) fire doLoad() for each mouse click event but kill doLoad if another mouse click is received within a given interval of the last click?
This semi achieves the same goal described above. It only allows the final doLoad() to run fully to completion. Prior clicks will trigger doLoad but they won't complete.
Basically what i'm asking in #2 is if there is a way to interrupt, kill and hopefully garbage collect a called function from the listener that calls the function. Make sense?
SUMMARY (More general way of looking at my question / goal)
How do people handle rapid fire next prev clicks?
Since every click is going to fire a function call each of which goes on the stack, each function call must finish to completion. What if you don't want all those next / prev function calls to pile up on the stack and only the last one to be executed? Of course, the required behavior should only occur when rapid clicks happen in succession and ONLY WHEN SERIALLY RECEIVED UNDER A PREDETERMINED GIVEN INTERVAL CONSTRAINT?
anybody?
i'm thinking this would be a requirement others have run into before
thanks
View Replies !
View Related
Blink Function
I am having a hard time writing a function for making an movie clip that blinks a graphic partly because I dont know how to handle the timer object. I've enclosed my code! Your help as always is appreciated..
onClipEvent(enterFrame){
//BLINK FUNCTION-->
blink = function(object){
//frequency of blink
var rate;
//current timer position
var count;
//time before blink-node change
var wait;
//number of blinks to run
var blinks;
//number of pods in a system of blinks
var pods;
//BLINK-SYSTEM-LOOP-->
rate = 25;
pods = 5;
//BLINK-POD-LOOP-->
do{
wait = (1/rate);
blinks = rate;
//BLINK-NODE-LOOP-->
do{
//blink-node-off
object._visible = false;
count = getTimer();
//blink-node-wait
foo = blinknode(count,rate,object);
--blinks;
} while((blinks>0));
//END NODE--------------->
--pods;
rate = rate - 5;
} while(rate>0);
//END POD--------------->
//END SYS--------------->
}
blinknode = function(count,rate,object){
var thiscount;
//when was this function ini
thiscount = getTimer();
//recursive function call
if ((thiscount-count) >= rate){
object._visible = true;
} else {
foo = blinknode(count,rate,object);
}
}
foo = blink(this);
}
View Replies !
View Related
Trying To Get Rid Of A Quick Blink...
Hello,
I made very small 1kb titles.. simple text and animation...
but when you click on the buttons on the menu, you can see the titles of each section do a quick blink of of what looks like black then white... how can I get rid of this? I put a temp link so you can see...
http://www.magicofjb.com/newsitetest...an2/index2.htm
Any help is appreciated!! thanks!
Allie1138@aol.com
View Replies !
View Related
Blink For The Love Of...
here's the scenario...
i have some points on the stage that are buttons. it's the same button, re-used from the library, but each button has a different release action attached. for example:
Code:
//point 1 looks like this
on (release) {
getURL("mypage.php?id=1");
}
//point 2 looks like this
on (release) {
getURL("mypage.php?id=2");
}
//etc...
obviously, when the page reloads do to the getURL command, the flash movie will reload as well. the last button clicked is stored in the address as the variable id. if id=3, i know the 3rd point was clicked, etc... i'm wanting the flash movie to represent that.
my idea is to have the points "blink". the best way i know to have this happen, is to place the button inside of a movie clip. on frame 2 of the movie clip would simply be a movie loop of the point "blinking". so i want a way to change that point to a "blinking" state based on what id is set to. if id=1, i want point 1 to blink. etc...
View Replies !
View Related
LoadMovie Blink
I have a flash movie that I'm using loadMovie with.
The _root movie is 640 x 480 pixels.
From the _root I load a swf into holder_mc (this swf is also 640 x 480 pixels and covers the whole _root movie).
I then load other movies into holder_mc , but when I do this, theres a brief second where the movie loaded in holder_mc disappears, I see the root movie, and then the new movie loads into holder_mc .
Is there a way to make my movie so that you don't see the _root when switching out movies in holder_mc with loadMovie?
View Replies !
View Related
Can Do? Blink Using RollOver?
Button Function Looks Good
MC Function Looks Good
Script Function Looks Good
But it is "NFG"
I am interested in why it doesn't work. Is it because of the rollOut/Over function isn't capable?
Comment or solution would be helpful
p.s. Watch out for the weather in the next 10 days!
Thank You
View Replies !
View Related
Keyframe Blink?
Okay, so I'm using Flash 8 and animating a bunch of vector shapes to expand and shrink and move across the stage. Each shape is within a movie so I can add the new blur effect, along with alpha. Most of them start with a zero alpha and then move up to a more visible point, before moving back to a zero alpha. And this is where i'm encountering a sudden change in the alpha that's about like a blink. Anyone know whats going on with this?
It'll be fine as it starts from the first keyframe, going from transparent to more visible, then when it hits the next keyframe where i set the next alpha level, it blinks and becomes much more solid before moving on to the next level of alpha on the next keyframe where it may or may not blink again.
I'm running an animation at 30fps and so i'll ease them in to a semi-transparent point, then move them and make them slightly more transparent over time, then back out.
This is just adding to a problem i already have with enlarging the evil thing and having it run properly.
Any help would be appreciated.
View Replies !
View Related
Blink Window?
Ive searched everywhere!!!
is there a way to make the window blink, to indicate new data has arrived or something from a minimized IE window???
I cant seem to find out anywhere
using maybe javascript or something???
View Replies !
View Related
Blink Window?
Ive searched everywhere!!!
is there a way to make the window blink, to indicate new data has arrived or something from a minimized IE window???
I cant seem to find out anywhere
using maybe javascript or something???
View Replies !
View Related
Making Something Blink On/off?
Seems like this is a simple thing to do but I'm asking anyway.
Say we want to create a blinking object to be used as needed, maybe an arrow to call attention to something on the screen.
What I created was a mc w/the text in F1 and nothing in F2. I then used a setInterval based function in each of the 2 frames to create a delay:Code:
/////// Pause Function ///////
function pausePlayback() {
play();
clearInterval(pauseHere);
}
pauseHere = setInterval(pausePlayback, 2000);
A good coder might notice right away that once this function is called, there will always be an uncleared interval, which will wreak havoc during playback. Can someone tell me a "right way" to pull this off?
Thanks as always.
Mitch
View Replies !
View Related
Cursor Blink
Does anybody know why is the cursor blinking when i mouse over "x, g, e" buttons here:
http://banner.conweb.es/swf/part1b.swf
It happens again after i click on "new" or on the ">" in the bottom right corner!!!
Please help me!
Thanks alot
View Replies !
View Related
Blink REAL Fast--
anyone knows how i can make something blink REAL fast? like 10 times a sec--- this is not made with keyframes i think so i must be scripted,, but how.
thanks a lot
dirty
View Replies !
View Related
Making Buttons Blink
I was wondering how to make a button blink on the over part. Here is what I did, which failed.
1. Created a new symbol-button.
2. Created new symbol-movie clip.
a. The movie clip has 2 frames, 1st frame is the button in one color and the 2nd frame is the button in another color. I then added a goto and play action to make it go back to frame 1. That way it went to from frame 1 to 2 then repeated over and over.
3. Back to the button. On the over section, I added the movie clip. Then I tested the movie and it doesn't work. What am I doing wrong and how can I make it work.
View Replies !
View Related
Make Clip Blink
Hi
Have a look at the attachment. Im trying to make the thumbnails blink on roll-over. Its been pissing me off for ages now
Maybe change the alpha of thumbnail to 30% then gradually to 100%.
How can I do this???
Thanx in advance
View Replies !
View Related
Blink With Dynamic Jpg Transitions?
Got stuck,
please look at http://www.xmoment.nl/flashTest/home.html
i got the images and text dynamic loaded, but i get a pesky blink between transitions.
Any ideas tips how to prevent this?
Part of my code
code:
function preload () {
var t = container.getBytesTotal (), l = container.getBytesLoaded ();
var tt = containerBG.getBytesTotal (), ll = containerBG.getBytesLoaded ();
if (t && l == t) { //wanna be sure container is loaded
//container._visible = true;
if (tt && ll == tt) { //be sure containerBG is loaded
//containerBG._visible = false;
clearInterval (myInterval);
gotoAndPlay (2); //both are loaded so go
}
// end if
}
//end if
}
//end preload
loadMovie (pathToPixs + "image" + bgPic + ".jpg", "containerBG");
loadMovie (pathToPixs + "image" + whichPic + ".jpg", "container");
myInterval = setInterval (preload, 5);
View Replies !
View Related
Blink Of White Between Scenes
I am new to this site (and flash) and have been reading a lot of the information on this site. It is great!!
I have a question... I am trying to set up a whole site in flash, because when I did it in html and flash, I was getting a blink of white while the page loaded. I even tried changing the background to black, but it still blinked to white first.
So, now I am trying to set it up in flash. I am setting it up with five different scenes, but when I uploaded to check I am still seeing the blink of white when it changed scenes. Because of the layout it looks really funny. Is there a way to get rid of this? Do I have to set it all up on the same timeline and jump back and forth? This could get really confusing.
I appreciate any suggestions.
Thanks!!
View Replies !
View Related
Getting The Insertion Point To Blink
Hi, I have a form and I would like the insertion point to automatically blink when the page loads. There is more than one field. I would like the insertion point to be blinking and the user can automatically start typing without having to click into the text field. Is this possible? Thanks
View Replies !
View Related
How To Get Rid Of The Blink Between Photo Transistion?
zie http://www.bldd.nl/flashproblems/photoSlideshow3.swf
i see a blink right after my animated mask is finished
Code:
stop();
var myMCL:MovieClipLoader = new MovieClipLoader();
var myMCL2:MovieClipLoader = new MovieClipLoader();
var maxNrOfPhotos:Number = 4;
var photoHolderTop:MovieClip;
var photoHolderBottom:MovieClip;
function startSlideShow() {
trace("halllo");
var nummer:Number = 1;
var nummer2:Number = nummer +1;
var myListener:Object = new Object();
myMCL.addListener(myListener);
//myMCL2.addListener(myListener);
myMCL.loadClip("photos/photo"+nummer2+".jpg", photoHolderTop);
myMCL2.loadClip("photos/photo"+nummer+".jpg", photoHolderBottom);
myListener.onLoadInit = function(photoHolderTop) {
trace("Nummer: "+nummer+" Nummer2: "+nummer2);
if (nummer< maxNrOfPhotos) {
nummer++;
} else {
nummer = 1;
}
if (nummer2<maxNrOfPhotos) {
nummer2 = nummer + 1;
} else {
nummer2 = 1;
}
photoHolderBottom._visible = true;
photoHolderTop._visible = true;
photoHolderTop.setMask(masker);
masker.gotoAndPlay("_start");
setTimeout(loadNext, 5500, nummer, nummer2);
};
}
startSlideShow();
function loadNext(nummer:Number, nummer2:Number) {
myMCL.loadClip("photos/photo"+nummer2+".jpg", photoHolderTop);
myMCL2.loadClip("photos/photo"+nummer+".jpg", photoHolderBottom);
photoHolderBottom._visible = true;
photoHolderTop._visible = true;
}
regards
View Replies !
View Related
Fixing Alpha Blink?
Hi all!
I was having some trouble with a loadMovie script that has two MC instances that it loads to. Basically, the script is setup to load random external swf files from an array. It fades the top instance (movietarget) to the one below it (movietarget2), and once it's alpha is at zero it copies the bottom instance to the top and loads a random new swf underneath it to start fading to all over again.
The problem is that I need this to look smooth, and when it's done fading the top image and it's ready to copy the new bottom one I just set it to change the alpha of the top instance to 100. It has a long white blink when it does this.
Do I need to setup a preloader for the swf I'm going to show? Any help is much appreciated!
-----------files----------------
http://web.ics.purdue.edu/~mwallac/ECO/Swap1.swf
pay no attention to the red text, I was just using that to test different variables
http://web.ics.purdue.edu/~mwallac/ECO/Swap1.fla
if you want to test it with the images (which are in swf form) just get this zip
http://web.ics.purdue.edu/~mwallac/ECO/images.zip
View Replies !
View Related
Blink With Dynamic Jpg Transitions
Got stuck,
please look at http://www.xmoment.nl/flashTest/home.html
i got the images and text dynamic loaded, but i get a pesky blink between transitions.
Any ideas tips how to prevent this?
Part of my code
ActionScript Code:
function preload () {
var t = container.getBytesTotal (), l = container.getBytesLoaded ();
var tt = containerBG.getBytesTotal (), ll = containerBG.getBytesLoaded ();
if (t && l == t) { //wanna be sure container is loaded
//container._visible = true;
if (tt && ll == tt) { //be sure containerBG is loaded
//containerBG._visible = false;
clearInterval (myInterval);
gotoAndPlay (2); //both are loaded so go
}
// end if
}
//end if
}
//end preload
loadMovie (pathToPixs + "image" + bgPic + ".jpg", "containerBG");
loadMovie (pathToPixs + "image" + whichPic + ".jpg", "container");
myInterval = setInterval (preload, 5);
View Replies !
View Related
Blink Document Problem
I 'm created the popup menu and saved it. Later, I opened it and I saw the blink document although I saw the popupmenu in the librarty. Is it ok dragging the popupmenu to the document every time? I tested the movie but it's blink. What happen?
here
View Replies !
View Related
Blink On My Test Site
On my test website, where I show my work, there is a blink before the first item slides in. I didn't write the code, so was wondering if someone could figure out what is wrong. The site is at: http://www.gulladesign.com/homepage09.html If you select the planet magnet on the bulletin board you will know what I mean. The code is:
onClipEvent ( enterFrame ) {
id= _parent.StartId;
ExampleStart= _parent.ExampleStart;
AnimationSpeed= _parent.AnimationSpeed;
MovieCenter= 198.5;
posStart= this._x;
posDestination= ( this["example_"+id]._x * -1 ) + MovieCenter;
/*** DETERMINE ANIMATION SPEED ***/
speed = ( posDestination - posStart ) / AnimationSpeed;
/*** ANIMATE APPROPRIATE COMPONENTS ***/
this._x= this._x + speed;
for ( var i = 1; i < 11; i++ ) {
scale = Math.abs ( ( ExampleStart - posStart ) - Math.abs ( this["example_"+i]._x ) );
scale = 100 - ( scale * .3 );
this["example_"+i]._xscale = scale;
this["example_"+i]._yscale = scale;
this["example_"+i]._alpha = scale;
this["example_"+i]._alpha = 100;
}
_parent.label= _parent["label_" + id];
_parent.url= _parent["url_" + id];
}
thanks!
Sg
View Replies !
View Related
Blink-effect With SetInterval
I wanted to do a simple blinking-effect for my animations, and put this code into the eyes:
Code:
var timeDelay = 2000;
setFrameTimer = function(){
if ( (Math.random(1)*100) > 90 ) {
blink();
}
}
setInterval (setFrameTimer, timeDelay);
Nice and easy, right, giving the eyes a 10 percent chance of blinking every two seconds.
Well, it works nicely in the beginning. But then, after a while, the blinking increases until finally the animations are blinking constantly.
Whyyyy? It just shouldnt happen, right?
View Replies !
View Related
How To Make A Speedometer Blink
Hello!
I will write down the code I have written and then ask some questions on the specific code..
.............................................
if (tSpeed > (_legalSpeed +10))
{
this.gotoAndPlay(1);
}
.............................................
When the speed exceed 10 km/h of the current speedlimit, the digital speedometer is supposed to start blinking - a movieclip that starts at frame 1. However, if I drive in 120 on a 90 way, the flash application constantly goes through the condition "if (tSpeed > (_legalSpeed +10))" which bring the moviclip to stay on frame 1 all the time, since the code tells the application to gotoAndPlay(1). That is, the application will never play the entire movieclip since "tSpeed" is beeing constantly updated. Can you see my problem and please tell me what to do? I would appreciate to see your code-solution!!!
//Oskar
View Replies !
View Related
How To Get Rid Of The Blink Between Photo Transistion?
zie http://www.bldd.nl/flashproblems/photoSlideshow3.swf
i see a blink right after my animated mask is finished
ActionScript Code:
stop();var myMCL:MovieClipLoader = new MovieClipLoader();var myMCL2:MovieClipLoader = new MovieClipLoader();var maxNrOfPhotos:Number = 4;var photoHolderTop:MovieClip;var photoHolderBottom:MovieClip;function startSlideShow() { trace("halllo"); var nummer:Number = 1; var nummer2:Number = nummer +1; var myListener:Object = new Object(); myMCL.addListener(myListener); //myMCL2.addListener(myListener); myMCL.loadClip("photos/photo"+nummer2+".jpg", photoHolderTop); myMCL2.loadClip("photos/photo"+nummer+".jpg", photoHolderBottom); myListener.onLoadInit = function(photoHolderTop) { trace("Nummer: "+nummer+" Nummer2: "+nummer2); if (nummer< maxNrOfPhotos) { nummer++; } else { nummer = 1; } if (nummer2<maxNrOfPhotos) { nummer2 = nummer + 1; } else { nummer2 = 1; } photoHolderBottom._visible = true; photoHolderTop._visible = true; photoHolderTop.setMask(masker); masker.gotoAndPlay("_start"); setTimeout(loadNext, 5500, nummer, nummer2); };}startSlideShow();function loadNext(nummer:Number, nummer2:Number) { myMCL.loadClip("photos/photo"+nummer2+".jpg", photoHolderTop); myMCL2.loadClip("photos/photo"+nummer+".jpg", photoHolderBottom); photoHolderBottom._visible = true; photoHolderTop._visible = true;}
View Replies !
View Related
Blink-effect With SetInterval
I wanted to do a simple blinking-effect for my animations, and put this code into the eyes:
Code:
var timeDelay = 2000;
setFrameTimer = function(){
if ( (Math.random(1)*100) > 90 ) {
blink();
}
}
setInterval (setFrameTimer, timeDelay);
Nice and easy, right, giving the eyes a 10 percent chance of blinking every two seconds.
Well, it works nicely in the beginning. But then, after a while, the blinking increases until finally the animations are blinking constantly.
Whyyyy? It just shouldnt happen, right?
View Replies !
View Related
Window Set Focus / Blink
Hi,
I have a projector that it's supposed to be running in the background, and receiving status notifications from a server side script.
What I need is to create a visual alert to the user when some value is returned by the server.
The ideal was that the projector window, on the task bar started blinking.
Can this be done? Will it work if the swf is running on a browser window?
Thanks
View Replies !
View Related
Small Blink When Loading Movies.
I have a site that preloads several movies and then by clicking on buttons, you can view these movies. depending on the order you view them, animations can run. the problem is, I want the animations to run together fluidly but unfortunately, they're not, theres a very small blink.
its hard to explain so just have a look
http://clients.crombieanderson.com/opwe01/
then once all the movies have loaded, click the top buttons in order. any way to get rid of this? I've racked my brains. the mc's all on the stage at the same time is unfeasible.
cheers
View Replies !
View Related
Blink Function With Revised Code
check out this code.. still havent got it to work, but im trying to pass a movie clip object to the function to make it blink-in.. an affect ive seen on a lot of cool sites! let me know if you know how to implement this and/or improve on this code:
blink = function(object,seed,count,rate){
// Arguments for function
// object - is the movieclip
// seed - is the initial delay
// rate - is the rate of change
// Delay Method is local to the blink function
function delay(){
clearInterval(timer);
}
//--->
// Main Loop of Blink function
do{
for (i=count; i > 0; i=i-1){
//blink-node
object._visible = false;
timer = setInterval(delay, seed*1000);
object._visible = true;
//--->
}
// Reiterations-->
count = count - int(rate/5);
if(count<1){ count=4;}
seed = seed * rate
}while(seed<1);
//--->
}
THANKS FLASHERS ! lol
[Edited by SOKALPAPI on 09-07-2002 at 06:11 AM]
View Replies !
View Related
|