Okay so I'm making a racing simulator, and I really really want an engine sound. I decided that I would make the volume of the sound increase as you increase your RPMs. But I didn't even get that far...
Thats the code I have in the tachometer. eng is the engine sound I was using. The car's maximum rpm is 8000, so I divided by 80 so that vol would be from 0-100.Code:onClipEvent (load) { this.attachSound(eng) } onClipEvent (enterFrame) { vol = _root.car.rpm/80; this.setVolume( vol ) this.start( 0, 1) }
After that I have no idea what I'm doing... The sound plays once, but I want it to play every time the clip enters a frame, and also change volume as your RPMs increase or decrease...
Is this at all possible with flash?
thanks




Reply With Quote