Actionscript 3 :: Box2d Is Freezing When EnableMotor Is Set To True On A Revolute Joint

Dec 8, 2011

I have a strange bug in an box2d project(AS3, box2d 2.1a).

I have a dynamic rectangle and a small static circle overlapping. I create a revolute joint to those 2 objects(located inside the center of the small circle, point which is also inside the rectangle). If enableMotor is set to false when the joint is created the scene works perfectly, with the rectangle hanging. When I set enableMotor to true the scene freezes.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Joint Several Flash Files?

Feb 4, 2011

I have a very big proyect completelly developed in FLASX MX PROFESSIONAL 2004. In order to manage it, I have divided the file in several parts. What I want to do now is to connect that parts and compile them as a Whole.

View 2 Replies

ActionScript 2.0 :: Controlling MovieClip With Joint Variable Name

Apr 18, 2009

This one works:
Code:
SomeNumber1 = new Number(1);
SomeNumber2 = new Number(3);
object1_subObject3._alpha = 50;

And this one doesn't:
Code:
SomeNumber1 = new Number(1);
SomeNumber2 = new Number(3);
this["object"+SomeNumber1+"_subObject"+SomeNumber2]._alpha = 50;
If I try to trace the "movie clip" in the second code I get "undefined"....

View 1 Replies

ActionScript 3.0 :: ButtonMode = True; .useHandCursor = True; Only Works On Half Of The Button?

Sep 4, 2009

about.buttonMode = true;
about.useHandCursor = true;

I have this on a MC I use for a button - and it works but only on HALF of the object - how can I make so it works on the whole object itself?

View 1 Replies

ActionScript 2.0 :: If Condition - (condition1=true) AND (condition2=true)?

Jun 11, 2004

I know how to do this in other codes, but..if (condition1=true) AND (condition2=true) then... How do you do this in AS?

View 5 Replies

ActionScript 3.0 :: How To Use Box2d

Oct 18, 2010

how to use Box2d?

View 4 Replies

ActionScript 2.0 :: Read "true" As True?

Nov 18, 2003

I am pulling the words "true" and "false" from a query, but in flash I need them to be the values of true and false, not strings, is there a way to convert this datatype?

View 3 Replies

ActionScript 3.0 :: Box2D HelloWorld With No FLA?

Aug 20, 2010

I recently did a quick demo on my site of Box2D (Box2DFlashAS3) with source code. Its basically just the HelloWorld example from the v2.1a distribution, but with a few tweaks. The most notable is that my version does not require a Flash FLA file to compile and run, its pure AS3. Simple and a good base to build on:

http:[url]........

View 3 Replies

Professional :: Box2D Not Working On IOS?

Dec 17, 2011

Anyone know how to get BOX2D physics engine working on iOS? It seems to work on the adl tester but not when I actually test it on the device.

View 1 Replies

Flash - Paddle Movement Using Box2D?

Jan 3, 2011

I'm making a game like Arkanoid and to move the ship with mouse, I'm using the following code :

var mousex:int = costume.stage.mouseX;
if (mousex < paddleWidth/2)
mousex = paddleWidth/2;
else if (mousex > PhysiVals.STAGE_WIDTH - paddleWidth/2)

[code]....

Everything's going fine there! The paddle is moving the way it should! The problem is I want a little inclination towards the direction its moving and when it stops moving the angle of inclination should become zero.

View 1 Replies

Box2D - How To Make Conveyor Belt

Mar 2, 2011

Here: Flash game
There is a flash game called garbage separator. In this game, there is a conveyor belt.
With 2 Circles you can move the conveyor and I think you can use boxes with joint for belt but i dont know how to give it the form:
Circular Form
How to do this with Box2d?

View 1 Replies

Box2D - How To Get Position Of Static Object

Apr 14, 2011

I'm using sensors in a Box2D project. On a collision with a sensor, I'd like to know the sensor's position in the world. I'm detecting the collision with a contact listener, but the sensor's position is always 0 0.

