ActionScript 3.0 :: Stuck In A Loop
Jan 25, 2009
I have a swf within a html page. There is a function that opens an html page when an object gets to a certain x position. However, when the object gets to that point the new html page (in _self) opens over and over again and get stuck in a loop. Any way to escape this loop and what would be the best way to trigger this new html page to open when the x position of the object is true?[code]
View 3 Replies
Similar Posts:
Dec 15, 2009
I got the code from someone else's flash file and heavily modified it. The MAIN problem is that when the wheel hits zero rotation, the code tells another mc to jump to a frame and do the collisiion check. The problem is this code is in an onEnterFrame so the code has the mc jump to the frame over and over in an endless loop. I need to somehow get that part of the code OUT of the onEnterframe but I cant seem to make it work.[code]
View 1 Replies
Mar 25, 2010
im trying to make a website in flash andd everytime it just cycles through all 4 pages in a loop. if i redo the entire site it will work if i test it but as soon as i go to file save as and save it as a new name it goes back to looping and cannot be fixed unless i redo it again. i have 4 layers and the first frame in layer "action" has stop(); as the first line. the syntax is correct and i get zero errors. [URL]
View 7 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
Jul 9, 2010
I want to play a video on my website - in its present state its 15 seconds long and stops abruptly so I want to set it to loop continuously to avoid this. I imported the video using flash, and now it is embedded in my .fla file. I've tried several things to get it to loop in CS4 and I'm stumped!! Is there any easy way I can do this? Im new to flash,
View 7 Replies
Dec 6, 2009
I have a simple FLA which loops through some keyframes and randomly places movie clips on the stage.
Frame 1:
Contains nothing
Frame 2:
Code:
_root.tile.duplicateMovieClip("tile"+i,i+1)
_root["tile"+i]._x=Math.random()*800;
_root["tile"+i]._y=Math.random()*600;
[code]....
On Frame 4, I add a button which I'd like to use to restart the whole thing.
The button has this AS on it:
Code:
on (release) {
i=0;
var ref = null;
[code]....
View 3 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
Jan 24, 2009
I have a swf within a html page. There is a function that opens an html page when an object gets to a certain x position. However, when the object gets to that point the new html page (in _self) opens over and over again and get stuck in a loop. Any way to escape this loop and what would be the best way to trigger this new html page to open when the x position of the object is true?
View 1 Replies
Jul 5, 2010
I have a movie which is serving as a button.When you rollover the image, it grows, and stops.When you rollOut, it shrinks, and stops.This code works fine. The Problem:When you scroll the mouse over quickly, the animation get stuck and doesn't execute the rollOut code.This is most likely because the first rollOver action hasn't yet completed.Here's my code:
thumb_test_4.onRollOver=function () {
this.gotoAndPlay(2);
}[code]....
View 9 Replies
Nov 24, 2009
Using a bunch of the tutorials on this great site, I've been teaching myself AS, and inparticular the XML parse, etc. with the loop commands to load an ideterminate number of images, etc. attributed in an XML file.I've got the attached code to work before - and it works well here too, loading all the thumbnails in their correct location, and as per the XML file. BUT now it's part of this page, the 'current_thumb' seems stuck on the last thumbnail, and a rollOver of any thumbnail will cause only the last one to action. In addition, when I put the trace command in on the onRollOut function (trace(current_thumb_mc) I get "_level0.menu_mc.item3_mc" no matter which of the four tumbnails I rollOver.
//Initial P Value
p = 0;
//Project Information
//Assigning Information[code]..........
View 1 Replies
Feb 22, 2012
I have four dynamic text fields, each saying 'Left', 'Right', 'Up' and 'Down'. When my main character hits an object, the respective directional text is blanked out (i.e. if the character hit an object on its right, the 'Right' text would display nothing). Here is the function below:
[Code].....
View 2 Replies
Jun 2, 2010
I've been working a few hours on getting my text box to gain focus when i t's added to the stage. I'm having no luck. Here is what I have so far and this code seems to place the cursor in the text box but I cannot type.
var textFlow:TextFlow = si_box.email_txt.textFlow;
textFlow.interactionManager = new SelectionManager();textFlow.interactionManager.selectRange(0, 0);textFlow.interactionManager.setFocus();
View 1 Replies
Sep 22, 2011
In the tmbLoaded function all I had to do was place the if/else statement after photoBmp and photoBack creation and remove the tween inside the if/else statement. Also, I was advised to not use a global variable for TweenLite because I need not worry about garbage collection using TweenLite.
Original Issue
I'm working with an image gallery and the first image in the transition ends up stuck near the bottom of the file, but the remaining images fly right into place.
I have a sneaking suspicion it may have something to do with my positioning somewhere or with my tweening. I added a global variable thinking it may have something to do with garbage collection causing my tween to partially stop, but that didn't solve the problem. It's just that first image when it transitions onto the stage. After that, everything works perfectly. Even the click transition.
This is part of my final project and given that I get this fixed, everything will finally be working. Everything is built using as3, so you could just copy and paste it, if you'd like. Except, of course, for the xml (which I'll post in a comment), the url button which is imported from the library, and the text format which can be faked with any embedded font and exported as Myriad.
var fileNameArray = new Array();
var urlArray = new Array();
var targetArray:Array = new Array();
[Code].....
View 1 Replies
Jan 13, 2009
I recently intiated in a project where the user will be scrolling through a slide show and when they click a particular image they will be taken to another frame where they will be able to view the details of the product in the right and in left a 360 degree view of the product will be displayed and the user can view all the products by clicking next and previous button on top everything works perfect for me but i am having a big issue with the 360 degree rotation where when the user enters the first product the he will be able to view the its corresponding product and its details, but when they when they click the next or previous button the details of the product changes but the same product remains there ie the product one remains there it does not change to its corresponding product view each time the user has been forced to reload the page to view the corresponding product I have displayed below the xml code
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
[code]....
View 2 Replies
Feb 11, 2012
I use flash cs5.5 for mobile. I recently started using flash builder with it. Something wrong with flash cs5.5 mobile compiler. I can't compile for iOS or android anymore, it just hangs and never finishes creating the swf. or crashes. Test movie never pops up the windows, Air debug launcher in this case. Its not my app, its the same with a new blank one. I can test movie and/or compile flash 10.2 swfs.
View 7 Replies
Feb 24, 2012
Has anyone else noticed this oddness? example: create something, covert to symbol button. now change it to type Movieclip. (not nested, just change its type) In the library and properties it correctly shows as type Movieclip, however if you double click in to it, it shows as button.
I just noticed now if you add/remove it from stage, it updates correctly.
I have seen this scenario before in previous version of flashIDE as well.
View 2 Replies
Apr 27, 2009
I've attached a demo fla so you can see what I'm trying to do. Basically the big circle is a spaceship that will move to wherever you click. The small circle is a resource that the ship can collect, in this case it's called iron. When you click on the iron the ship moves to it and then the small circle disappears, and +1 is added to your inventory, creating the illusion that the ship has collected it. Problem is, after you collect the iron, you can't really move the ship anymore. It's stuck around the position where the iron was. How do I regain control of the ship after I collect the iron?
View 1 Replies
Aug 6, 2009
I have a problem with this line of code:
stage.displayState = StageDisplayState.FULL_SCREEN;
When I put it into a flash file, the resulting swf "sticks" on the first frame.....but only in browsers. Not in the standalone flash player.
Here are the steps:
1. Make a new flash file with two frames.
2. On the first frame make any shape and type this in its action window:
stage.displayState = StageDisplayState.FULL_SCREEN;
You should probably put a stop(); on the second frame.
3. Opening this in any browser and it will stick on the frame with the shape.
View 3 Replies
Jan 19, 2010
i have been making some little animated icons and I have gotten stuck on one in particular.I think I have attached an image of it here. What I want to do is start off with a solid red triangle and animate it being sucked or beamed up into the spaceship, as you see in the picture.I want it to look kind of like the triangle is dissolving into little particles which are being sucked into the spaceship
View 4 Replies
Mar 8, 2010
Im currently learning AC3.0 (ActionScript 3.0 [flash]) at school, and I was doing some practice. Well, I got stuck on this part.[code]...
View 8 Replies
Mar 18, 2010
I've been trying to figure out a code for the last week or so and I have had no luck . I'm trying to make an event.listerner in actionscript 3.0 that detects for a "S" key and then opens a new url with a separate swf. file upon the pressing of the "S".
View 4 Replies
Jul 1, 2010
I have a movie which is serving as a button. When you rollover the image, it grows, and stops. When you rollOut, it shrinks, and stops. This code works fine.The Problem: When you scroll the mouse over quickly, the animation get stuck and doesn't execute the rollOut code.Here's my code:
Actionscript Code:
thumb_test_4.onRollOver=function this.gotoAndPlay(2);}thumb_test_4.onRollOut=function () { this.gotoAndPlay(6);}
[code]......
View 3 Replies
Jul 19, 2010
i was doing a drag and drop game. i created 2 drop down function to drop the object. the problem i faced was, when i drag and drop the object to the target, one of my function does not work? WHY? By right my oncomplete function should able to go to and stop at frame 2. here is the code.
var startX:Number;
var startY:Number;
var counter:Number = 0;
[code]......
View 2 Replies
Jul 29, 2011
im really stuck on getting a hit test down pat ive tried for weeks to get it right but cant seem to get it working. i have a character that i can move up, down, left and right but i would like him not to walk through the walls. see attached if anyone would like to take a look at it
View 1 Replies
Mar 13, 2010
Mac OS 10.4.11; Flash CS3.I cannot change the tool any more. It's stuck on the eraser. It doesn't erase anything, but I can't change it to another tool.I uninstalled Flash, preferences and all, and re-installed it, but the problem persists. Interesting is, my customized workspace is still there, even though I had all preferences and anything else that has the name "Flash" deleted.At the same time the computer opens both CD trays when booting up. Never did that before. So I re-installed the OS, but that didn't help either.
View 1 Replies
Sep 22, 2011
I'm working with an image gallery and the first image in the transition ends up stuck near the bottom of the file, but the remaining images fly right into place. I have a sneaking suspicion it may have something to do with my positioning somewhere or with my tweening. I added a global variable thinking it may have something to do with garbage collection causing my tween to partially stop, but that didn't solve the problem. It's just that first image when it transitions onto the stage. After that, everything works perfectly. Even the click transition.Everything is built using as3, so you could just copy and paste it, if you'd like. Except, of course, for the url button which is imported from the library and the text format which can be faked with any embedded font and exported as Myriad.[code]
View 6 Replies
Apr 12, 2011
I am using math.random to randomly drop objects from the top of the stage. I had it working with one object. But as I wanted to increase the number to 6 objects, I added the following code: But I am "stuck" and so are the 6 objects at the top of the stage.[code]...
View 2 Replies
Jan 31, 2012
My objective is to create a horizontal menu spaced evenly, using dynamic random widths fed from xml.
I'm playing with arrays in the dynamic loop, but i really have no clue to what i'm doing. Can someone take a look at my loop code, i'm getting all my individual widths but i don't know what to do with them. In the cas e below i get item 1 and 2 in position but the rest are not moving![code]...
View 5 Replies
Mar 18, 2009
I have a working drop down menu that works when moused over and moused out. The only problem is if you mouse over the other main links the drop menu stays down. So when I mouse over "articles(main link)" the menu drops and I can mouse up and down over the sub menus. When I mouse off the sub menus the menu disappears. Sounds good right.
So the problem comes in when I mouse over "articles(main link)" and then "about(main link)" or other main links the drop menu stays down. I have tried alpha, visible, remove child and many more. I have put a link to my fla
View 4 Replies
Aug 30, 2006
My slideshow works, but on my website it keeps getting stuck when the 1st image is fading out. But if you click the Next button, it will go to the next one, then the slideshow will cycle perfectly, even through the 1st image just fine. I'm attaching a zip file with my FLA and my XML file.
View 1 Replies