Esato Mobile
Sony Ericsson / Sony : Software, Firmware and Drivers : How to make auto-rotate function in Flash Lite 2.0 (K850i)
> New Topic
> Reply
< Esato Forum Index > Sony Ericsson / Sony > Software, Firmware and Drivers > How to make auto-rotate function in Flash Lite 2.0 (K850i) Bookmark topic
Page <  12345678>

Krzysiecw Posts: 218

Is it possible to give us a link to file swf where You use "shake control" like on your movie on YouTube ?
--
Posted: 2007-12-20 10:28:34
Edit : Quote

LCARS-Expert Posts: 194

I'm rather busy this week. I won't share source files in development. When I finish them I'll share them.
Swf file isn't finished yet, I don't have enough time to work on it. Unfortunately its impossible to make 2 directions because when you shake your phone acceleromoter gets pulled in 2 directions so it detects both.
--
Posted: 2007-12-20 13:53:01
Edit : Quote

notice Posts: 2

Hi all!
Thanks a lot for these treads. I've done some simple bg for sonyericsson w910 or k850.
it's based on the automatic rotation example.

link to this file:
http://www.sulikereso.hu/watermeter.swf

Marcell
--
Posted: 2007-12-22 02:06:31
Edit : Quote

wopstickle Posts: 8

Forgive me if this isn't possible.. but I've never actually worked with actionscript..

Assuming that there's no available 'event' style system for a change in accelerometer data... only polling.. I figured it might be possible to get your shake left / shake right code working...

If you notice when you shake the fone to the right, the arrow will drag to the left then as you stop instantly shoot towards the right.. hopefully faster than 990/-990...

So have one 'control' thread... polling the hell out of those vars.. as fast as possible
Lets use.. say.. a 0.5 sec window ... in which the fone can be shook left->right..

If we're shaking the fone to the right, then the accelerometer will register
no more than 0.5 secs.. before resetting it


Now while shookleft = true.. wait for the fone to come to a stop, whereby the accelerometer will fly to the right causing a >900 ...

At this point you'll know that the fone's been shook left -> right?


Lemme know if you have any joy with this idea.. not really paying much attention as I type it, but it seems to make sense..

--
Posted: 2007-12-29 00:04:54
Edit : Quote

wopstickle Posts: 8

Forgive the double postage.. but I figured it was worth splitting this..

First, a little treat..
http://www.wopstick.com/bouncystars_test.swf



It's a little rough around the edges, but I started learning actionscript a grand total of 4 hours ago.. so give me some credit here..
The stars will fall to the bottom of the screen and bounce around and off the edges etc... but shake the fone and they'll shoot off in whichever direction you shook..

While doing this I realised I accidentally solved the shake left / shake right problem..

Immagine an image... with x/y pos in one array, and x/y velocity in another.. (initial pos 100,100, vel 0,0 )

shake the fone to the right, triggering the left side of the accelerometer... which adds say 10 to the velocity, the image's position then has the velocity added, i.e in pseudocode.

if (accX if (accX > 990) { Xvelocity -= 14; }

Xposition += Xvelocity;

Xvelocity *= 0.5;
if (Xvelocity -0.1) { Xvelocity = 0; }

Thus over the course of 12 frames/sec, the velocity should have hit 0 again, but your image will have shaken either right or left...

It's all a matter of balancing the numbers I guess, but after your image has traveled say 10/20 pixels, you can put it back to the center and reset it's position..


Now just remove the image and use the numbers themselves
--
Posted: 2007-12-29 08:19:02
Edit : Quote

nivo22 Posts: 72

now that was c00l... thx
can anyone post how do i add script in my flash ..?
(i am using flash cs3)
--
Posted: 2007-12-29 13:12:49
Edit : Quote

wopstickle Posts: 8

Generally, I guess you'll make a layer for your scripts first, to control the flow..
then another layer for the pictures themselves..

Select the frame you want in the scripts layer, then hit F9 and it should pop up the actions/scripts window.

Try LCARS' example, or
http://www.lukamaras.com/tuto[....]oving-rotating-movie-clip.html

This is the page I learned from
--
Posted: 2007-12-29 15:15:44
Edit : Quote

nivo22 Posts: 72

ok thanx:D
Cool site but not uses autorotate
_________________
W910 Owner
M2 2 GB CARD


[ This Message was edited by: nivo22 on 2007-12-29 14:48 ]
--
Posted: 2007-12-29 15:46:15
Edit : Quote

nivo22 Posts: 72

Lcars dont know ifa already mentioned but you made a mistake
on frame 3
Frame 3:
fscommand2("ExtendBacklightDuration");
fscommand2("FullScreen");

loadVariables("accelerometer://data", _root);
if ((accX 800)) {
gotoAndPlay(3);
}

the mistake is gotoplay(3) instead of 3- 1right? gotoAndPlay(1);
--
Posted: 2007-12-29 16:24:40
Edit : Quote

LCARS-Expert Posts: 194

@nivo22, indeed. I made it while adding font styles to make the font look like the actual ActionScript. Thank you for your report!

Btw, I'm making my project page that will contain all K850i Accelerometer related Flash animations and other animations too along with their source files. Please be patient. When I finish the page I'll put the link to my sig.
--
Posted: 2007-12-29 17:40:45
Edit : Quote
Page <  12345678>

New Topic   Reply
Forum Index

Esato home