Actionscript 3 :: GotoAndPlay Causing Immense Lag, Even Though It's Only Being Called Once?

Dec 30, 2011

I am creating a game, in AS3, in Flash CS4, with Adobe AIR. The game has gotten too large and complex for me to share the full thing on here, but I will try to explain my problem.

The background of my game is animated water, and it is a symbol separate of the game character and the other entities in the game. When the character performs certain tasks, the water animation needs to jump to a certain frame. This should be really easy:

water_background.gotoAndPlay(the_frame); However, this for some reason is causing a lot of lag, regardless of the machine I use it on. Right when the gotoAndPlay fires off, there is about a 700 millisecond delay where everything freezes up, and then when it comes out of it, all the animations already have completed and the water is playing from the appropriate frame, however the user misses all the pretty animation because the game freezes during it.

I've been trying to figure this out for hours. I've googled everything I could think of and have yet to find an answer.

[Code]...

View 1 Replies


Similar Posts:


ActionScript 3.0 :: GotoAndPlay ('Label') Causing FAST Forward?

May 6, 2010

I have a flash movie in 1 flash scene that has over 3000 frames. I didn't use Flash's "scene" facility because it was not recommended on forums (i'm not sure why?). In any case, I just placed scene labels in the timeline instead and called them: Scene1..Scene7.When I placed buttons on an opening frame that allows me to jump to any of my timeline scene labels and play the movie from there, I used gotAndPlay("Label"). That worked fine for scenes 1-4. But on scenes 5-7, the goto works fine, but the play happens in fast forward? It's very odd. I tried renaming the labels and that had no effect.

View 6 Replies

ActionScript 2.0 :: Stop A GotoAndPlay() From Being Called?

Jan 1, 2004

I have a MovieClip.gotoAndPlay() statement in my code, but for some reason there is a chance that the statement will be completely ignored. When it's ignored, my movie acts as if the statement was never there, and I can't see a pattern in when my movie ignores the gotoAndPlay(). It seems like it just doesn't gotoAndPlay() when it feels like it.Anything that might stop a gotoAndPlay() from being called?

View 2 Replies

ActionScript 2.0 :: Goto And Play Scene - _root.gotoandplay And Even Scene1.gotoandplay Won't Work?

Nov 9, 2007

For some reason i'm having problems swapping scenes in my flash movie. At first i put the action in a "actions" named layer and a link to a button. So basicly when scene1 loads the frame 1 action is "stop ();". The viewer clicks on button1 which has a code of;

[Code]...

View 1 Replies

ActionScript 3.0 :: Load An External Swf Called 'signs.swf' Into An Empty Mc Called 'signholder'?

Apr 12, 2010

I want to load an external swf called 'signs.swf' into an empty mc called 'signholder'.

var loadit2 = new Loader();
loadit2.load(new URLRequest("signs.swf"));
signholder.addChild(loadit2);

Everything works. Cool. But, I now want to target something within the signs.swf. How do I do it though? What is the path? Do I have to give the child of signholder an instance name? Everything I try fails.

If I wanted the root timeline of the external swf to gotoAndPlay(2) for example,...would i say...

signholder.loadit2.gotoAndPlay(2) ???
var wow:MovieClip = loadit2.content as MovieClip;
wow.gotoAndPlay(2) ????

View 3 Replies

ActionScript 3.0 :: Movie Clip Called CircleFill And Another Called CircleOutline?

Oct 30, 2007

I am having issues with startDrag(). I have a movie clip called circle. Inside circle, I have a movie clip called circleFill and another called circleOutline.onEnterFrame, this movieClip is duplicated 4 times.

When I use this:
private function onPressNow(event:MouseEvent):void
{
startDrag();
}
IT DRAGS ALL 4 MOVIECLIPS.

[Code]...

how can I make it drag my movieClip called circle? (meaning both circleFill and outlineFill)

View 8 Replies

ActionScript 3.0 :: Called InfoBox That Contains A Text Field Called Caption?

Oct 24, 2011

i have a box called infoBox that contains a text field called caption. infoBox expands on mouse-over. When it does so, I do not want the text in caption to scale up - I want it to stay at 11 pt. So far my code to prevent this from happening is not working:How do I fix this?[URL]..

View 2 Replies

Wordpress Based Site That Stores Information About An Image In A Database Field Called "background" In A Table Called "wp_postmeta"?

Jul 22, 2009

I have a wordpress based site that stores information about an image in a database field called "background" in a table called "wp_postmeta".The 'loader' gets an url such as "/thisImage/background.swf"The "background.swf" should somehow display "background.jpg" instead but since I've changed the field name in the database (from background to temp_background) it doesn't work.I pass variables to the "loader" swf and they are correct based on the new field name but it still isn't working.I need to know if there is anything in the .fla's (and therefore the .swfs) that is pointing to somewhere in the database hard-coded. Basically I need someone to look at them and tell me how they are working.

View 2 Replies

ActionScript 3.0 :: Target Path - Control A Movie Clip Called "nosotrosmc" With A Frame Label Inside Called "historia"?

Oct 5, 2009

i'm trying to control a movie clip called "nosotrosmc" with a frame label inside called "historia" but does not work this is the code:

[Code]...

View 2 Replies

Actionscript 3 :: Movie Clip Called Axeframe With Yet Another Movie Clip Called Axe

Aug 24, 2011

i have a movieclip on my stage called dude inside the moviclip is a frame with a movie clip called axeframe with yet another movie clip called axe. what i want to do is make a hittest in the axeframe a so that when the axe (only axe not the character) hits an enemy(named enemy) on the stage he will disappear. this is my code:

[Code]...

View 1 Replies

Motion Tween Causing Disappearances

Jul 1, 2009

I have a menu I'm building in Flash, the version with no animations can be seen at [URL]. I'm trying to make the block of text on the left tween in from the left. That block of text is a movie clip made up of three dynamic text boxes. Each text box reads in a variable from a text file. Ideally, what I want to do is have the tweening in the movie clip. However, when I add in a keyframe at any point in the movie clip, the dynamic text will display and animate up to that point and then disappear. Also, to mkae things more annoying, only the first of the three blocks will move at all. I can change the alpha or whatever I want to on that first one, but the others seem to be off limits. Could this be due to the fact that I set the second and third blocks to be just below the title block in action script? Does that interfere with tweening?

View 5 Replies

Professional :: HitTestObject Causing Loop?

Jul 15, 2010

Im using hitTestObject to start a mc playing, but it continues to loop even though there is a stop(); on its last frame.

]Code]...

