Flash :: Change Player Collision (b2PolygonShape) At Runtime And Maintain Body Position

Oct 26, 2011

I have a main character in my Box2d game that has a b2PolygonShape collision. When the player crouches I am changing the body to a smaller b2PolygonShape. The logic works fine, but when I change the size (height) of the collision the character starts to fall.

Is it possible to create the new body with an offset (localPosition?) so the position of the body stays the same? This way I can play the crouch animation and change the collision without worrying that the position will change and make my sprite go bananas.

View 1 Replies


Similar Posts:


Flash :: Maintain Camera Position While Zooming Out?

Aug 16, 2011

I have a container full of tiles and other assets that serves as the map. On top of that container is a mask that serves as the camera the player sees through. In order to move the camera around I move the container around.I'm able to center on a tile within the container using the following formula:

container.x = ( ( (tile.x + (tile.width / 2) ) * container.scaleX) * -1) + (mask_width / 2);
container.y = ( ( (tile.y + (tile.height / 2) ) * container.scaleY) * -1) + (mask_height / 2);

This moves the container into position relative to the mask such that the center of the mask will be the tile in question.I recently added the ability to zoom, which just adjusts the scaleX/scaleY of the container to make it bigger or smaller. I've already fixed the centering code above to account for it, but I'm having trouble making it so the "camera" doesn't appear to move around as the view shrinks. Basically, when zooming out everything appears to move to the left, because the container shrinks. It's all fine once I center on something with the code above, but I need a way to bump the container over to the right a bit based upon the difference in scaleX and scaleY to keep everything looking like it's in the same position while zooming.

View 2 Replies

Flash :: Get Position Of A Static Body?

Apr 14, 2011

I have a Box2D world with a mixture of static and dynamic bodies. On collisions, I can only get the positions of the dynamic ones.

Is it possible to get the positions of static objects?

N.b., this is a development of a previous question, Box2D: How to get the position of a sensor?

View 1 Replies

Difference Between The Flash Player Runtime And Adobe AIR Runtime?

Nov 16, 2009

I've been into coding for about 5 years now, but I'm a recent convert to Flash development. One of the questions I have at the moment is, considering that SWF files can be run by either Adobe Flash Player OR Adobe AIR, what's the real difference between the two runtime environments? What API's and Objects exist in one environment, but not the other?

Basically what I'm more or less trying to establish is, when would I want to develop an SWF for AIR, and when would I want to develop for Flash Player, considering that Flash Player can also execute locally (providing support for creating "desktop applications")

View 1 Replies

ActionScript 2.0 :: Change Body Background From Within Flash

Jan 15, 2003

is there a script that alows you to change the backgroundimage you use in your html from within flash?

View 14 Replies

ActionScript 3.0 :: Change The Color Of The Body Of My Fish.png To A Colorpicker SelectedColor?

Jul 1, 2009

what i'm trying to do is to change the color of the body of my fish.png to a colorpicker selectedColor.but then i'm encountering problem with the floodfill method...Whenever I pick a color, it would change the body to transparent.and there seems to be little information, hence my posting here.. fishfishfish is the linkage of fish.png in library.

import fl.controls.ColorPicker;
import fl.events.ColorPickerEvent;
import flash.events.*;[code]......

View 2 Replies

Runtime Error Window Fails To Pop Up In Flash Player 10.3.181.34 Debug

Jul 6, 2011

I've installed the latest debug version of Flash player plugin for Mac OS X. Diagnostic page [URL] confirms that the version of Flash plugin detected is debugger one. I'am also able to debug applications using Flash-builder debugging tools. But no runtime error pop-ups are shown during browsing. Does anyone have the same problem? Does anyone know how to fix this strange behavior?

I've tried to uninstall the player using this application [URL] and reinstall Flash player again, but no luck.

UPD1: I've created additional user account and found out that error pop-ups are displayed successfully when switched to that account. So it's likely user-profile configuration issue.

View 1 Replies

Runtime Error Window Fails To Popup In Flash Player 10.3.181.34 Debug?

Oct 27, 2011

I've installed the latest debug version of Flash player plugin for Mac OS X. Diagnostic page [URL]that the version of Flash plugin detected is debugger one. I'am also able to debug applications using Flash-builder debugging tools. But no runtime error pop-ups are shown during browsing.I've tried to uninstall the player using this application [URL] and reinstall Flash player again, but no luck.

UPD1: I've created additional user account and found out that error pop-ups are displayed successfully when switched to that account. So it's likely user-profile configuration issue.

View 5 Replies

