Questions tagged [enterframeevent]

EnterFrame event is used in ActionScript programming. The main purpose of this event is to generate animations pro-grammatically. This event is triggered based on FPS (i.e Frames Per Second) a term used in animation. e.g. Say FPS=30 fps, then this event will be triggered 30 times per second thus simulating frames.

37 questions
14
votes
7 answers

Flex profiling - what is [enterFrameEvent] doing?

I've been tasked with finding (and potentially fixing) some serious performance problems with a Flex application that was delivered to us. The application will consistently take up 50 to 100% of the CPU at times when it is simply idling and…
Herms
  • 37,540
  • 12
  • 78
  • 101
5
votes
2 answers

in AS3, removeEventListener(Event.ENTER_FRAME) is not working

I have been dealing with this problem for days already. I am at my wits' end! I can't seem to find a definitive answer anywhere on any of the forums, documentation, etc. Everything looks fine at first run, or when I load a next level for the user to…
3
votes
3 answers

check keyboard state without using KeyboardEvent in AS3

Is it possible to check for pressed keys without using the KeyboardEvent? I have an ENTER_FRAME event setup called enterFrameHandler and I want to check within the function enterFrameHandler if any keys are pressed. normally when using a…
Pieter888
  • 4,882
  • 13
  • 53
  • 74
2
votes
1 answer

AS3EnterFrame event propagation understanding issue

I have trouble understanding the path the EnterFrame Event takes for Propagation. I understand that Events have 3 Phases: Capturing, AtTarget und Bubbling. When I look at the flash.events.Event class I see that Event does not Bubble. If I add an…
2
votes
2 answers

Which Is More Efficient, Embeddeing an FLV or Compiling an FLV to a SWF and Loading it Dynamically?

Recently I took on a rather daunting task of creating an interactive music video for the popular show Ghost Whisperer. I was brought in late in the project and was confronted with a giant authoring file (some 5000+ frames long). The previous…
2
votes
1 answer

AS3: Loop in enterframe/s

I have 6 objects that have to move randomly and continuously. Is it efficient to enterframe each object seperately or 1 enterframe with loop addressing all objects. var myObjArray:Array = new Array(); // Contains 6 movieclip objects for(var i=1;…
Muhammad
  • 425
  • 1
  • 6
  • 14
2
votes
1 answer

How can I specify ENTER_FRAME so that the object enters on every 4th frame?

So the ENTER_FRAME property will add an object to the stage on every frame the game runs. If the game is 24 fps, 24 objects created per second. How can I limit that so it will generate an object every 4 frames?
GivenPie
  • 1,451
  • 9
  • 36
  • 57
1
vote
3 answers

AS3 Make enemy move towards mouse

package { import enemies.Enemy; import flash.display.Sprite; import flash.events.*; public class Main extends Sprite { // a place to store the enemy public var enemy:Enemy; private function handleEnterFrame(e:Event):void { …
1
vote
1 answer

Making a DragDrop class on as3

I'm making a DragDrop class on as3. I'm trying to make movable movie clips "stick" to a target MovieClip. I've got the basic drag drop and positioning/sticking to work but when I try to create an "easing" effect using Enter Frame, somehow the movie…
chb382
  • 13
  • 3
1
vote
2 answers

Is there an equivalent of EnterFrame event in Expression Blend/WPF, If not how do we get around it?

i am moving from AS3 and Java to Expression Blend/WPF, but cant seem to figure out how to replicate EnterFrame event in C#, is there a update() or frameUpdate() function.
1
vote
1 answer

Why EnterFrame occurs before refreshing the screen in Flash

Suppose we have an animation in Flash with 1 fps, where each frame has a script that runs 100 ms. As far as I know, the animation in Flash works as follows: 0ms: Begin executing Frame 1's frame script 100ms: Finish executing Frame 1's frame…
Georgii Oleinikov
  • 3,865
  • 3
  • 27
  • 27
1
vote
1 answer

dispatchEvent or checking variable every frame? What's better in a simple parent-child-relationship?

Say I have a parent- and a child-object. At some point a variable (boolean) in the child changes and the parent needs to notice. Now, is it performance-wise cheaper to let the child dispatch an event once the variable has changed, or to have the…
0
votes
1 answer

How do I create automatic scroll for a Parallax then switch to mouse control Event?

stage.addEventListener(Event.ENTER_FRAME, loop, false); function loop(e:Event): void { if(scene.x <= -10 && scene.x >= -9200) scene.x -= (this.mouseX - 490) * speed; { if(scene.x > -10) scene.x = -10; if(scene.x < -9200) scene.x =…
joemidi
  • 43
  • 13
0
votes
3 answers

A loop in enterframe?

I'm animating a bunch of words in AS3. Because I'm going to be using this on a mobile device, I want to use bitmaps rather than Sprites. So I've created WordObjects, which have a .bitmap property that I can access. I have the following code, which…
David
  • 703
  • 1
  • 15
  • 31
0
votes
1 answer

AS3: Delay Enter Frame Animation

I've got a fade out animation using ENTER_FRAME. I want the fade out to start after 2-3 seconds. How can I create this delay? txtAlert.addEventListener(Event.ENTER_FRAME,animAlert); function animAlert(e:Event) { if(e.target.alpha>0) { …
Abdulla
  • 1,117
  • 4
  • 21
  • 44
1
2 3