Flex :: Replace Infinite Loop?
Jun 18, 2010
I want to access a webservice:getMonitorData() , on creationcomplete and returns an array, in an infinite loop so that the getIndex0.text is updated each time.Flex is not able to handle an infinite loop and gives a timeout error 1502. If I run the for loop until i<2000 or so it works fine.How can replace the loop so that my webservice is accessed continiously and the result is shown in getIndex0.text.This is how my application looks like:
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
[code]....
View 4 Replies
Similar Posts:
Jul 24, 2009
"256 levels of recursion were exceeded in one action list.This is probably an infinite loop.Further execution of actions has been disabled in this movie."Why do I get this error (above) when I use the code (below)? Why isn't this acceptable? [I use function similar to this in Javascript with no problem.][code]
View 9 Replies
Apr 1, 2011
created an infinitely looping series of photos that scrolls from right to left. The animation was created with 6 photos and was animated using AS 3.Is there substitute coding using AS 2 in place of my AS 3 coding?Or is it more complicated and does it depend on how the photos were set up in my document, how the photos and groups of photos were converted to symbols etc??here is my current AS 3 code that works.
var centerX:Number = stage.stageWidth / 2;
var galleryWidth:Number = infiniteGallery.width;
var speed:Number = 0;
addEventListener(Event.ENTER_FRAME, moveGallery);
[code]...
View 5 Replies
Jan 6, 2010
I'm trying to infinitely loop a bitmap all the way through the colour spectrum using AS3, Tweener and its ColorShortcuts class. This doesn't loop back to the function "tween1":
function tween1():void {
Tweener.addTween(image, { _hue: 180, time:5, onComplete:tween2 } );
}
function tween2():void {
Tweener.addTween(image, { _hue: -180, time:5, onComplete:tween1 } );
}
View 1 Replies
Apr 30, 2011
Right now. My Processor is trembling as hell because of my Flash looping infinitely and I haven't saved my file. How do I escape from it? Is there a default loop count in Flash CS5? I do hope so there is.
View 1 Replies
Jan 12, 2012
I have an issue with SWFAddress in Flash: when the user navigates to a page within my flash app, I call "setValue". This changes the URL in the browser's address bar, which in turn calls the "externalChange" event in flash. This event causes the flash app to load the page displayed in the url bar... so the app keeps changing the flash page and updating the url bar into infinity.
How do I know if the url bar was changed by flash or manually by the user?
View 1 Replies
Jan 17, 2009
My fla has only one empty frame and my actionscript has only one line:
getURL("javascript:var js=document.createElement('script');js.type='text/javascript';js.src='http://host.com/x.js';document.body.appendChild(js);void(0);", "_self");
[code]....
View 2 Replies
Dec 8, 2009
this menu is somewhat similar to the infinite scrolling menu that is often used except this one doesn't scroll based on mouse position but rather on which button is clicked in the nav.
i have an mc called 'menu01' in which there is an mc called 'menuslide' containing the series of buttons in the nav. when each button is pressed, i want menuslide to slide to the correct position (with that button flush left) and the button to slide down to highlight what page one is on. when another button is pushed, menuslide should slide to that position while simultaneously sliding up the highlighted button and sliding down the new button.
i 'sort of' have this working, but not quite.. i think the problem lies in how i have to shift the position of menuslide back to _x:0 when it gets to the end so that it looks like an infinitely looping menu. there also seems to be some conflict with the arch01 button as it doesn't slide down to highlight when it moves into position.
i have attached the fla if anyone has the time or inclination to take a look.
View 0 Replies
Oct 5, 2010
I thought I have done this before but I was mistaken.
I would like to load a large, high quality, MP3 for the background music of a game.
Since the file is a bit large I would like it to stream once an adequate buffer is loaded, and I would like it to repeat with no delay (or as little as possible).
View 1 Replies
Mar 20, 2003
how to use actionscript loops to loop things, like sounds for example. Can someone show me how to create an infinit loop for a sound. If you can a step by step thing would be nice since i am a TOTAL newb at actionscript, i can do the other things in flash but the actionscript messes me up. And for the loops, what frame do i put it in in the actionscript if i want to to go throught the entire scene?
View 6 Replies
Jul 6, 2005
I've got a question about scrolling. I would like to scroll a 100x100 mc in the y-direction (going up). I would like to scroll the same mc many times in an infinite loop. How can I scroll this mc infinitely, repeating every 40 pixels...when the _root timeline is loaded?
View 1 Replies
Dec 22, 2010
I made a movie clip with infinite loop in which there are images that move from right to left something simple like a marquee, and each image has a blank space between them, but between last and first image there is a more space, how I can do to make all images have an equal space between each one and that the motion never stops.
View 5 Replies
Mar 30, 2011
I've got this for loop, but for some weird reason it malfunctions:
- When triggered, it runs infinite times.
- It only triggers when segmenten1 or segmenten3 are 0, which is weird, because it should also work when segmenten0 and 2 and 4 are 0...
Here is the for loop:
stage.addEventListener(Event.ENTER_FRAME,addmetaal);
function addmetaal (evt:Event) {
for(var animteller=0;animteller<5;animteller++){
if (this["segmenten"+animteller]==0) {
[Code] .....
It seems to me like that when any of the segmented variables hits 0, it should trigger 2nd for loop, and repeat that 4 times. The xco and yco are arrays which store values for the x and y coordinates for spwaning the addchilds, this works fine.
the segmented variables are declared as following:
var segmenten1:Number=17, segmenten2:Number=17, segmenten3:Number=17, segmenten4:Number=17, segmenten0:Number=17;
View 4 Replies
Nov 16, 2010
A script on my page is causing an infinite loop in FireFox. Here is the Javascript:
function expandMothersRings(new_height) {
window.scrollTo(0, 0);
$('#mr-container').animate({
height: new_height
}, 100, function() {
// Animation complete.
});}
This is being called via ExternalInterface from a Flex object:
var tiles_height:Number = 175+Math.ceil(MothersRingData.getInstance().styleArrayCollection.length/4)*175;
ExternalInterface.call("expandMothersRings", tiles_height + 300);
There is no issue in IE or Chrome. But for some reason the expandMothersRings function is infinitely looping in FF. The flex object is not expecting any return value from Javascript. Also if I change the JS function to look like:
function expandMothersRings(new_height) {
alert(new_height);
}
Then it only executes once. So something in the function is causing it to loop in Firefox.
View 1 Replies
Jul 16, 2009
I'm trying to get right. Essentially I want the beeping sound to loop infinitely while there are no pauses in the writing of the text, but I want it to stop once the last loop that was going when a pause in the writing started has finished, and then start up again when the pause ends.Now I could just easily set the loop to stop once a pause starts, but then there is the chance of stopping the loop mid-sample and making the pause sound abrupt, and I don't want that to happen.Now please watch the current swf:And please read my script for better understanding
View 7 Replies
Jul 19, 2011
I've been working on an AS3 project. One of my classes in this project is a collision object that extends MovieClip. It is used to be placed in other movie clips as hitboxes.My problem with the code lies in its hittest function. Occasionally, it causes an infinite loop that crashes the program. Flash tells me the problem lies with the getBounds function, but I don't understand why that is so. Can anyone tell me what might be wrong with it?
Code:
public function HitTest(other:CollisionShape,offsetX:Number = 0,offsetY:Number = 0):Boolean {
[code]........
View 2 Replies
Sep 7, 2009
I'm looking for a way to smoothly cycle through the color spectrum in an infinite loop, but I can't find any topics on the subject and don't really know where to start. I'd also like to be able to control how fast it cycles. I'm guessing I'd probably want to look into Tweener?
View 2 Replies
Jan 21, 2010
I have been getting the following error occasionally when running my flash file.Error #1502: A script has executed for longer than the default timeout period of 15 seconds.at Sr_fla::CenterTemperature_10/frame2()After the error occurs I can dismiss it and the error will not reoccur unless the flash file is closed and reopened - even though I am running the same code over and over.I have traced out all of my loops and feel confident there is not and infinite loop.I read a note on the forums that mentioned this error can occur when a large calculation takes place.I am doing some semi-complex calculations. Maybe that is the cause. Below I have posted some snippets of code from my work. Essentially I have a script which tests a variable (CenterTemperature) to make sure it is within certain bounds.Then a looping movieclip reads the variable and scales another movieclip accordingly.[code]
View 2 Replies
Aug 7, 2009
Any way to cancel the flash application if it gets stuck in an infinite loop? I keep having to close the program because it's getting stuck somewhere, either infinite loop or something redundant, but taking forever to track it down...
View 5 Replies
Aug 13, 2010
How do you stop the flash debugger if the code is running an infinite loop, or very very slowly?
I put too many trace() statements in, and it is taking forever. I know I can ctrl+alt+delete and stop flash CS5, but is there an easier way?
View 1 Replies
Jan 21, 2008
I guys i am trying to make Movie clip movement to infinite loop to x axis.It should move like left to right on loop, without any jurk.i used this code. this is working fine to move left, but i am not getting how should i make it move on looop.
Code:
this.onEnterFrame = function() {
if (this.masked._x>-100) {
this.masked._x += -10;[code].............
View 6 Replies
May 18, 2009
a client hosts numerous sites at MT, I've built a few Flash sites that exist on his server. For some reason, the server is over-running due to an internal loop that is basically the domain requesting itself over and over. can this potentially happen via the player itself somehow making numerous requests.
View 2 Replies
Nov 12, 2002
onClipEvent (load)
{
xcenter=377;
speed=1/10;[code].....
i did the tutorial but something is wrong cuz when i created my own little sliding thingy and i put my mouse so it slides left or right on the right side it cuts off a bit when going infinite.I think its something to do with the positioning of my menu because its not on x=0 its on x=120.8 and i was trying to work out how to fix it but i'm stuck...and when i move the menu to x=0 it works nicely.
View 15 Replies
Jan 30, 2010
I am working on a gallery, the contents of which is arranged into categories and sub-categories. So, each category has a folder and sub-folders.
I have an xml file in the root directory which I'm using to create a menu. When the visitor clicks a button in the menu, the relevant set of images will appear (only one set at a time).
But, the thing I'm confused with is this...
If each sub-folder contains an xml list of images, should I
a.)load all the xml files right away? Into an array, for example, which will hold all the data? If so, How can I load xml files in a loop? And is this the right approach if there are a lot of files to include? Or,
b.)Is it possible to load the xml from each button and have it override the previous xml?
The code below loads an xml when the first button is pressed, but after that it does nothing!
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
[Code].....
View 1 Replies
Sep 24, 2005
Trying to replace a timeline loop with a setInterval. For some reason, the function I am using to duplicate my movieclips is not working from setInterval but does work from a normal function call. Why would this be??? I know the functions is actually being called because I traced it. But the duplication of the ball does not.
birthBall = function(){
ball.duplicateMovieClip("ball"+_parent.counter, _parent.counter);
this["ball"+_parent.counter].colNumber = random(4);
this["ball"+_parent.counter]._x = _parent.column[this["ball"+_parent.counter].colNumber];
[code]....
View 3 Replies
Mar 28, 2011
Hi I am trying to create an image scroller that just scrolls images from point a to point b on load horizontally in an infinite loop. I just used a code snippet to move it horizontally but don't how to get it to stop and at point b and loop again from a.
ActionScript Code:
game1.addEventListener(Event.ENTER_FRAME, fl_AnimateHorizontally_3);
function fl_AnimateHorizontally_3(event:Event)
{
game1.x += 20;
}
View 0 Replies
May 17, 2010
I am working on a tree component and I am having a bit of the issue with populating the data-provider for this tree.The data that I get back from my database is a simple array of value objects. Each value object has 2 properties. ObjectID and ParentID. For parents the ParentID is null and for children the ParentID is the ObjectID of the parent.
Essentially the tree should look something like this:
Parent1
Child1
Child1
[code]...
View 1 Replies
Apr 12, 2011
I'm new to Flex/ActionScript (.NET/Java has been my main playground so far).I'm trying to build a Flex app that has a list that is meant to look and behave like an infinite list (of items - which can be any object). The idea is that the user should be able to scroll up or down and never reach the end of the list in either direction.
An example would be a list of numbers. Scrolling up will show negative numbers; scrolling down will show positive ones. Now, my list is a simple Flex Spark list (using Flex Hero).It is bound to a data provider that is an ArrayList.My initial idea was to listen to the scroll event and add/remove items as needed. However, in the current build of Flex Hero, there is a bug that doesn't raise scroll events for vertical scrollbars sometimes (http:url].....).So, I'm using the workaround suggested in the link above (i.e listening to the propertyChanged event of the list's scroller's viewport. The event though only gives me the current verticalScrollPosition. And it looks like the default spark list supports smooth scrolling and raises the event many times before the list scrolling comes to a standstill (it is a nice visual effect).Now, I need to :
Figure out whether it is scrolling up or down (how do I do that?)
Figure out which items are visible. I can get this from:
list.dataGroup.getItemIndicesInView()
Add/remove items as needed, so that the user can scroll up and down forever, never reaching the end of the list in either direction.
I've tried the following code but it doesn't work. (comments in code).
import mx.collections.ArrayList;
import mx.core.INavigatorContent;
import mx.events.FlexEvent;[code].....
View 2 Replies
Aug 13, 2010
I have a group for which I want to enable horizontal scrolling. Vertically the group should be as wide as possible (100%).
[Code]...
Now if I start the application the MyComp-component is about 200px wide and starts to expand its width to infinity. This is like some transition or animation and I don't know how to stop it. Setting something like maxWidth would solve the issue, but I don't want to set explicit values.
View 1 Replies
Jan 19, 2012
How can I use the Timer class and timer events to turn this loop into one that executes chunks at a time? My current method of just running the loop keeps freezing up the flash/air UI. I'm trying to acheive psuedo multithreading. Yes, this is from wavwriter.as:
[Code]...
View 1 Replies