ActionScript 3.0 :: Accelerometer Not Smooth (Android AIR)
Dec 9, 2010
I'm using flash builder burrito and wrote this quick class to test the Accelerometer on my phone. It looks very choppy. How I can improve the motion so the sprite is smooth and not so choppy.
Code:
Select allpackage{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.AccelerometerEvent;
import flash.events.Event;
import flash.sensors.Accelerometer;
View 2 Replies
Similar Posts:
Jan 10, 2011
I added the accelerometer fucntion to my app for android using AS3. It works great. The only issue I am having is the starting orientation of my mobile device. It seems like it has to lay flat in order to center movement. I want it so that I can hold the device in my hand and tilt up and down in landscape mode. Like a 45 degree angle maybe.
View 2 Replies
Jan 31, 2011
The Accelerometer UPDATE event never fires, tho isSupported returns true, when the flash app is running inside the android web browser. How can I make it work?
[Code].....
View 1 Replies
Sep 28, 2011
I need an application to test the accelerometer values on my mobile phone. I need the values on my system so that I can manipulate that info for something else.
If I write an Android application, the values will be inside the Mobile phone, which is not what I want.
I have written an app in Flash, n tested in Adobe Device Central. Only catch is that instead of simulator, I need to test it on my mobile. How do i do this?
View 1 Replies
Feb 9, 2004
I have a movieclip that I want to be resized when a button is clicked. I want the animation to be smooth as if it had weight though. I read the tutorial on this but I need something slightly different, I would rather it where I can just refer to a function that is set in another movieclip. That way I could easily refer to it again and just set the height, width, and if possible, x, and y.
And my second question, is how to keep the border of my movieclip that is going to be resized the same thickness. I want the inside to be resized but the sides to stay the same width but move to stay on the edge.
View 8 Replies
May 7, 2010
i am building iphone small games, so far using arrows to move right / left, i tried to find code to move object by accelerometer, if the iphone tilts right it goes right..
View 1 Replies
Aug 20, 2011
I have this Accelerometer event, taken from the code snippets, and it works fine, but i would like to know is it possible to turn this off by a button.
[Code]...
View 1 Replies
Mar 2, 2012
I'm working on an application in Flash CS5.5. I've been working with the code snippets, and the template that deals with keeping an accelerometer-controlled movieclip on stage. That works great. However, I'm trying to find a solution having a larger than the stage sized background be controlled by the accelerometer, but stop moving once it reaches the edges of the movieclip. So, it would move all the way to the right until the edge of the movieclip, then stop. Below is the code sample that I've been trying to manipulate (from the included template that keeps the ball movieclip from going off-stage).
import flash.events.Event;
var accelX:Number;
var accelY:Number;
var fl_Accelerometer:Accelerometer = new Accelerometer();
fl_Accelerometer.addEventListener(AccelerometerEvent.UPDATE, fl_AccelerometerUpdateHandler);
function fl_AccelerometerUpdateHandler(event:AccelerometerEvent):void {
[Code] .....
View 4 Replies
Nov 17, 2011
I'm moving an HSlider thumb via the accelerometer. The following code works fine. The problem, though, is that as I keep tilting the device, xSpeed continues to increment. This means that when I now tilt it the other way, the thumb doesn't move for a while -- since, depending on how long I was holding tilted in that intial direction, xSpeed has been going up and up.So this works, but with the abovementioned flaw:
private function readAcc(e:AccelerometerEvent):void
{
xSpeed -= e.accelerationX * 4;[code].......
But what I want to do is to stop incrementing xSpeed once the hSlider.value == either the minimum or the maximum. Sounds simple, but when I put in if statements, they prevent the thumb from moving at all:
private function readA(e:AccelerometerEvent):void
{
if(h.minimum < h.value && h.maximum > h.value)[code]........
View 2 Replies
Feb 5, 2011
I was hoping someone might have found a tutorial or done one on how to make a 3d field of infinite stars that can be navigated with mouse movement or the accelerometer..
View 0 Replies
Jan 25, 2011
i have an AIR android app which i am running on an android device ( samsung TAB ). i want the app to get laid out in landscape mode when the user starts the app holding the device in landscape ( same goes with portrait ).
but the AIR app always gets started in portrait mode irrespective of the way the device is held.
i tried the following ways use stage.deviceorientation (but when the app starts (after the applicationComplete notification ) the value is UNKNOWN) use stage resize event. (this gets triggered at start itself, a manual resize is not required - the values are based on portrait mode though - the width is 600 and height is 1024 (should have been otherway) )
i get correct values when i try changing the orientation of device, only at the startup i see problem with the required values.
View 1 Replies
Oct 28, 2011
I have an as3 built osmf video player swf that we embed on a standard HTML page. When you touch the image the video automatically goes fullscreen and begins playing. Droid and Flash often break after changing back and forth between landscape and portrait while in fullscreen.(by break I mean freeze, where you can hear the video and use the controls, but everything is just a still frozen image, the redrawing fails).Can you lock the fullscreen orientation in html, javascript, or do you have to try to handle it inside the swf?
View 1 Replies
Mar 14, 2012
I working on a project where the client side need to capture video and audio from the camera, use some library (proberly ffmpeg) to convert from mp4 to flv and send it to flash server on realtime,in the other side the client need to get flv and convert it to video type of android on real time. Is it possible to do?
View 2 Replies
Dec 29, 2010
I am porting my flash games on android. I have ported 3 successfully. But the problem with all of them is they are giving very low frame rate near about 7-8. And I have observed 1 thing that frame rate always varies. Sometimes it goes upto 45 and again in next frame it comes to 3-4 and again goes to 15-16.
I am quite confused. Please let me know if anyone is having any idea about this.
View 1 Replies
Apr 14, 2011
I am loading flash SWFs into an android WebView.I want the SWF to be instantly fullscreen and focused.The class name that handles flash is com.adobe.flashplayer.FlashPaintSurface .
Watching the log, when I fullscreen the flash manually, it calls com.adobe.flashplayer.FlashPaintSurface.toggleFullScreen()The first part of my question is, How can i call that method manually for my flash swf? Note that with a webview with a flash embedded, the only way i seem to be able to fullscreen it properly (to have flash's surfaceview fullscreen instead of the flash being displayed over top of the webview view) is by touching the screen with two fingers until an interface pops up at the top of the screen, and doesnt happen reliably.For focus, inside my webview class I call
@Override
protected boolean drawChild (Canvas canvas, View child, long drawingTime) {
if (child.getClass().getName().equals("com.adobe.flashplayer.FlashPaintSurface")) {
[code]...
This doesnt set the focus as I thought it would. Although i assume, if fullscreened properly, the flashpaintsurface should give itself focus. But if if the first part is not doable, i would wonder at least to not have to give focus to the SWF by clicking on it on startup.
View 1 Replies
May 17, 2011
There are samples to show how to access front camera of android devices using android sdk.
View 1 Replies
Jul 20, 2011
I have loading the webview in my Activity. the Web content is having some flash content. when i try to finish the Activity. Its taking too much time. the screen goes to blank screen for little time and resuming to the app.
View 1 Replies
Nov 16, 2011
I can't find this information online or in the documentation, does anyone know what versions of Android and iOS the AIR 3.0 captive runtime is compatible with? I'm assuming there is some restriction there, but short of actually compiling a program and trying it on iPhone for example, which I don't have, how can I tell which OS versions are supported?
I know that you can compile an Adobe AIR 2.7(?) application to target say Android 2.2, but what about the captive runtime with AIR 3.0? Also I don't see anywhere to find out the iOS version restriction with AIR, as you have to pay $100 to Apple to even get the SDK which would allow me to make an iOS project in the first place.
View 2 Replies
Dec 2, 2011
I gone thorough the adobe flash builder video tutorials and did the same thing to create an application for android device, but when i run the application it is showing Sorry dialog box saying that, The application Test1-debug(process air.Test1.debug) has stopped unexpectedly. Please try again. I tried many times but it is not working. Initially i thought no Adobe-AIR in my device, but it is there. I am using Reliance 3G Tab. I don't why it is not working, if anybody know this please reply me.
One more thing, i downloaded one APK (which is designed with adobe flash or flex) file from [URL]..and installed on my android device. When i run that application only blank screen is appearing, but in video they shown, it is working. Why it is happening like this?? Is any problem with my tablet ?? or application ?? or adobe AIR not installed properly on device ?? Like this i am getting too many doubts.
View 1 Replies
Dec 12, 2011
I am trying to load a flash in a webview using the codes below
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginState(WebSettings.PluginState.ON);
mWebView.loadUrl("http://www.adobe.com/software/flash/about/");
but when I import android.webkit.WebSettings.PluginState; eclipse return an error, asking me to search repositories to find it , the minSDK of my app is 7, any ideas?
View 1 Replies
Feb 21, 2012
What is the right way to view .Swf files that plays .Flv videos in Android? The code that I am using right now to enable Flash support in web view is
[Code]....
For the HTML file, I'm using swfObject. The problem is that I can open up the SWF file just fine from third party apps like SWF Player from the market. In addition, I can load up the HTML page from the browser by calling it directly through file:///. However, when I load it up using my webview, I'm stuck with a blank screen.
View 1 Replies
Sep 14, 2010
I want to use Adobe Flash in the development of Android applications. But how do I install flash on the emulator so that I can test my software with flash?
View 5 Replies
Mar 16, 2011
I have implemented an Augmented Reality application on Adobe Air for Android. When I publish my app on the android mobile phone (Nexus One) the 3D models that I have created don't appear on the screen.On flash CS5 it is working fine.I have used Away3DLite engine and I have imported a 3D collada object.I have also tried to publish some projects that I found online and I checked if the the 3D model appears on the screen but it doesn't show it either. how the 3D Models that I have imported in my project using Away3DLite can be visible when I publish the application on the android phone. Some extra stuff be usefull: I'm using GPU rendering.A also using a combination of the following softwares in order to create my AR application:
FLARToolkit
FLARManager
Away3DLite
I have created one 3D Model on 3DS MAX and another one on Maya 2010.
View 1 Replies
Jun 1, 2011
I need to add some animation to the UI of my application. Something similar to the Talking Tom application that is all the rage these days. I am a complete noob to animation, so had the following questions to zero in on a particular platform before I began with any development.
Out of Flash/Rendered Images/OpenGL which one would be the fastest to implement (assuming that I have a graphics designer to do the drawing)? If I was to go with flash, would I still be able to interact with the application or will it be more of a one-way play-and-stop kind of animation? I have looked over a lot of questions on SO about this issue and have not been able to make up my mind.
View 2 Replies
Nov 12, 2011
There are way for:On USB connect to PC (or other flash drive reader) - hook process and allow access only specified files and folder on android (custom store)?
View 1 Replies
Dec 1, 2011
is it possible to record Audio on iOS and Android with Adobe Flex Mobile? I can't find anything about that feature on Adobe's website.
View 1 Replies
Jan 26, 2012
I've recompiled my app with Flex 4.6 / AIR 3.1 and now when I upload to the Android market it says my app is using a "android.permission.BROADCAST_STICKY" permission. In it's simplest terms what is it and can or should I turn it off (it's not in the app descriptor file)?
BTW I used captive runtime for the first time in this upload. Would that have anything to do with it?
View 1 Replies
Mar 12, 2012
I have a problem with Flash builder, I can't find the "Flex mobile project option in the list" How can I install it?
View 1 Replies
May 11, 2011
How can i detect one "shake" movement with accelerometer?
View 1 Replies
Oct 14, 2010
Using AIR for Android, is it possible to call from Flex into an NDK library? If so, how can this be done? I have a large C library that I need to use. I know that I can do this from an Android Java app (through JNI), but I have a large Flex codebase that I'd like to reuse.
View 2 Replies