Flash :: Add Acceleration To Limited Movement?

Dec 18, 2011

For a maze game, I'm trying to add acceleration to the movement of my character.Because the character shouldn't walk through walls, the movement function and hittest are in the same function.

I tried adding the acceleration in if statements in this function, but that doesn't work properly. [code]...

View 1 Replies


Similar Posts:


Professional :: GPU Acceleration In Flash?

May 14, 2010

I'm working for a company who is using flash to play HD media. Right now, the systems they are having to buy to play the media conent must have relatively decent CPUs in them due to flash relying mostly on the CPU.  With the flash 10.1 beta there is now obviously a focus on GPU acceleration and we are quite excited about this as it could considerably drop the cost of each of our hardware units.  We have tried some tests thus far however it appears that our flvs are not taking advantage of the GPU acceleration.  The only way I know how to test this is by enabling/disabling the hardware acceleration from the settings menu in flash and then restart the browser to be sure the setting has changed. 

I am assuming that our flv is perhaps not encoded in a format that flash will be able to use hardware acceleration for however I am not completely sure of this.  The media encoding is not part of my job on this project howeve I am tasked with the testing of the flv's on carious hardware.  Is there a specific codec that needs to be used or a way of encoding the flv so that flash player 10.1 beta can play the video with hardware acceleration?

I don't know the ins and outs of the encoding process that is currrently being used, but I will pass any infomation gathered here onto our media guys and developers.  I do know that using the flash 10.1 beta on youtube I can play 1080p videos fullscreen using nVidia GPU and an intel atom cpu without any issues with the hardware acceleration on.  WIthout it, the cpu hits 90+% and the video is way to choppy to be of use so hardware acceleration is definitely working there.

View 2 Replies

Flex3 :: Flash Hardware Acceleration Also In Sdk?

Sep 9, 2011

in the adobe flash publish settings i spotted a setting called "Hardware acceleration" with these options:

-None
-Level 1 - Direct
-Level 2 - GPU

now my question is, if you dont use flash to compile your swf but rather flex sdk, can you also enable these accelerations?

View 1 Replies

Flash 10 :: Possible To Check Hardware Acceleration?

Sep 22, 2010

Is possible to check by actionscript if h.264 video playback is using hardware acceleration?

View 0 Replies

Flash :: Get GPU Acceleration For H264 In An Adobe Air Fullscreen App?

Jul 16, 2010

I'm toying with an Adobe Air app that plays quite large movies. I want to run it on a 1920x1080 display connected to a Mac. Unfortunately, the movies tend to stutter and I'm betting that happens because I'm not using HW GPU acceleration for H264 playback.

Most of the player code is ported (aka copied) from a web player I built and which runs very smooth on the Flash Player from the browser. So the code shouldn't be the problem.

In the Flash Player, to use GPU acceleration in a fullscreen mode, you have to set the Stage.fullscreenSourceRect property. However, this doesn't seem to work in Adobe Air...

View 3 Replies

Flash :: Component Livepreview Limited To 160 X 160px?

Feb 21, 2011

One of my troubles so far isn't a big one, but the livepreview has being limited to 160px wide and high.. how to get rid of this limitation?

Edit: I've been following this tutorial and made the menu strip. In the livepreview, as it gets wider, it gets cropped. Then, I made another one, for the sake of certainty, and found out that the problem persists.

I've made a box with adjustable width and height.

View 2 Replies

ActionScript 3 :: Flash - Calculating Frame Independent Acceleration?

Jan 17, 2012

I have a 2D side scrolling game (made with ActionScript 3) that runs at 60 frames per second. I'm trying to make it frame rate independent so it will run on slower devices.

To do this I create a var called timeElapsed by calculating how many milliseconds have passed between each frame and dividing that by 16 (60 fps is about 16ms, I think.) So that at 60 fps the result would be about 1. Then I times any time related vars by this number (e.g player.x = speed * timeElapsed;) This is the code:

private var oldTime :Number;
private var defaultFrameRate :uint = 16; // the default frame rate in milliseconds
private var timeElapsed :Number;

[Code]....

As you can see, at 30 frames per second the player is moved further in the same amount of real time. What seems to be the issue is that, at 30fps in frame one, my current code doesn't account for the slight difference in speed between frame one and two at 60fps. I thought of getting the average value of speed between any two frames at 60fps and using that to calculate a more accurate value when the frame rate changes but I got the feeling wouldn't work correctly in some other situations since at 60fps for example, it would move the player by 115 and not 110 pixels.

Is their any way to accurately simulate an object accelerating in a way that is frame rate independent?

View 1 Replies

IDE :: Hardware Acceleration In Flash Games Become Bigger And Faster?

Oct 22, 2008

[URL].. To enable the SWF file to use hardware acceleration, select one of the following options from the Hardware Acceleration menu: Level 1 - Direct Direct mode improves playback performance by allowing Flash Player to draw directly on the screen instead of letting the browser do the drawing. Level 2 - GPU In GPU mode, Flash Player utilizes the available computing power of the graphics card to perform video playback and compositing of layered graphics. This provides another level of performance benefit depending on the user's graphics hardware. Use this option when you expect that your audience will have high-end graphics cards. If the playback system does not have sufficient hardware to enable acceleration, Flash Player reverts to normal drawing mode automatically. For best performance on web pages containing multiple SWF files, enable hardware acceleration for only one of the SWF files. Hardware acceleration is not used in Test Movie mode. When you publish your SWF file, the HTML file that embeds it contains a wmode HTML parameter. Choosing Level 1 or Level 2 hardware acceleration sets the wmode HTML parameter to "direct" or "gpu" respectively. Turning on hardware acceleration overrides the Window Mode setting you may have chosen in the HTML tab of the Publish Settings dialog box, because it is also stored in the wmode parameter in the HTML file.

Does this mean that the newest version of Flash will support Hardware acceleration? The kind of hardware support that will produce less laggy animations and games? I've been waiting for flash to do this. I have a couple game ideas, but they're too big for flash, and well, I wasn't very inspired to learn other languages.

View 6 Replies

ActionScript 2.0 :: Limited Flash, But Unlimited Html Area?

Aug 22, 2006

so much entries here about full screen flash, but i coultnt find what i wanna know. i read the tutorial about the full screen flash, but it wont work the way i wish it would. what i wann have is a swf embeded in an html. the swf size is 950 px x 550 px and is in the absolute middle from all sides of the browser. if you scale your browser, it should scale itself smaller, but not bigger than the beginning resolution. within the swf file there is a game, that opens in a seperate window in front of the main swf. that window should be dragged whereever you want in the browser.

but i just figuered out what i have to do, to give the window some freedom. but when i want to drag it above the main swf i cant do that. i figured out that when i drag it to the left, there is the same problem, but the further right i press the mouse on the window, the further i can drag the window to the left. same is on top - on the right and the bottom site there is no problem.and the html code is:

ActionScript Code:
</script>
</head>

[code].....

View 1 Replies

ActionScript 3 :: Enable Hardware Acceleration For SWF Generated In Flash Builder

Oct 5, 2011

Is it possible to enable hardware acceleration (Level 1, Level 2) for a swf generated in Flash Builder. I don't use the Flash IDE and therefor I have no access to the "Publish Settings" in the Flash IDE? Maybe there is some compiler arguments? [URL]. To enable the SWF file to use hardware acceleration, select one of the following options from the Hardware Acceleration menu:

Level 1 - Direct Direct mode improves playback performance by allowing Flash Player to draw directly on the screen instead of letting the browser do the drawing.
Level 2 - GPU In GPU mode, Flash Player utilizes the available computing power of the graphics card to perform video playback and compositing of layered graphics.