Flash :: Change Shape Border Stroke Runtime In It?

Sep 28, 2010

I've got a complicated shape in a MovieClip.Runtime i want to change the stroke width of this Shape depending on a size ratio.

How can I change this property without redrawing the entire Shape with the drawing API (almost impossible, is a map with very detailed borders) ?

View 1 Replies

ActionScript 2.0 :: Change Flash Movie Size During Runtime?

Sep 5, 2006

I have seen this on some site, so there must be a way of doing this. How do you dynamically change a flash movies dimension during runtime? For example, the forum nugget is working on I noticed that the height of the flash forum dynamically grows as the thread getslonger...because I can see my browser scroll bars appear. How can this be achieved?? his seems mind buggling to me, because you have to set a flash movies stage dimensions before publishing and the html has the flash dimesions too, so I don't get how this is being done

View 4 Replies

Flex 4 :: Flash Change Theme Dynamically At Runtime / Not At Compile Time?

Dec 9, 2010

flash builder 4 comes with a couple of cool spark themes, and there are tons of others out there on the web, I want to be able to change the theme at runtime, without recompiling.

View 1 Replies

ActionScript 3.0 :: Platformer (Collision Between Player And Terrain)

Nov 6, 2010

I'm doing a project at the moment where I am creating a side scrolling platformer in AS3. Currently I have:

-The "Character' which is a ball that can be controlled using the arrow keys and has bounce, friction, gravity etc.
-A scrolling system, the character can move freely within an invisible inner boundary, once the character leaves this boundary the background will scroll to compensate.

The thing I am having issues with is creating collision detection between the "Character" and the "Background.Ground" so that the character can move along the shape of the Ground movieclip within the background movieclip.

Actionscript Code:
package{
import flash.display.Sprite;
import flash.events.Event;
import flash.display.MovieClip;
import flash.display.Stage;
import flash.geom.Transform;
import flash.events.KeyboardEvent;
[Code] .....

View 21 Replies

Flash :: Professional - Player Remember Window Position After Exit?

May 18, 2010

How about make the Flash Player remember window position after exit? So that it opens in our preferred position everytime?

View 1 Replies

Professional :: Change Stage Position In Flash?

Sep 4, 2011

I didn't find that my flash is larger than the browsering area on screen  until I publish and preview it in my browser but I do want all the content to be displayed on the screen. All I need to do is to move everything up for about 150 px.(in other words, to shorten the stage by 150 from the top but I can only cut the stage from the bottom ) Is there a way I can change the position of the stage like what I can do to the artboard in AI?

View 4 Replies

Flash :: Change Position Of Registration Point In CS5?

Sep 13, 2010

Is there a way to change the position of the registration point inside a Movie Clip using Flash5 ?I've found stuff online for older Flash versions but not CS5.

View 2 Replies

Flash :: Professional - CS5 - Position X / Y Coords Change By Themselves After Typing

Sep 20, 2010

I've been working in CS5, with an older FLA I originally built in CS3. On the timeline, I have different MCs and button symbols which need to stay in the same coordinate position. Usually if I notice some sort of 'wiggle', I will go and check the position coords by hand, updating the x/y position by typing numbers directly in the Properties panel.

However today, I repeatedly saw the coordinates change -by themselves- after I typed and hit Enter. For example, typing '165' in the Y field changed immediately to '164.95'. With one symbol, this behavior continued, no matter what I typed, with the number changing by 10 pixels sometimes, every time I just selected the symbol. Not only was I not able to keep the symbols at the same coords (I tried making  them all 164.95), the 'automatic decimal' numbers would actually change further, as I was trying to correct them. I was only able to resolve this by creating an entirely new MC symbol in the Library, and placing it on a new timeline layer.

I've noticed this sort of behavior before in CS3 and CS4 (the CS4 Alpha slider never wanting to go to 0 or 100%), but never to this extent, or as consistently. It's gone from an annoyance to a genuine problem in my workflow.

View 1 Replies

Actionscript :: Change Dynamic Text Position In Flash?

Aug 25, 2009

I have a *.fla that gets its data from a xml file with some nodes.

What I really want to know is how can I change my text x and y positions via AS?

View 1 Replies

Flash :: Change Position Of A Display Object From One Point To Another?

Feb 15, 2012

A display object container on the stage has some bitmap images of sizes 50x50 arranged in a order one by one. Now if i click on any of the thumbnail image (bitmap) the entire container should move and position itself so that, the bitmap image clicked is placed in the center of the stage.

View 1 Replies

ActionScript 3.0 :: Record The Current Position Of Any Of The Items Item In Order To Use That Data To Change The Position Of The Item After The User Clicks?

Jan 2, 2010

If I have several items that move across the screen but the user can click any of them at any time, how do I record the current position of any of the items item in order to use that data to change the position of the item after the user clicks?

This is what I am doing: I have 11 images that slide accross the screen. The user can click any of them at any time. When he clicks one I am scaling the image so it looks like it is comming forward (z axis) and then the rest of the images are scaled down so it looks like they are going back on z axis. So what I am trying to do is get the current position of the image when the user clicks the image so that I can use that to correctly estimate the scaling and moving of the image to make it look like it scales from the center and not from the top left corner. So if have a variable that gets the current position of the image being clicked I'm thinking I can change its position using something like: x = currentposition + -45;

View 9 Replies

Flash :: Which Video Player Can Give Exact Position (timestamp / Frame Index) Information

Dec 18, 2011

I'm looking for a Flash Video Player (something like JWPlayer) that I can embed in an html page, that provides a JavaScript API with a method to get the exact timestamp (aka position, or frame-count) for the current frame.

View 1 Replies

Change Controls Position / Add Fade Out Effect In Flash Playback?

Oct 26, 2010

I'm importing a video in flash cs5, using actionscript 3.0. I have copy the SkinOverPlay.fla and i'm changing it to fit my needs. I am looking for just a play/pause button (no other controls) in the center of the screen that disappear when the mouse it out of the video. How to play the video in loop.

View 1 Replies

Flash :: Dynamically Change The Width / Position Of A Timeline-animated Mask?

Jan 27, 2010

I've got a movieclip with two layers - a background movieclip, and above that, a mask movieclip (as you might guess, this layer is masking the first). Due to design necessity, the mask is animated on the timeline across 60 frames.The problem arises when I use an Event.RESIZE listener to change the width of the parent movieclip when the browser window is resized. Any code to reference the mask, i.e

parentMC.contentMask.width = stage.stageWidth;
parentMC.contentMask.x = frame.width/2 - frame.contentMask.width/2;

Simply results in the mask animation not playing at all.

View 1 Replies

Professional :: Possible To Change Fps During Runtime?

Mar 16, 2010

I was wondering if there is a way to change fps(Frames Per Second) during run time using AS3.is there? if so is it recommended? or is there a way to slow down the execution of the code(like adding a pause?)

View 5 Replies

ActionScript 2.0 :: Change Fps In Runtime?

Oct 27, 2003

Is possible to change fps in runtime ?

View 3 Replies

Flash :: Maintain Image Quality In It?

Jan 27, 2010

What's the best way to maintain image quality in Flash.

The images in this  banner gallery just don't look as good as they do on my computer.

Is there a way to embed color profile in the Flash import?[url]...

View 1 Replies

Flash :: Maintain A LineTo Between Two Points In AS3?

May 5, 2011

I'm looking to work out the most efficient way to maintain the joining of two points with a line in AS3. Basically, I have a whole bunch of circles that move around, and have a property subNode which will act as an end point for the line. At the moment, the way I'm doing it is extremely intensive:

[Code]...

View 1 Replies

ActionScript 2.0 :: Flash MP3 Player Can't Change From Autoplay

Nov 12, 2009

I recently built an MP3 player from an online tutorial and althought the player works fine, it auto plays, and I really don't want it to?[code]...

View 2 Replies

ActionScript 3.0 :: Will New Flash Player 11 Change Things

Oct 15, 2011

Do you think the arrival of the new Flash Player 11 which is much more powerful allowing to render 3D games much faster will change the flash world significantly?Will we see a whole new era of 3D everywhere? new 3D games on the web, new 3D games on facebook, new 3D stuff everywhere... new IDEs for the 3D capabilities? a boost in the flash 3D engines such as Away and Alternativa? And most importantly for developers, is it going to create a lot more job oportunities for specialized developers with new skills?

View 5 Replies

ActionScript 3.0 :: Change Attribute Name At Runtime?

Jun 29, 2010

How can we change the attribute name ows_Attachments to Attachments in runtime ??

ActionScript Code:
<rootNode>
<data>
<row ows_Attachments="0" ows_LinkTitle="1" ows_productNo="1" ows_purchaseDate="2010-06-09 00:00:00" xmlns="#RowsetSchema"/>

[code]....

View 2 Replies

AS3 :: Maintain Aspect Ratio In Flash Video?

May 9, 2011

I have created a flash video player using as3 (videoObject) but when I play the video the video is streched how to tell flash using as3 to maintain aspect ratio.

View 2 Replies







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