From my code: (edit, added the whole class)
public class MyContactListener extends b2ContactListener {
public var onSensorEvent:Function;
override public function BeginContact(contact:b2Contact):void {
if(contact.GetFixtureA().IsSensor()) {
var ud1:GameEntity = contact.GetFixtureA().GetBody().GetUserData();
[Code] .....

View 1 Replies

ActionScript 3.0 :: Box2D How To Display Graphics

May 17, 2011

I have one question for your.This code I took from the site

ActionScript Code:
package {
import flash.display.Sprite;

[code]......

View 6 Replies

ActionScript 3.0 :: Click Over An Object In Box2D?

Nov 30, 2010

I need to click over an object in Box2D. Need to know which object i have clicked, and to delete that object. How could i know, which object i have clicked?..

View 1 Replies

ActionScript 3.0 :: Flash Box2D & 2D Shadows

Jul 24, 2011

I'm working on a AS3 Game Engine at the moment utilizing Box2D (2.1a) and 2D shadows. I have Box2D down but I've yet to find a way of drawing 2D shadows efficiently.I was following this tutorial only to be disappointed by the speed at which it rendered the Box2D shapes and the shadows.I was getting the vertices of the objects via this function:[code]And using it to draw the shadows via the AS3 graphics api.Can anyone recommend me a better more efficient way of programming 2D shadows?

View 2 Replies

Freezing The Flash Movie In A Pop-up?

May 21, 2009

I have created 2 Flash movies in the form of a slideshow. The flash clips are embedded in the webpage that I was modifying and it works perfectly fine. What I would like to do is to allow users to be able to click on the flash image in the web pages. Once clicked, a new pop-up window will appear and it will show the freeze image of the flash that was being clicked at the moment. Currently I am only able to make the new pop-up window and the flash still played through itself in it while I need it to freeze and be static.

View 4 Replies

Professional :: SWF Preloader Freezing In IE

Jul 1, 2011

My web page, which contains a SWF using AS3 opens great in Chrome, Firefox, & Safari. When I open the page in Internet Explorer it freezes on the preloader for some reason I can not figure out.

View 3 Replies

IDE :: Freezing The Flash Movie In A Pop-up?

May 21, 2009

I have created 2 Flash movies in the form of a slideshow. The flash clips are embedded in the webpage that I was modifying and it works perfectly fine.

What I would like to do is to allow users to be able to click on the flash image in the web pages. Once clicked, a new pop-up window will appear and it will show the freeze image of the flash that was being clicked at the moment.

Currently I am only able to make the new pop-up window and the flash still played through itself in it while I need it to freeze and be static.

View 2 Replies

ActionScript 3.0 :: Selectedcolor, True To The Text True Or False In The False Print Text?

Aug 28, 2010

Selectedcolor, true to the text true or false is false text into print.colorPicker component in, I select Export to a selected color, the color value myMC texte into summer, but accuracy can not control.

var myColorPicker:ColorPicker = new ColorPicker();myColorPicker.editable = false;myColorPicker.visible = false;myMC.visible= false;myColorPicker.addEventListener(MouseEvent.CLICK, clickHandler);myColorPicker.addEventListener(ColorPickerEvent.CHANGE, changeHandler);[code].........

View 1 Replies

Actionscript 3 :: How To Achieve A 1:1 Display Of Box2d Data

Nov 7, 2010

Anyone know how to achieve a 1:1 display of box2d data?I'm dividing all my values by a Physics.Scale value (30) but boxes I create like this:polyDef.SetAsBox(640 /Physics. scale, 32 / Physics.scale);Are still showing up much larger than 640 pixels wide and 32 pixels high.Weirdly, my AABB for the world is showing up perfectly at 640x480.[code]

View 1 Replies

Actionscript 3 :: Box2d - How To Find Nearest Bodies

Feb 5, 2011

I am trying to detect bodies which are near current. To do it, I've created quite a big collision shape, around the current body, and made it sensor. Collision event was triggered, but it's not what I need. Main thing is that collision event is called only first time when another body entered the detection field... And I want to be able to detect changes in bodies location, after it. (I am considering the fact that other bodies are moving inside detection field)

View 1 Replies

Flash :: Change Center Of Rotation Box2d?

Feb 13, 2011

I have a b2PolygonShape body and apply a force to it.

_recbody->ApplyForce( b2Vec2(6.0, -6.0), _recbody->GetWorldCenter() );

I want to change the centre of rotation of the body to be more in the front of the body. So that applyForce and also collisions make the body not turn in the centre but more in the front.

View 2 Replies

Flash - Drawing Custom Polygons In Box2D?

Apr 14, 2011

I'm making a Flash game, and I've encountered a really weird problem while trying to draw a polygonal shape in Box2D.

Here's the code I use:

var fixtureDefs:Array = new Array();
...
var fDef:b2FixtureDef = new b2FixtureDef();
fDef.density = 0;

[code]....

Where vertexArray is a valid array containing 4 b2Vec2 vertices, making up a convex shape.The problem is, when I test, collisions don't work right for that body. Most other objects -enemies, user-controlled characters - pass straight through, as if the body isn't there at all. Some raycasts pass through as well.

Infuriatingly enough, one kind of bodies I have (a custom enemy) somehow does detect the body and collides with it. The raycasts that particular kind of enemy attempts do work - when your character hides behind the polygon, it's like they can't see him.The other weird thing: when I try the same code, only go for SetAsBox instead of SetAsArray, it works exactly as it should.I'm using a custom ContactListener class, but I haven't done any contact filtering (unless it's possible to do that without realising).I'm using the Flash 9 version of Box2D 2.1a.

View 2 Replies

Rotating And Throwing Objects Using Flash And Box2D 2.1a?

Jul 26, 2011

i'm using flash with box2D 2.1a. i'm rotating ball hanging on the string. The path which the rotating ball trace is ellipse. When releasing the rotating ball from the string i want the ball to fly with the obtained direction, velocity and strength. As you can see in the pictures.[URL]..I've tried to do it with setPosition (method of b2Body) and with various joints. But I haven't got the needed results.

View 2 Replies

Flash - How To Climb Up Or Stick To Other Objects In Box2D

Jan 12, 2012

I know that trying to model character movement in Box2D is always hard/impossible, but I'm trying to see if there's any way to make an user-controlled object that cleanly slides against other objects, going up or down, that makes it look like the character is climbing/walking up or a down. The character could be modelled as a circle if that simplifies matters, but I don't see how I could get this effect using just a circle with a joint motor.

There's a "wheel joint" in the C++ version of Box2d, which I suppose I could port to Flash, but I don't know if that would give the correct effect either. Another idea I had was to have the character do little jumps, based on the normal of the object that it is touching. But I suspect that at corners, or at contacts with multiple objects, this will give weird results.

View 1 Replies

Flash :: Box2d Body Shape Modification?

Jan 13, 2012

Is it possible to modify a shape within a body after assigning it, for example I have a box shape for my game hero body, and when I press the down arrow I want my hero to crouch witch means that I need the body shape to be resized.

I've already searched in google but it appears that the topic of modyfing shapes is not so popular. If it's impossible maybe you know a better way of doing this.

View 1 Replies

ActionScript 3.0 :: Box2D Collision Categories - How To Work

Jan 13, 2011

I still have problem understanding how the collision category works. I'm only able to make it work by experimenting which is not good.

[Code]...

this works the way I wanted but only because I experimented around and found the right values (or at least values that work). I would prefer to know how the whole system works

View 6 Replies

Cs5 :: Flash Freezing When Clicking Between Applications

Jun 28, 2010

Flash seems to crash/freeze when clicking through to other applications.

i cant get any work done because its crashign all the time.

View 2 Replies

Professional :: SWF Exports Freezing Completely?

Nov 20, 2010

I have a project I am working on, it has zero coding most all symbols are graphic because it seems the movie symbols don't export correctly. I export it to swf and it hands 100% of the time when it is at about 80% complete. I have gone back in and optimized tons of it, and it did not change a thing.

View 3 Replies

Actionscript 3 :: Load Content Without Freezing?

Apr 7, 2012

I have a loader that loads main application. Everything works fine, except one issue:

When main application is loaded, animation in loader freezes for few seconds (5-8). I think during these 5-8 seconds main application creates it's objects.

I tried to minimize number of objects in main application and it did help a bit, but freezing problem is still there.

How to load content without freezing?

View 1 Replies







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