ActionScript 2.0 :: Do While Loop Freezes Constantly

Jan 10, 2006

I have an array with let's say 10 items (keuzes_arr) in it and I want to put 'm on stage randomly, but every item can only be placed once. So I created a little loop, but for some reason the loop freezes constantly. This loop creates a random number, checks if it's already been used. And if not it use it to place the item on the stage.

[Code]...

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Get The Value Of The Variable Constantly Outside The Loop Function

Aug 11, 2010

What i want to do this time is to make a function that calculates the speed of a moving object and then assign this value to a variable, for global use (or just make an .as class and place the function there for general use. I made the loop function that calculates the speed of the object ("ball" is it's instance name), but i cannot find a way to assign the calculation's value as the result of the function "speed" that calls the loop. Or, a way to get the value of the "v" variable constantly outside the loop function. Here's my code:

[Code]...

View 3 Replies

ActionScript 3.0 :: Constantly Get Alpha Value

Sep 25, 2010

I am trying to get target movie clip's alpha value, which is animated.

When the alpha value is reached to certain value, I want to trigger certain event.

Is any way to get current frame's target alpha value by using set interval or event lister?

View 7 Replies

ActionScript 2.0 :: Can't Add With A Constantly Changing Variable

Jul 10, 2010

I am making a game in flash, that uses several resources to build different buildings, that help you to gain resources, etc. I'm trying to make it so that the more "_global.food" you have, the faster your resources will go up. I have it so that the variable "_global.woodBoostMeter" goes up as fast as "_global.woodBoostSpeed" and when it reaches 500, it gives you 1 wood. I want it so that "_global.woodBoostSpeed" is modified by "_global.food" divided by whatever 200 is. (So that you will get resources faster for the more food you have)

Here's the code I'm using:

Quote:

_global.woodBoostMeter =0
_global.woodBoostSpeed = _global.food / 200
_global.woodBoostObtainRate =1

[Code]....

I think the problem seems to be with the "_global.woodBoostSpeed = _global.food / 200". it doesnt go up slow like it should, since "_global.food" starts out at like 200.

View 3 Replies

Make My Sphere Constantly Spin?

Apr 9, 2010

I am making a splash screen for a program and I have a picture in my head of a spinning sphere with pictures on it.I've already made my sphere and mapped my design onto the sphere in illustrator, although it is not as clear as I wanted.How do i get the sphere into flash and animate it to spin continuously?

View 1 Replies

ActionScript 3.0 :: Framerate Keeps Constantly Dropping?

Nov 25, 2009

There's this flash web page Im developing. All movement is 90% written in code (as oppose to it being created via designer mode). And for some reason the frame rate of page in browser just keeps dropping. Can someone tell me what that reason could be?I am aware of the fact that framerate does change from time to time but I think that after a while it should climb back up. But in my case it just keeps dropping (by the 9000. frame its like 2 fps) and there isnt memory leak cos used memory amout by browser stays the same

View 1 Replies

ActionScript 3.0 :: Constantly Updating A Blur

Dec 24, 2009

I have a movie clip with motion in it. I'd like to duplicate this image, blur it, and mask it. I think I can do all of that, but I don't know how to update the blur so it will blur the moving elements in my movie clip.

how to constantly take a snapshot of a movieclip and blur it (while disposing of old snapshots)?

View 1 Replies

Blur Filter Constantly Crashing CS4 IDE?

Dec 21, 2008

In the last 2 projects i've worked on, i've been using the blur filter to create certain effects.My problem is that whenever I test the movie in the Flash CS4 IDE, it crashes giving me the option to submit a crash report to Adobe before quitting.If I run the compiled SWFs outside of Flash, they perform much better and there is no crashing.

View 2 Replies

ActionScript 2.0 :: [f8] Constantly Get Current Property

Feb 15, 2007

I've taught myself actionscript without books (working on a book now, finally) and I'm wondering how to do something fairly simple: Constantly get the property of an object.... for example, lets say I want to dynamically scale a clip using buttons... if you just use the tween class it will not work! I don't know why (again self taught), but you have to constantly get the _xscale and _yscale property. Currently I'm doing this via an empty movie clip with the following actionscript:

[Code]...

It works fine, but I assume there's a purely as way to do this? Also if anyone knows of an array tutorial for microbe-brained people (like myself), that would be helpful as well. I've gone through a few, but I still can't fully wrap my mind around WHY and HOW it works (even though I've implemented plenty of arrays).

View 2 Replies

IDE :: CS4 Constantly Updating Text Field?

Jan 5, 2011

I have a couple of text fields in my Flash movie that are constantly updated with text from an xml document. The xml document is updated through an interface on a seperate swf. It's based on a flash guestbook I found and have hacked apart, and everything works fine in theory... My main worry is that over the course of a day it loaded in the text 170,000 times: 30 times a second which is a little excessive and is playing havoc with my web stats. I've cut this down to once every 10 seconds but I'm still thinking I should use a better method, would it be possible to test for changes before I load in new text, or am I going about this entirely the wrong way?

var currPage = 0;
var showAmount = 1;// set this to the amount of entries you want to view at a time
// **** Load XML ****************************
myXML = new XML();

[code].....

View 2 Replies

ActionScript 3.0 :: Constantly Redrawing A Bitmap & Blurring It?

Dec 24, 2009

I have a movie clip with motion in it. I'd like to duplicate this image, blur it, and mask it. I think I can do all of that, but I don't know how to update the blur so it will blur the moving elements in my movie clip. Can anyone explain how to constantly take a snapshot of a movieclip and blur it (while disposing of old snapshots)?

View 2 Replies

ActionScript 3.0 :: Checking Array Constantly For 6 Index Values?

Jan 9, 2012

I have an array that has its values dynamically changed as a user interacts with buttons. I need to constantly check 6 index values from this array against each other so that if they are the same value they count as 1 but if they are unique they also count as 1.

E.g. IF all 6 index points = "A" I get 1 returned
If 3 of the index points = "A"
2 index points = "B"
1 index point = "C"
I get 3 returned to me

So I'm looking for a way to get a number returned to me ranging from 1-6 depending on the values.

View 10 Replies

Flash Looping Causing Variable To Add Values Constantly

Jan 15, 2011

Flash keeps looping which is causing certain variables to add values constantly. E.g.
if (userWord.text == word){
score = score + 1;
trace(score);
}
That will constantly add one to "score" when a certain word is typed into a text box. How do I add one to "score" without stopping the application or playing it once?

View 1 Replies

ActionScript 3.0 :: Unplugged Webcam Detection In Trace Constantly

Jul 22, 2009

I have this code in my application:
ActionScript Code:
this.cam = Camera.getCamera();
trace("webcam:", this.cam, this.cam.name);
The problem is, the "trace" ALWAYS displays [object Camera] <camera name>, no matter if my webcam is plugged or not. How can I detect if a webcam is not plugged?

View 0 Replies

ActionScript 3.0 :: Prevent Function From Triggering Constantly >> Memoryflood?

Apr 12, 2011

in my project, im loading in a external swf, its a panorama beeing the menu, the buttons on that panorama trigger, everything ok..anyway, ive got another loader for the content that the clicked buttons trigger, works out as well (after long days trying and trying).the problem now is, that loader is sending the content constantly instead of just once when clicked. this makes the flashplayer load the requested url load constantly and flooding the memoryhat d be the code (the critical part [at least i think so] starts at //WINDOW Variables):

Code:
import flash.events.MouseEvent;
import flash.display.Loader;

[code].....

View 2 Replies

Actionscript 3.0 :: High CPU Usage When Constantly Rotating Movieclips

Feb 24, 2009

I'm working on a new site and one of the things the client likes most is the idea of these gears that are constantly rotating on the screen. However, now that I have the mock-up design done, I'm noticing that the constant rotation requires a lot of CPU to maintain. Has anyone else experienced this and have you figured out a better method than the one I am using to rotate the movieclips?

[Code]...

View 2 Replies

Actionscript 3.0 :: The Colors To Be Constantly Changing Without Any User Interaction?

Apr 7, 2010

I'm trying to change the colors of a blur filter. But I want the the colors to be constantly changing without any user interaction. So far i've set up a color matrix filter

View 4 Replies

ActionScript 2.0 :: Depth Setting - Movieclips Are Being Duplicated Constantly?

Apr 12, 2007

i have a movie clip on the stage, and i need its depth to always be higher than everything, but other movieclips are being duplicated constantly. How do i do this?

View 2 Replies

ActionScript 3.0 :: Tweenlite Transition - Moving MovieClip Constantly

Jul 4, 2009

I've tried using tweenlite as a replacement for tweener. In one use I have a mc that I want to constantly move left or right when the mouse is hovering over it depending on position. With tweener I set the x for the tween to be mc.x-20. Using this with tweenlite 'to' just does it once rather then a smooth constant movement(this tween is being repeated through an event listener with mouse_over), 'from' will do what I want, however when the mouse leaves the mc, the mc comes to a halt and performs a tween in the opposite direction by 20 pixels...

I am not sure how to prevent the tween in the opposite direction or have 'to' continue to tween the mc without me having to rehover over the mc again for another tween of 20 pixels... So is it possible to use tweenlite like I had tweener working?
Code:
imageHolder.addEventListener(Event.ENTER_FRAME, updateScroll);
imageHolder.addEventListener(MouseEvent.MOUSE_OVER, rollover);
function rollover(e:MouseEvent):void {
if(scrollc.mouseX>containerWidth/2) {
scrolling="right";
[Code] .....

View 5 Replies

ActionScript 2.0 :: Constantly Moving Forward In The Direction It Faces?

Sep 3, 2009

I have recently been developing a sailing game and my boat turns with the arrow keys. On the turn i would like to keep the boat constantly moving forward in the direction it faces. What is the simplest way to do this?

(When i rotate the boat to the right/left, i want the boat to move that direction)

View 2 Replies

IDE :: After Switching To Flash Cs5 The Auto Format Will Fail Constantly?

Oct 27, 2010

did anyone else notice after switching to flash cs5 the auto format will fail constantly? 90% of the time i comment something out the auto format will error.

View 1 Replies

Flashlog.txt Constantly Generating Warning 'flash' Has No Property 'prototype'?

Jul 2, 2010

EVERY SINGLE WEB SITE that has a flash file embedded on it causes my flashlog.txt  file to display the following message, usually multiple times while a flash file is loading.

[Code]...

View 3 Replies

ActionScript 2.0 :: Lottery Program - Random Data Changing Constantly

Dec 10, 2003

There are two buttons and a dynamic text box in my flash. The two buttons are start and end button. When you click the start button, you will find the random data in the dynamic text box changing constantly until you click the stop button.

View 3 Replies

ActionScript 2.0 :: Make The Wheel Spin Around 360degrees In A Movie Clip Constantly

Aug 13, 2010

I have an image of a wheel, and all i want to do is make the wheel spin around 360degrees in a movie clip constantly!

View 6 Replies

Long SWF Freezes Near End

Sep 21, 2009

I have a long timeline based animation, about 23 minutes in full.  When I test or publish the movie, the SWF freezes with about one and a half minutes of playback time left. The streaming audio, however, continues to play.I know that the error isn't due to some sort of errant stop action at that point in the animation because I have it broken up into several scenes, and if I test the final scene by itself, it does not freeze and plays back correctly.  Also, if I rearrange the scenes, the SWF still freezes about 21 minutes and 20 seconds into the animation, which, after rearranging, corresponds to a different point in the animation.

View 1 Replies

ActionScript 1/2 :: Video Freezes 1 Second In?

Sep 6, 2011

I have a flv which is in the same root folder as my exe. I have a navigation bar which takes me to the specific point in the timeline where the video is. Once the video comes up it plays for 1 second and then freezes. If I manually scrub the timeline past that point the video will continue and loop as intended, but right off the bat everytime the video freezes?
 
I'm at a complete stand still, Have tried reinstalling flash player, tried installing old versions of Flash player, nothing seems to fix it.

View 7 Replies

ActionScript 3.0 :: Why Transition Between SWFs Freezes

Aug 12, 2009

I have a problem with a flashsite I'm working on. It freezes when I click on the page with the most content on it. I use the "alpha" transition.

Here's the code:
import fl.transitions.*;
import fl.transitions.easing.*;
var p1age1 = new page1;
var p2age2 = new page2;
var p3age3 = new page3;
[Code] .....

View 3 Replies

MX Playback Hiccup/freezes On Frame

Jun 30, 2010

I finished my flash logo for work and am now having a problem when trying to publish/export/play the file. On frame 110 when the first shimmer crosses the "M" I get a hiccup on that frame, it should be a smooth transition. Once the video plays once the replay works fine, but this is going to be the intro to our website, one time view.

The playback was working great the day before. Today, after some more tweeks, not so good. Only thing I could fathom was maybe too many masks (added 1 more today, 3 in total) were being applied but I tried removing all masks and am still having the same problem.

Visit the link to view intro:Metagraphics Intro

View 2 Replies

Flash :: Button Bar Duplicating And Freezes

Jun 28, 2009

I created a button bar with 6 buttons that display separate content.  When I click on one of my buttons, it brings up the content alright, but on release creates an entire duplicate set of buttons on top of my existing set of buttons.  I can click on another button, and it will display content okay, but add yet another set of buttons on top of itself. after 2 buttons it basically freezes. why are my buttons in essence copying itself, and how can i correct.

View 6 Replies

ActionScript 3.0 :: Connection Error Freezes Swf For IE

Feb 26, 2011

Using AS3 on Flash CS5 Pro. I've got a parent.swf which passes info to/from a child.swf via the following code:

[Code]...

The connection works fine except that when IExplorer loads the parent.swf it tells the user that "To help protect your security, Internet Explorer has restricted this webpage from running scripts ..." The thing is that even if the user now clicks ok, the swf freezes. I've checked why this is and I found that what is happening is that IE runs the swf again and this triggers the error : "ArgumentError: Error #2082: Connect failed because the object is already connected. at flash.net::LocalConnection/connect()". This double connection attempt freezes the swf.

How should I capture this error and prevent this from happening? I'm a normal programmer and have never done any error capturing before. Also, there is one particular child.swf (there are several) which to me seems to be the same as all the others; I wrote the same code precisely as far as the connection is concerned. However, only on the Chrome browser, it does not load like the others and freezes the swf. Curiously, it works fine when I test it on my laptop/Chrome, but refuses to load when I try from a remote computer. Has anyone seen anything like this? Is it a browser/plugin error or something on my side?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved