Hardware Acceleration Detection
I was wondering if there is a way to find out if flash is using hardware acceleration when my page loads, using JS. I found one article, but it did not work for me.Thanks,
Adobe > Flash General Discussion
Posted on: 12/04/2008 12:54:39 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[FP] Hardware Acceleration
Does anyone know which Flash Player version introduced the new "Enable hardware acceleration" option on the player settings panel?
I'm running the latest FP9 Update 3 beta and have just noticed the hardware acceleration option on the settings panel. I guess it is probably a new feature for update 3.
H264 Hardware Acceleration
Hi,
I need to know if it is possible to take advantage of hardware acceleration for H264 playback. I know that it is possible to use "hardware acceleration for fullscreen scaling" for H264 encoded videos. It is not clear whether hardware is used for fullscreen scaling or decoding of video (or both)
All I need is to use hardware decoder of video cards (purevideo or avivo) in non-fullscreen mode.
Thanks in advance
Finally, Hardware Acceleration?
I'm not necessarily encouraging it, but I've got some interest in the latest beta version of the Flash player. (Here's the link to download the browser plug-in.) The press release (again, link) mentions some neat stuff:
A strengthened connection to JS through the ExternalInterface API
Vector graphics acceleration for multi-core machines
"Hardware scaling" in full-screen mode, "for improved video performance and quality"
What, pray tell, does "hardware scaling" mean? It sounds like it could be a feature limited to video in full-screen mode. But do you think it could pave the way for hardware acceleration?
Best Hardware For CS4?
From what I read some users seem to have big problems with running CS4.
My guess is that its mostly related to their system setup, hardware and software.
I run CS4 fine on XP/Intel/ATI Radeon, except for the text/properties panel thing.
But now I am going to buy a new system, so why not then get something that CS4 really, really likes.
I need CS4 working fine, and I am going to change whichever parts it takes until it works. (Good thing that hardware is cheap nowadays.)
From what I understand, XP 32-bit seems to be the most stable system, and that suits me fine. Please correct me if I'm wrong. Any versions better than other? SP2 good, or SP3? Languages?
And Intel seems to be the most stable processor, right? Anything particular here that I should look out for? Should I get dual core or quadrupel core? Any special motherboards recommended? Memory? Tuning issues?
And lastly the GPU. Today I've got ATI Radeon and the properties panel bug might be related to that. Is it correct that Nvidia seems to work better? Any particular models?
Wouldn't it be a good idea if everyone that has CS4 working **FINE**, would post their hardware/software setup in this thread? I am sure I wouldn't be the only one appreciating that...
I mean, Flash is a great tool, and I love the new features in CS4, like the new motion tweening for instance - so I am more than happy to build a good system around CS4 to make it run properly.
Hardware Information
How can i read the hardware information of the computer, like motherboard serial number or any device serial number (hard disk, CD, VGA,..)
PDA Hardware Buttons
Howdy all cool ppl.
I'm building a fitness-excercise app for Pocket PC in Flash.
But I cannot find ANY info of how to link a button to the actual plastic buttons on my PocketPC.
It is VERY important that you can controll this app by using the buttons, if the user has to look and press at the screen my app will not be half as cool as planned.
Example: a button on screen saying "Press me to begin" but instead of just pressing the screen on that button you should be able to press the inboxcalenderarrows etc button to activate the action of the button.
Please help me, cool dudes!
Hardware Control
I would like to create a button(flash projector for MAC OSX) that will sit on the desktop. When this file is run, the optical drive tray will open. It seemed easy, but I am not sure where to start or the coding that could open control the hardware.
Any thoughts?
Hardware To Flash
I have a piece of hardware that I need flash to react to through a serial port. Does AS support this natively or will I need to build a dll to handle this communication.
POS Hardware Integration
I am a final year university student and my final year project is to see whether Flash can create a robust point of sale system. I am using PHP and mySQL for the backend of the project. My questions are: Can Flash control/make use of barcode scanners and cash drawers and if so how? Does anyone know of other projects like this and where can I find them? Also, if anyone has other advice to offer, it would be greatly appreciated.
Many thanks
Detect System Hardware
Is there any way to detect system hardware (specifically a soundcard or the ability to play sound) in flash? If not, what about using javascript?
I have a movie that is very dependent on audio, but I want to automatically use subtitles if audio is not available.
[MX04] Interation With Hardware
hello!
plz help me out .... i need to know can flash interacted with hardware .. i mean i want to on/off a led light in serial port with flash button ... can it possible ? if possible how ? i have very basic knowledge of action script but i know through c or vb can possible ... but i want it in flash so guys plz help me out ...
waiting for ur reply ....
Best Hardware For Flash Application
My company is creating a product that uses flash as the front end - multiple flash clients connecting to a servlet through an intranet. Nothing too elaborate.
Our goal is to find the least-expensive hardware that will run the flash front end. It's nothing too complicated but it does have some color rotation and alpha blends, and it is a full screen app running at 1024x768. It runs well on most modern PCs.
What I'm looking for are some suggestions for hardware. We want to try to keep the unit price below $400 if possible. We're also willing to use machines that will drive dual screens and pay a little more.
What hardware have you used for standalone flash UI installs? Mac Mini's? Cheap laptops? Custom builds? Any suggestions would be greatly appreciated.
Help On Hardware Configuration And Clustering
Hi All,
We are planning to use Flash Comm Server for our application and would like to know a couple of things first before we could make a huge investment. Have tried to search all of Macromedia + other sites, but in vain.
Can anyone please help us with the following:
1. Ideal hardware and software configuration for a server that would support upto 2500 simultaneous connections.
2. Ideal hardware and software configuration for a server that would support upto 5000 simultaneous connections. (using the stacking approach)
3. Ideal hardware and software configuration for a server that would support upto 5000 simultaneous connections. (if we wish to implement clustering of Flash Comm Servers on different machines)
4. What are the technical considerations for setting up a cluster and what additional resources (equipments / software) would be required for the same.
5. Does a cluster require additional programming efforts in the backend (i.e. main.asc) or does it work transparently to the developer too.
Desperate for a reply as we are running behind project schedules and need to make a purchase decision asap.
Thanks
Sunil Bhatia
Buying M Studio 8 (through Hardware) ?
Hello,
I am looking for any packages hardware-software that will include flash studio and server
you know it's like the (buy matrox video card - get adobe studio for free)
there must be some hardware product out there that comes with "free" macromedia software...
any info... ?
thanks
Presentation Hardware Reuirements
I'm looking for recommendations for the minimum hardware requirements to run a Flash presentation from a PC that will be powering two 32" LCDs running at 1280x720 or 1366x768.
These are basically POS (Point Of Sale) displays that will be running dynamic flash movies that will also have flash video integrated into them. Most everything that is not video will be vector graphics.
I'm thinking the specs won't have to be too outrageous but want to make sure I also don't undershoot. Does flash rely more on the CPU or GPU these days?
Thanks,
-peel
Need Hardware Recommendations For FMS2
I am having a FMS2 enabled site and application built and would like ideas on the best server setup/specs to run the site smoothly. I expect maximum users at any one time on the site at about 600 with about 400 concurrent FMS2 users. I will have 4 "rooms" with one way video and audio feeds (1 to many) and as many as 100, (1 to 1) connections. Although I am more familiar with xServe, I would prefer to use Linux servers if possible. I have 100 megs of local bandwidth for serving out the content. Am I better to go with fewer, more robust servers or more servers with less individual processing power? How much memory per server works best in your experience? Although Adobe's materials do dot suggest that load balancing is needed at my size, should I look into load balancing hardware anyway? All suggestions are most welcome.
Flash + External Hardware?
Hi all, just a quick question for you: Does anyone know if Flash works with hardware other than a mouse and keyboard?
The reason I am asking is because I am developing an interface for a kiosk and I am going to have to enable people to swipe credit cards on the kiosk.
Is this possible? Does it depend on the credit card reader? If Flash doesn't, does anyone know if Director does?
Thanks for your input!
Could This Been Done :S(flash Gui Controlling Hardware)
Here's a thought to ponder over.
With home P.C every increasing it's only a matter of time before the tv is out and the pc does all you need it to do.
Were are we at with flash when it come's to controlling hardware external to the pc/mac.
A typical example would be:
You have a couple of camera's setup surronding your home or bussiness.
Is there anyway for me to build an interface that could control the camera's movement etc?
I am thinking that flash would/could display what the camera is viewing but i am getting lost when it comes to how flash could control the camera.
At a guess i am thinking some sort of program built with VB that could work as a middle man between flash and the camera.
Of course this GUI would/could be accessed from anywhere and pretty much any device that has flash capabilities.
Any thoughts, idea's or anything you think might be worth a read.
AIR Hardware Input And Output
Hi, i'm pretty new to flash as well as kirupa but hope that someone can point me in the right direction
I'm working on my thesis and am trying to measure reaction time in a car simulator (which for some reason can't do this) as well as trigger external harware (~warning lights).
I now wonder whether it is possible to get analog input from a steering wheel and pedals (logitech) and also if it is possible to trigger hardware using an AIR application.
The reason i'm using air is because i am basing my code on an earlier project written in as3 air and am not very skilled in programming unfortunatly.
any help is much appreciated!
Flash + External Hardware?
Hi all, just a quick question for you: Does anyone know if Flash works with hardware other than a mouse and keyboard?
The reason I am asking is because I am developing an interface for a kiosk and I am going to have to enable people to swipe credit cards on the kiosk.
Is this possible? Does it depend on the credit card reader? If Flash doesn't, does anyone know if Director does?
Thanks for your input!
Checking Hardware Info
is there a way to check the hardware of a system that your flash movie is playing on? Other than the FPS script for checking the processor's load?
I would be more tha ngrateful to find this out...
Recording Devices ( Software/hardware )
Could I get some ideas/recommendations for recording hardware and software to get best quality/sizing for Flash MX use?
Will be used in a tour like movie with a voice narration.
Controlling Flash With Hardware Pushbuttons
can anybody give me any info on using hardware pushbuttons like this:
http://www.radioshack.com/product.as...Fid=275%2D1548
i've heard that there's some pci board you can get for a pc that allows assignment of these buttons to keyboard keys, but im not finding any info.
danka!
Load Testing / Min Hardware Requirements
Hi there
I try to disply 360 degree panoramas with Flash.
Is there a way to find out how much RAM my Panorama would be using and what the minimum requiremens for a computer are.
www.flash-panoramas.com is the site.
What I need to know is how "strong" a computer has to be to view my panoramas.
Thanks for your help.
Regards Markus
PS: Unfortunately it seems that some times the connection between my controller and the panorama.swf is not working. So do not be suprised if you can not look at the images.
Flash Fullscreen W/ Hardware Scaling (a Memo)
I'm posting this because I couldn't find any post on the web that said the whole story, from a user (developer) point of view. I will through it as a short FAQ:
Q: IS FULLSCREEN RESTRICTED TO EMBEDDED MEDIA (opened through a browser)?
A: No, fullscreen view in the standalone player has been available a long time before (I started developing Flash media since version 4, and it was there already, through fscommand) the new fullscreen mode. Today (with Flash Player 9.0.115), you can achieve fullscreen mode in standalone media the same you would in a browser.
Q: HOW DO I GO FULLSCREEN?
A: Well, first of all there is a limitation: only a user-started action will cause the fullscreen mode to work (this means that the code must be executed by an event handler, or event method). On the other hand, keyboard inputs will be ignored while in fullscreen mode (I yet have to verify if this restriction is now applied to standalone fullscreen too). The code is slightly different, depending on what language you are using (AS2 or AS3).
Q: HOW DO I GO FULLSCREEN ON AS2?
A:
Code:
myButton.onRelease = function() {
Stage["displayState"] = "fullscreen";
};
Q: HOW DO I GO FULLSCREEN ON AS3?
A:
Code:
import flash.events.MouseEvent;
import flash.display.StageDisplayState;
function myHandler(event:MouseEvent):void
{
stage.displayState = StageDisplayState.FULL_SCREEN;
}
myButton.addEventListener(MouseEvent.RELEASE, myHandler);
Q: WHAT ABOUT THE HARDWARE SCALING STUFF?
A: Since the latest version of the Flash Player (9.0.115), a new *fantastic* feature has been included: hardware acceleration for the fullscreen mode. It is a really, really cool thing, because instead of actually changing the display mode of your computer screen (like videogames do, for example), it renders the content to be displayer at the resolution YOU want, and then passes it to the operating system, for a hardware-accelerated filtered scaling to the display size. This means that if you run a WUXGA (1920x1200) screen, like I do on my laptop, your display will always be running at it's full resolution, but the content displayed will be at your original resolution (within Flash). This cuts completely the awful bottle-neck of rendering the Flash content at full resolution, which made fullscreen mode impractical until now.
Q: IS HARDWARE SCALING RESTRICTED TO EMBEDDED MEDIA?
A: No, you can achieve fullscreen mode with hardware accelerated scaling in standalone media too, as well as projectors (as long as they are produced in an updated environment, that means that the originating SWF file must have been compiled through an updated playerglobal.swc, and that the projector must be created through the latest Flash Player - 9.0.115).
Q: HOW DO I GO HARDWARE ACCELERATED IN AS2?
A:
Code:
myButton.onRelease = function() {
import flash.geom.Rectangle;
Stage["fullScreenSourceRect"] = new Rectangle(0, 0, 640, 480);
Stage["displayState"] = "fullscreen";
};
Q: HOW DO I GO HARDWARE ACCELERATED IN AS3?
A:
Code:
import flash.events.MouseEvent;
import flash.display.StageDisplayState;
import flash.geom.Rectangle;
function myHandler(event:MouseEvent):void
{
stage.fullScreenSourceRect = new Rectangle(0, 0, 640, 480);
stage.displayState = StageDisplayState.FULL_SCREEN;
}
myButton.addEventListener(MouseEvent.RELEASE, myHandler);
Q: WHY CAN'T I MANAGE TO MAKE THIS WORK?
A: There are a few things you might need to troubleshoot. First of all, you need an updated version of the playerglobal.swc file (that will enable for the fullScreenSourceRect property to be interpreted), that I have attached here for your convenience.
The playerglobal.swc file (that I had to rename playerglobal.swc.txt to attach it here), must be replaced in the following locations:
For FLASH CS3:
*flash cs3 dir*/en/Configuration/ActionScript 3.0/Classes/
For FLEX 2:
*flex 2 dir*/Flex SDK 2/frameworks/libs/
For FLEX 3:
*flex 3 dir*/sdks/2.0.1/frameworks/libs/
Another thing I've noticed is that the Stage.scaleMode property conflicts with Stage.fullScreenSourceRect. So basically, if you are running a noScale movie, you will need to change that before going in fullscreen, and then going back when exiting fullscreen.
That is all folks, at least of what I can think of.
I hope this can be useful to someone!
I would have saved a few hours of research myself.......
Interesting AS3 Project Requiring External Hardware
So I might have to work on a project that utilizes a photoelectric switch that will have to tell flash to basically take a picture of someone and do various stuff with it. I know how to do everything required except how I can get the switch and flash to talk. Is this going to require some kind of socket server or something to that effect. Its in the early stages so was just wondering if anyone has had to do anything with various external hardware and flash.
Any thoughts?
Thanks
Best Hardware Setup For FLV Video Centered Standalaone
Can anyone recommend a system setup for a standalone app i'm concepting that will have large and high quality (hopefully) flv video playing as a background, hi-res png's or jpgs doing all sorts of animation in the foreground and all while keeping a fairly high overall framerate? my stage size is currently slated as 1024x768 BTW.
What's more/most important?
processor speed?
will a dual core help or not even be utilized (proposing standalone with flash 8 runtime)?
will a suped up video card make a difference?
obviously the more RAM the better but is there a point where that starts maxing out too?
any other considerations to note?
I'm curious to see what other users who've had a decent amount of FLV centered projects have to say on the matter. Thanks in advance
Pat
Flash Media Server VOD Hardware Requirements Per Client
Hi I was wondering what the hardware requirements are for VOD use of FMS 3 per client.
What I want to do is to be able to calculate what kind of machines would be required to cater an x amount of clients at the same time. For example CPU usage per user for a 500 Kbps video is 40 MHz, memory 100MB etc. or if there is a formula. If I have that then I can also calculate the cost per view etc.
If you have a server with a Gbps connection to a network you could cater for 2000 users but then if the memory usage is 100MB per user that would not be possible etc.
Any kind of relative information (even server suggestions) would be greatly appreciated.
Thanks!
Acceleration
How would I go about having a little ball movie clip of mine move around the screen (arrow keys) with acceleration. Like, it speeds up the longer you hold it down and then slowly comes to a stop when you let go.
Thanks.
Acceleration
Is there a way to add accleration to this code. Basically it makes the object go up with mouseDown and down if mouseUp.
function eF(e:Event):void {
character.y += speed2;}
function mD(e:MouseEvent):void {speed2 = -2.7;}
function mU(e:MouseEvent):void {speed2 = 4.7;}
Acceleration?
Okay, i have this right now for movement on a shark MC i made:
ActionScript Code:
onClipEvent(enterFrame) { if(key.isDown(key.RIGHT) and this._x < 400 ) { this._x +=10; this.gotoAndStop(1); } else if(key.isDown(key.RIGHT) and this._x >= 400) { this._x = 50; } if(key.isDown(key.LEFT) and this._x > 0) { this._x -= 10; this.gotoAndStop(2); } else if(key.isDown(key.LEFT) and this._x <= 0) { this._x = 350; } if(key.isDown(key.UP) and this._y > 20) { this._y -= 10; } if(key.isDown(Key.DOWN) and this._y < 380) { this._y +=10; } }
how could i go about altering that, so that it would speed up/slow down gradually, opposed to just moving full speed right away? so that it looks more like a fish swimming in water...
Acceleration?
Okay, i have this right now for movement on a shark MC i made:
ActionScript Code:
onClipEvent(enterFrame) { if(key.isDown(key.RIGHT) and this._x < 400 ) { this._x +=10; this.gotoAndStop(1); } else if(key.isDown(key.RIGHT) and this._x >= 400) { this._x = 50; } if(key.isDown(key.LEFT) and this._x > 0) { this._x -= 10; this.gotoAndStop(2); } else if(key.isDown(key.LEFT) and this._x <= 0) { this._x = 350; } if(key.isDown(key.UP) and this._y > 20) { this._y -= 10; } if(key.isDown(Key.DOWN) and this._y < 380) { this._y +=10; } }
how could i go about altering that, so that it would speed up/slow down gradually, opposed to just moving full speed right away? so that it looks more like a fish swimming in water...
Velocity And Acceleration...
Does anyone know where i can find good tutorials or open source for acceleration and velocity?i checked flashkit for them and couldn't find any.
Script With Acceleration?
Hi, what I would like is a small script so that when you roll over a button it tells a movie clip to start rotating, but it would be nice if it started off slow and speeded up over a few seconds, then on roll off slowed down again to a halt. any hewlp would be appreciated...
Cheers,
C
Acceleration Script
Hi,
I have the below script that moves an object, and slows it as it reaches it's target, but I can't manage to modify it to accelerate. Basically, I want it to do the exact opposite of what it does now. Can anyone help?
onClipEvent (load) {
function deccel (finalY) {
distance = finalY-_y;
_y += distance/4;
}
}
onClipEvent (enterFrame) {
this.deccel(400);
}
Thanks
Barry
Acceleration Plug-in
Hi,
Does anybody has heard about a plug-in wich accelerate flash movies (I suppose in standalone player) by allowing flash to use open GL acceleration ...some one told me about it but can't find any more infos ...thanks
3D Acceleration For Flash
I couldn't find a forum that was concerned with features in Flash, so forgive me if this is a bad place.
Has anyone ever wondered why Flash doesn't use optional 3D acceleration support that is in nearly every home user's video card these days? I know flash is supposed to be fast, but, crazy enough, most stuff I see these days is ok on a 700mhz and best on a 1.5ghz. It's just shapes, after all, like any 3d game. Cards have been doing 3D in a window since the Voodoo Banshee 5 years ago. Can anyone find reason why this wouldn't work? I mean, if every user has this triangle pumping processor in their computer (even a low end one) shouldn't we be able to access it?
Acceleration Script?
does any of u know how to make a text move faster with acceleration script, NOT by make the tween shorter in the main timeline and NOT by changing the frame per second value?
e.g i need to make a tween go faster without decreasing the frame, because if i do that it will looks like lagging.
urgent!!
Acceleration/deceleration
Hey i was wondering if someone can help me.
i have a Movie clip that i want to come across the stage, and stop at a certain point. i understand its just a standard tweening. but i wanted to use actionscript and add a acceleration/decceration effect to it. therefore having total control of where the MC is going, but still maintaining the accel/deceleration effect.
help would be greatly appreciated.
i am not that actionscript savvy, so can you please explain pretty much everything.
thanks. pdg95
Calculate Acceleration
Hi I'm looking for a formula to calculate the rate of Acceleration from given coordinates
Say i have a car travelling 50 metres in 40 seconds
At the start, the car is at 4.5 metres
10 seconds of the way (1 quarter of the way) the car is 5.5 metres
20 seconds of the way (1 half of the way) the car is 9 metres
30 seconds of the way (3 quarters of the way) the car is 25 metres
40 seconds of the way (at the end) the car is 55.5 metres
is there a way i can calculate the inbetween segments, for example what distance the car would be at 15 seconds?
any help appreciated. Thanks
[F8]caclulating Acceleration
I'm working on a game, and I have a onClipEvent() function that detects keys pressed, and then sends direction data to a function that moves the character, and detects collisions. I had a really bad way of computing it in the onClipEvent() function that basically involved having a ton of variables and if() statements declaring and figuring out whether or not the character is moving, or starting to move, and changing the characters .speed value accordingly. as i quickly learned this was a ridiculous tax on the system and killed performance.
so.. what i was wondering is like how would be my most efficient way of calculating and executing acceleration, and decelleration of character (which would be basically starting to walk slowly and then speed up, and then having a little bit of leway, or slide, when you let go of the key)
(im still rather new to all of this stuff and any help would be greatly appreciated ^^; hope its not a REALLY dumb question i did read a lot of tutorials)
[F5] Movement With Acceleration
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
moveSpeed = 7;
_root.maincharacter._y -= moveSpeed;
} else {
moveSpeed = 8;
_root.maincharacter._y += moveSpeed;
}
}
How would I modify this code so that when I press 'UP', the 'maincharacter' starts to accelerate upwards. When the 'UP' is de-pressed it slowly starts to deaccelerate then starts to accelerate downwards. Kind of like the physics of throwing up a ball in the air but more exaggerated. HELP! This has been bugging me forever!
Acceleration And Easing
Hello everyone...I need your help and my brain is fried.
I have this navigation with arrows on both sides of the container. When the user mouses over the box it detects the position of the mouse and the arrows move up and down. Here are the problems.
1. The arrows are not going the direction of the mouse (i.e. when mouse is down the arrows are going up, vice versa. It should be the opposite)
2. The arrows are not slowing down and stopping when the get the button the user is hovering over.
Any help, modifications, hammers to take to the monitor, would be very much appreciated. Here is the AS I have...
Code:
vx = 0;
a = 3.0;
af = 0.8;
this.onEnterFrame = function(){
if(_root._ymouse >= Stage.height /2){
vx -= a;
}
if(_root._ymouse <= Stage.height /2){
vx += a;
}
arrows._y += vx;
vx *= af;
if(arrows._y <= 21.9){
arrows._y = 21.9;
}else if(arrows._y >= 244.9){
arrows._y = 244.9;
}
}
Here's a link to the Flash so you can see it as well: http://www.thebigshow.com/flash/navHome3.swf
Big thanks ahead of time. Also, if you have suggestions of other code I could use I am more than willing to accept!
Wheel Acceleration
Hi Wizards! I have a simple problem with the Fla im working on.
I tried to imitate a car wheel in flash. but I am experiencing weird behaviour with my fla.
When i hit the left key, it must run clockwise and should accelerate first before reaching the top speed. Same goes to the right key, the wheel will go counterclockwise. But the weird thing is, it doesnt run smoothly as expected. it will tick first once to the left or right before accelerating to full speed. I need to remove this tick. I need to run it smoothly.
please download my fla with this link...
http://www.esnips.com/doc/dc921363-e...74/prototype02
or
Accelerated wheel: by Lionheart
part of the code goes like this:
import mx.transitions.Tween;
import mx.transitions.easing.*;
engine =new Object(); //engine as the listener
engine.onKeyDown = engine_gas; //start engine
engine.onKeyUp = engine_brake; //brake
Key.addListener(engine);
stop();
//================================================== ============================================
function engine_gas() { //start the engine...
if (Key.getCode() == Key.LEFT) {
backcw.stop();
MC_backwheel._rotation -= ((inertia-MC_backwheel._rotation)/10);
inertia += 5;
if(inertia > 1000) {
inertia = 1000;
}
}//goin left
if (Key.getCode() == Key.RIGHT) {
backcw.stop();
MC_backwheel._rotation += ((inertia-MC_backwheel._rotation)/10);
inertia += 5;
if(inertia > 1000) {
inertia = 1000;
}
}//goin right
}
//================================================== ============================================
function engine_brake() { //step in brake...
if (Key.getCode() == Key.LEFT) {
_root.hhh = MC_backwheel._rotation
if (MC_backwheel._rotation < 0) {//code to avoid swinging the wheel to the opposite direction
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation+inertia),Number(MC_backw heel._rotation),2,true);
}
else {
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation)+inertia,Number(MC_backw heel._rotation),2,true);
}
backcc.FPS = 40;
inertia = 0;
}
if (Key.getCode() == Key.RIGHT) {
_root.hhh = MC_backwheel._rotation
if (MC_backwheel._rotation < 0) {//code to avoid swinging the wheel to the opposite direction
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation),Number(MC_backwheel._ro tation)+inertia,2,true);
}
else {
backcw = new Tween(MC_backwheel,"_rotation",Strong.easeOut,Numb er(MC_backwheel._rotation),Number(MC_backwheel._ro tation)+inertia,2,true);
}
backcc.FPS = 40;
inertia = 0;
}
}
I hope you could lend me a hand with this. thank you very much in advance!
Acceleration/deceleration
Hey i was wondering if someone can help me.
i have a Movie clip that i want to come across the stage, and stop at a certain point. i understand its just a standard tweening. but i wanted to use actionscript and add a acceleration/decceration effect to it. therefore having total control of where the MC is going, but still maintaining the accel/deceleration effect.
help would be greatly appreciated.
i am not that actionscript savvy, so can you please explain pretty much everything.
thanks. pdg95
Acceleration Sound
Hi Not sure if this has been answered but im in a bit of a pickle...
I have a game and need to add a sfx for accelerating but dont have a clue where to start.
Anyone out there feeling kind today could help me out please
3D & HW Acceleration... Any News?
Hi everyone.
Sorry, I know this is probably a noob question, but has there been any news regarding true 3D support (like including shockwave 3D ) or hardware acceleration support in the current (9) or upcoming flash releases? If not, is there any way to manually add HW acceleration using actionscript3? Searched the forums here pretty well and couldn't find any answer. I would think with Vista/WPF coming this would be a top proirity. Thanks in advance for any help.
Adrian Brown
Help With Acceleration Script
I am kind of toying with different things in Flash trying to get aquainted with coding and what not.I want to get to the point of making some simple games. I am having trouble coming up with something to make a ball accelerate. Here is what I have to just make the ball move and jump around.
onClipEvent(load){
var moveSpeed = 15;
var jumpPower = 30;
var grav = 4;
var ysp = 0;
var jump = false;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT) && _x<550-_width/2){
_xscale = 122;
_x += moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(Key.isDown(Key.LEFT) && _x>_width/2){
_xscale = -122;
_x -= moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(jump==false){
gotoAndStop(1);
}
if(Key.isDown(Key.UP) && jump==false){
gotoAndStop(3);
jump = true;
ysp = 0;
ground = _y;
}
if(jump==true){
_y = _y - jumpPower + ysp;
ysp += grav;
if(_y>ground){
_root.bounce_sound.start();
ysp = 0;
gotoAndStop(1);
_y = ground;
jump = false;
}
}
}
That works just fine, but its real bland. I need it to be able to accelerate when I hold down the button and deccelerate once I let go.
Help With Acceleration Script
I am kind of toying with different things in Flash trying to get aquainted with coding and what not.I want to get to the point of making some simple games. I am having trouble coming up with something to make a ball accelerate. Here is what I have to just make the ball move and jump around.
onClipEvent(load){
var moveSpeed = 15;
var jumpPower = 30;
var grav = 4;
var ysp = 0;
var jump = false;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT) && _x<550-_width/2){
_xscale = 122;
_x += moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(Key.isDown(Key.LEFT) && _x>_width/2){
_xscale = -122;
_x -= moveSpeed;
if(jump==false){
gotoAndStop(2);
}
}else if(jump==false){
gotoAndStop(1);
}
if(Key.isDown(Key.UP) && jump==false){
gotoAndStop(3);
jump = true;
ysp = 0;
ground = _y;
}
if(jump==true){
_y = _y - jumpPower + ysp;
ysp += grav;
if(_y>ground){
_root.bounce_sound.start();
ysp = 0;
gotoAndStop(1);
_y = ground;
jump = false;
}
}
}
That works just fine, but its real bland. I need it to be able to accelerate when I hold down the button and deccelerate once I let go.
|