This provides another level of performance benefit depending on the user's graphics hardware. Use this option when you expect that your audience will have high-end graphics cards. If the playback system does not have sufficient hardware to enable acceleration, Flash Player reverts to normal drawing mode automatically. For best performance on web pages containing multiple SWF files, enable hardware acceleration for only one of the SWF files.

Hardware acceleration is not used in Test Movie mode. When you publish your SWF file, the HTML file that embeds it contains a wmode HTML parameter. Choosing Level 1 or Level 2 hardware acceleration sets the wmode HTML parameter to "direct" or "gpu" respectively. Turning on hardware acceleration overrides the Window Mode setting you may have chosen in the HTML tab of the Publish Settings dialog box, because it is also stored in the wmode parameter in the HTML file.

View 1 Replies

Flash :: Click And Drag To Spin The Wheel Complete With Acceleration And Deceleration In AS3

Oct 28, 2010

In my Flash File I have a wheel. The user is able to rotate the wheel by using arrows to jump to the next "segment" (think 20 images attached to each other forming the circumference of the wheel).

[Code]...

However, what I want to be able to do is, click and drag to spin the wheel, complete with acceleration and deceleration and even settling on the nearest image when the wheel reduces to a certain speed. I have no idea how to go about doing this: I'll need to kinda detect a before and after position of the cursor and translate this into a speed for the wheel which then decelerates over time and also detect which image is closest at a certain speed and "snap" it, both scrolling up and down. (it'll only affect the Y-axis)

View 1 Replies

Flash :: Disable Adobe Player Hardware Acceleration In The Embed Code?

Jan 18, 2011

We run surf camera streams on our website, which are played via the latest version (5.4) of JWPlayer on our pages. Recently we switched over to another streaming service, and H.264 streams, as we are planning on streaming out to iOS devices in the very near future, however this introduced a bug on the client side where users to not receive vision (they only see a black screen where the video is normally seen).

We have discovered that disabling the Hardware Acceleration (which was introduced in Flash Player 10.1+) fixes this issue, and given the spectrum of environments where this issues is happening I would wager that this is related to specific graphics cards, their drivers, and how they handle the vision decoding etc.

The documentation we have found relating to disabling Hardware Acceleration only indicate that this can be done via the wmode param, i.e. by setting it to wmode="opaque" or wmode="transparent" however this doesn't seem to work in all cases (for the most part the issue is no longer there) however we are still seeing 30% of our users getting this issue.

We can ask the users to disable hardware acceleration themselves, and we have provided details on how to do this, however to me that is only a temporary fix, and I was curious as to whether or not there was something more permanent we can put in until Adobe fix up this issue?

View 1 Replies

Flash 10 :: Plug-in With Hardware Acceleration The Video Movie Clips Seem To Fall Apart?

Dec 23, 2011

Has anyone found that since Flash 11 plug-in with hardware acceleration the video movie clips seem to fall apart? I see quality loss both in hardware acceleration and without in all my clips since this upgrade. Before that the movies were fine! Also I have installed a new Nvidia driver, do you think this is a issue?

I think Flash enables hardware acceleration in in-page video movies as well as full-screen mode.

Do I have to redo all my video clips now or am I just confused?

View 0 Replies

IDE :: Limited - Enable Drag And Drop As Soon As User Drags The Hand Out Of The Flash Movie

Mar 5, 2010

In the game spank the monkey, how would I achieve the drag and drop functionality of the game? specifications: Press the hand to enable drag and drop As soon as user drags the hand out of the flash movie, the hand is released, despite whether or not the user's mouse is still pressed.If the user's mouse is still pressed even after coming back to the flash screen the hand does not respond until pressed again.I tried multiple things but to no avail.