The mc "rolly" is the one being looped.  Its animation is within itself (hope that makes sense) it is not looping the main timeline.

View 6 Replies

Javascript :: What Can Be Causing This Firebug Error?

Feb 3, 2012

I have this code:

<script>
function cargar(url){
var iframe = $('<iframe>');[code]....

That generates an iframe (containing a panorama viewer with JavaScript and Flash) and inserts it in a div.The thing is that this code, in local, Firebug jumps:

Elemento referenciado por ID/NAME en el ámbito global. Use el estándar del W3C document.getElementById() en su lugar.Element referenced by ID / NAME in global scope. Use the W3C standard document.getElementById () instead.And online it doesn't jump any error or warning but the script doesn't fully work: http:[url]... (the controls are missing and the autoplay is not ON)

View 1 Replies

ActionScript 3.0 :: URLVariables Causing 'URL Not Found'

Aug 26, 2010

[code]the external swf runs fine. This can only mean that the issue is being caused by trying to send the variables, or am I missing something?

View 3 Replies

ActionScript 2.0 :: AS OnRollOver / Out Causing Trouble

Oct 6, 2010

FLA in CS3 attached.Simple MC with over/out and onPress.All silhouettes have over/out. Silhouette on left initiates the animation.Black box in top left corner resets it.When a silhouette has been rolled over/out it does not follow timeline animation.{Rollover a single person then click left person to see issue.)I originally had the motion done in AS, but switched to timeline for trouble shooting.I'm trying to use more AS than timeline lately, so i hope someone can point me in the right direction. Also any tips in easier ways to do what i'm doing would be great... sometimes i feel like i'm taking the extended route.[code]

View 0 Replies

ActionScript 2.0 :: Causing A Movieclip To Self-destruct?

May 6, 2004

What's the code to make a movieclip delete itself?

View 1 Replies

ActionScript 2.0 :: Causing A Movieclip To Self-destruct

May 6, 2004

What's the code to make a movieclip delete itself?

View 1 Replies

Flash Button Causing Exe With Command Line

Mar 22, 2010

I want it so that when you click a button, it will run a multiplayer game and connect to a server, WITHOUT having any .bat or .exe files beforehand. So any new guy can rock up and connect, just as long as he has the game.

If you run Jedi Academy multiplayer like this:

jamp +set fs_game "japlus" +connect "193.155.0.5:29070"

It will run the game and connect to a certain server. The problem is, how do I get Flash to do that without any premade .exes with command lines?

The only other problem I can think of is, is it possible to run the game without knowing the directory the exe is in? In other words, could Flash find the game .exe if it was just given a name?

View 1 Replies

Font Causing Flash Crash On One Machine Only?

Mar 21, 2012

I have an issue whereby a new font (FFF Forward variant) installed on some machines works perfectly in flash (cs5.5) but on one machine causes an instant crash when the Type Tool is used.I know the font is the core of the problem but am unsure why it works on some flash installations (same versions) and not others?

I have tried every conceivable way of uninstalling/installing the font (even cmd prompt and safe mode!)I have flushed preferences files (obv inc typesupport folder)I have re-installed flash!I have even tried copying the prefs files from one of the working installations to the troublesome machine.I have run font verification and repair tools (nexus font, font creator, font val, font doctor, font lab...)No joy, still crashing

View 1 Replies

ActionScript 3.0 :: 10b.ocx Error Causing Browser To Crash

Apr 24, 2009

Environment: I am using Flash CS3 and targettting my application for Flash Player 9, I have installed Flash Player 10 on my machine. I am getting a flash player 10b.ocx error, which causes into crash of the browser. I am loading a bunch of images in this application. (20-30 at a time). using Loader class.

I have three questions: Is it the flash player error causing the browser to crash or something in my code is wrong?what possibly can go wrong in AS3 code to cause this error if it is not a flash player error?What could be the possible resolution for the same?

View 11 Replies

FLVPlayback Causing Slideshow To Loop Uncontrollably?

Jul 3, 2009

I can't seem to figure out how to get my slideshow to stop looping after I imported an external video. It will no longer stop at frame one, it simply plays all the way through the frames with no pause even though I have a stop(); on each frame.
 
The file functions properly until I added the FLVPlayback component.  It was looping even when the FLVPlayback component was in the library and exported for actionscript and in frame 1.  After unchecking these boxes it won't loop, however that all changes as soon as I drag an instance of the component on stage or inside a movie clip on stage.
 
The flash presentation I'm working on is designed so 1 frame is one slide and I need the video to be playable from 1 slide (frame).  Even after placing stop actions everywhere I could think of it still loops straight through with the FLVPlayback component. 

View 3 Replies

Flash Causing Screen To Flicker While Enabled?

Sep 23, 2009

when I enable my Adobe Shockwave Object my screen will flicker when i move the mouse around the screen.  I have uninstalled it and reinstalled but it didn't work. 

View 1 Replies

ActionScript 3.0 :: Structure Of Files Is Causing The Slow Down?

Oct 15, 2010

I'm getting extremely slow publishing in CS5 on win 7 - 64 bit. I've worked with the engineering team and no luck as to why. Then I was wondering if the structure of my files is causing the slow down? Would the fact that I seem to put most of my class and references in the DocClass cause a slow publish? I have a few files that it takes over 30 seconds on. I probably have one of the fastest computers in the world.

View 21 Replies

Flash :: Content Causing Background Re-draw In IE & FF3?

Jan 3, 2011

Whenever I include flash content on a page it causes IE & FF3+ to redraw the background.This does not happen in Google Chrome, Safari, or FF2.
 
On every page of my site there is a small flash animation that is in a hidden div.  That flash content become visible and plays on a mouse-over event.  That all works fine.  However, in the above mentioned browsers, that flash content causes the site's background to be redrawn on every page-load, causing a flicker.  Is there any way to prevent this?  A google search revealed other people having the same issue, but no resolution.

[Code]...

View 1 Replies

ActionScript 3.0 :: What Causing Tween To Stop Before Completing

Feb 5, 2011

Is there a bug in the as3 tween class that causes tweens to stop before completing. I read that there is and that a 3rd party tween class should be used. I'm just starting out learning as3 and experimenting but this would be good to know when I move onto more complex projects. Also the solution for this was to make your function global. Does this simply mean place your function in the top level of your movie.

View 5 Replies

ActionScript 3.0 :: FileReference.save() Causing Crash?

May 16, 2011

I'm currently using the FileReference class to allow users of my program to save and load files from their PC. I'm currently trying to get the save function to work (I'll do load later) and it all seems to be working perfectly but while testing it (locally) it crashes Flash Player every time it saves.
 
The code is pretty simple just now (this is contained in an event handler which triggers when the save button is pressed):

var levelData:String = GetLevelData();var outputFileName:String = "NewLevel.txt";
saveFile = new FileReference();
saveFile.addEventListener(Event.COMPLETE, SaveCompleteHandler);
saveFile.addEventListener(IOErrorEvent.IO_ERROR, SaveIOErrorHandler);
saveFile.save(levelData, outputFileName);

And it all works fine - the NewLevel.txt file appears where I want it to and contains the correct data. But as soon as this has completed Flash Player quits and I get the 'Flash Player Quit Unexpectadly' message. There are no errors in the output from my code. The SaveCompleteHandler function has been called and the SaveIOErrorHandler function has not.

Could this be a bug in Flash player? I'm using a Mac and have encountered a few bugs with the Mac version so I wouldn't be surprised if this was another one.

View 1 Replies

ActionScript 3.0 :: TLF Causing Loaded SWF's Method To Be Inaccessible

May 16, 2011

I have a preloader SWF that, depending on flashvars passed to it, will load an external SWF.  The secondary SWF would load but wouldn't have any of the public functions available to the preloader.  After extensive trouble shooting, I discovered that it was an issue with teh TLF text field I had created in the secondary SWF.
 
The secondary SWF will play perfectly as a stand alone with the TLF, and the secondary will load perfectly into the preloader SWF with all available public methods, but only after I change the TLF field to a classic text field.

View 3 Replies

Flex :: Why SWF Causing Flash Player To Crash

Aug 6, 2009

I've got a flex-based swf, which is loading an AS 2-based swf and then, negotiating further activity via a LocalConnection. From time to time, the AS 2-swf can request that the flex-based swf load a movie. I've arranged this via on(release){} functions. The AS 2-swf, I'm making in Swish Max. In Swish, when I set the on (release) on a text field, (to invoke .send() on my localconnection), it works splendidly. However, when I attempt to perform the same calls for an on(release) attached to a movieclip, it actually causes the Flash player, and even the browser plugin to crash. In fact, the browser (IE) crashes as well. I checked the debug trace that ie asked me to send to microsoft at the last IE crash, and i noticed a StackOverflow exception embedded deep in the trace, but I couldn't determine its source.

View 5 Replies

Flash :: KeyboardEvent Listener Causing TypeError?

Feb 8, 2012

I'm getting this weird error, don't know why, I've reduced the code to minimum and found the source of the problem but I don't understand why it errors.

Main.as
package {
import flash.display.MovieClip;

[code].....

View 3 Replies

ActionScript 3.0 :: RotationY And RotationX Causing A Flickering?

May 26, 2010

I'm using(tweening) the rotationY and rotationX properties on movieclips a layer above a background, bitmap or video, in two respective projects. There is a flickering of the movieclips and some bizarre distortion going on. I can't seem to find anything on the web about this, -has anyone else encountered this problem? Is it a known bug? Is there a workaround?

View 2 Replies







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