One of my attempts involved having a constant onMouseMove event handler that flagged a "out_of_bound" area, but mc.onPress = function(){ //drag } does not respond after the initial press.

View 3 Replies

Flash 10 :: Flash Player GPU Acceleration?

Sep 11, 2010

if Adobe is going to implement GPU acceleration into the Flash Player (similar to what is now going on with all internet browsers and HTML5), I am not asking about acceleration of HD video which they have done with v10 of flash player but about real DirectX or Direct2D acceleration so the whole scene and all objects on it would be accelerated by graphic card.

View 2 Replies

Flash 10 :: "Simulate Download" Option Limited For Some Things?

Jun 26, 2011

I've a strange problem. My project is an SWF that load an external SWF trought loader. My intention is that until external swf desn't fully loaded, his reproduction don't have to start.

[Code]...

View 0 Replies

ActionScript 3.0 :: Simulate An Acceleration That Looks Like A Car's Gear?

Feb 16, 2011

I've been trying to create a new class of vehicle and simulate a somewhat realistic acceleration/velocity relationship and behavior but with no success.
At least, I can't figure out how to do what I want to do.

Which is this:I have a vehicle with a maxVelocity and an initialAcceleration properties, and what I want to find out is how to express the vehicle's acceleration with the two above mentioned variables so that the vehicle stops accelerating when it reaches its maxVelocity (meaning that acceleration reaches 0).

I believe there are some serious maths going on behind this seemingly simple thing, at least too serious for me, and I tried to remember what I learned years ago about arithmetic progressions and stuff like that but to no result other than a headache.

Does someone know how to do it, if it's actually possible. And if not, how you guys do to simulate an acceleration that looks like a car's gear.

View 2 Replies

ActionScript 2.0 :: MovieClip Rotation With Acceleration

Apr 12, 2010

How to MovieClip rotation with acceleration?

View 2 Replies

ActionScript 3.0 :: How To Disable Hardware Acceleration

Jul 21, 2011

Is it possible to disable hardware acceleration with actionscript something likehardwareAcceleration.enabled = falseOn some computers and particular browsers the video in my flash app wouldn't show properly displaying only green screen - when I uncheck hardware acceleration in the flash player settings all goes back to normal.So I was wondering would it be possible to do it with actionscript. In my publish settings Hardware acceleration is set to none, but that doesn't seem to work.

View 1 Replies

IDE :: Changing Hardware Acceleration Using ActionScript?

Sep 29, 2009

In a projector project, in fullscreen mode, the presentation is too slow in some computers. Searching I discovered that in settings in flash players, there's a option for Hardware Acceleration that solves the problem. But when I burn the projector in a CD and run in another machine, the hardware acceleration comes selected again, making the movie to run too slow. Is there a way of turning the hardware acceleration to OFF using actionscript, in a way that no matter what, is will always run smooth?

View 3 Replies

ActionScript 2.0 :: Give Acceleration To An Object?

Jan 28, 2010

i have found a code whose purpose is to make an object to follow the mouse arrow. It works perfect, but i would like to add a kind of acceleration to it. That means the closer the object is to the mouse arrow, the faster it moves.

[code]...

View 5 Replies

XFL Import From AE CS4 Limited To 1000 Frames?

Jul 22, 2009

I'm currently working on a JibJab style project where a third party agency have done an animation. Now we have tracked the head motions in AE CS4 and done an export to Flash using XFL, and the motion does not work.
 
Before this we have done several tests to see if this method would work, so we know it actually does work, but the tests where only a couple of 100 frames long, now the project is over 1500 frames.
 
The final animation is 60 sec, 25f/s, and after importing the motion into FLASH using XFL nothing happens. The motion is there if we look in the motion editor, the image is there, but nothing happens when i scrub back and forth. This all worked like a charm with the test projects. AND if i try and rightclick the picture or motion editor FLASH freezes, so i know something is REALLY wrong here.
 
After four hours of bug hunting i have isolated the problem to the number of frames you try to import into FLASH. If the end sequence is more than 1000 frames (exactly!) a extra keyframe is added on the first frame in the motion editor, so there is TWO keyframes on the first frame, where there should only be possible to have one. This happens only if the sequence is more then 1000 frames. If i take the same sequence and export if from AE so its less then 1000 frames everything is fine.
 
I have attached a screenshot of the extra keyframe that apears in the motion editor. It's allso noteworthy that this extra keyframe can't be changed or adjusted as it does not actualy "excist".
 
I would like to have this bug confirmed by someone and if someone has a solution? Right now im looking at cutting up the export into "999 frames" sections and then patch it together again in Flash. 

View 1 Replies

ActionScript 3.0 :: Limited Number Of Else Statements?

May 10, 2011

In a change of statements, i have if, else if, and else. Can I add a fourth condition? if so how?

View 2 Replies

ActionScript 2.0 :: Looping A SWF Limited Times?

Jul 31, 2002

I need to loop my SWF 3 times and have it freeze on the last frame of the movie. I assume a conditional "if" "else" action is needed but cannot get it too work.

View 2 Replies

IDE :: Limited FullScreen Keyboard Access?

Mar 31, 2010

Limited FullScreen keyboard access Everyone is talking about the new Flash Player 10 features that you can have limited keyboard access while you are in fullscreen. But nobody publish the code for this. I'm using the regular onKeyDown function in AS2 and this is not working. Does someone know if we can have this limited keyboard access in AS2?

This is my code (that work in normal state but not in fullscreen mode):

[code]...

Adobe Flash Player 10 Whether or not you want to make a game or a video player with keyboard shortcuts, the restriction of keyboard support in fullScreen has been an annoyance to a lot of developers. The restriction was placed there because of heightened possibilities of malicious attacks while in fullScreen mode such as password phishing.In Flash Player 10 we are easing this restriction to allow non-printing keys to be used while in fullScreen. Non-printing keys are arrows, space, shift, tab and similar keys that can�t be used to provide private information. These keys are very important however to let users do many types of selection and gameplay inputs.

View 2 Replies

ActionScript 2.0 :: Limited Space For Sketching?

Oct 4, 2003

createEmptyMovieClip("Line",1);
Line.lineStyle(2,0x000000,100);
onMouseDown = function (){[code]....

How do we use this code on a movieclip (limited space for sketching) created by us ? If i'm not mistaken the onMouseMove = null function for the code below is not correct ..

onClipEvent (load) {
lineStyle(2,0x000000,100);
}[code].....

View 14 Replies

ActionScript 2.0 :: Zoom In For Limited Time?

Apr 28, 2004

quick zooming question here. I have this AS so far :

Code:
//1
function zoom() {

[code].....

View 4 Replies

ActionScript 2.0 :: Circular Movement To Linear Movement - Carousel To Conveyer Belt?

Jul 9, 2010

I've been playing with carousel code, and was wondering how to change it from circular animation (carousel) to left/right linear (conveyer belt) style animation, how to change the mover code and 't.angle = i * ((Math.PI*2)/numOfItems);'

[Code]....

View 1 Replies

Hardware Acceleration For Video On Jugglor Kiosk

May 24, 2009

We are doing our second kiosk using Flash and Jugglor. The system uses a 1024x786 touch screen (15") for user input and a 1366x768 Flatscreen (37") for information display.The program is created in Flash with a stage that is 2390x768 (2390=1366+768) We use a 2-headed nVidia card and their drivers split the info onto the proper screens.Works swell! In this iteration, we are using more full-screen hi-def on the info screen and I can't, for the life of me, get a solid answer as to the best way to take advantage of hardware acceleration for hi-def video playback in the CPU (Intel/XP) or the graphics card.

I know that most DVD players are able to do this, but there is enough stammering on the flash playback to suggest that the video is not getting a full boost from the silicon.

[Code]...

View 1 Replies

ActionScript 2.0 :: MX Acceleration/deceleration Of A Movie Clip?

Feb 19, 2003

I have a movie clip (1). When I click on 1, I would like to move a second clip (2) to another position along the x axis. This I know how to do. What I'm not sure of it how to code it to decelerate as it approaches it's final position

View 8 Replies







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