Esato Mobile
Sony Ericsson / Sony : Software, Firmware and Drivers : K850i Accelerometer + Flash Lite 2.0
> New Topic
> Reply
< Esato Forum Index > Sony Ericsson / Sony > Software, Firmware and Drivers > K850i Accelerometer + Flash Lite 2.0 Bookmark topic
Page <  123456789>

LCARS-Expert Posts: 194


On 2008-08-14 18:38:45, N34_racer wrote:
hi im new here does any one know any tutorials or could tell me how to create those rotating images that are on Lcars website

thanks


Do you know your way around Adobe Flash CS3?
--
Posted: 2008-08-14 19:32:35
Edit : Quote

Tsepz_GP Posts: > 500

This is so cool! Im learning new things about this phone everyday. sum realy cool stuff here!
--
Posted: 2008-08-14 20:38:56
Edit : Quote

N34_racer Posts: 4

i know my way round roughly if i had a good tutorial id be fine

[ This Message was edited by: N34_racer on 2008-08-15 09:22 ]
--
Posted: 2008-08-15 10:21:01
Edit : Quote

LCARS-Expert Posts: 194

The point is that you use accelerometer data which is explained in first post of this topic. This is the finished script:

onEnterFrame = function () {
displayDevice = substring(eval("/:$version"), 0, 2) == "FL" ? "phone" : "pc";
if (displayDevice == "phone") {
loadVariables("accelerometer://data", _root);
var angle = Math.round(Math.atan2(_root.accX, _root.accY)*10000)/10000;
rotAngle = angle*57.29577;
var dr = rotAngle-rotatedMc._rotation;
if (Math.abs(dr)>180) {
dr = dr>0 ? dr-360 : 360+dr;
}
rotatedMc._rotation += dr/5;
} else {
var angle = Math.atan2((_root._xmouse-120), (_root._ymouse-160));
rotatedMc._rotation = angle*-57.29577;
}
};

This will rotate a movie clip with instance name rotatedMc as you tilt your phone.
--
Posted: 2008-08-15 12:34:38
Edit : Quote

N34_racer Posts: 4

sorry when i said roughly i meat very roughly sory

could you explain it from start to end
ive used flash bofore at school at a bit at home but im a novice

thanks
--
Posted: 2008-08-15 15:06:02
Edit : Quote

LCARS-Expert Posts: 194

Make a new Flash (ActionScript 2.0) document.
Click Settings (in Properties tab), set Version to Flash Lite 2.0 and click ok. Set size to 240x320 and frame rate to 25fps or 30fps, whichever you want.
Click on the first frame, press F9 to display the Actions panel and paste the script I wrote in my previous message. Close the Actions panel, click to lock the layer which now has frame with actions and create a new layer. Press CRTL + F8, the window opens, select Movie Clip, and name it "Rotated". What you put in this movie clip will be rotated.
To get it all done now and put your graphic later just draw a square, select it, press CTRL + K to open the Align panel, "To Stage" button must be clicked, and align the square to the middle. Go back to the stage, drag&drop the movie clip to the stage, use the Align panel to align it to the middle, while movie clip is still selected in the Properties panel under the name of the movie clip type "rotatedMc". Now the script will rotate the movie clip. If you want to change the image, change the contents of that movie clip.

Here, this is text tutorial on quick. If you don't understand something just ask.

[ This Message was edited by: LCARS-Expert on 2008-08-15 17:09 ]
--
Posted: 2008-08-15 18:05:46
Edit : Quote

N34_racer Posts: 4

"while movie clip is still selected in the Properties panel under the name of the movie clip type "rotatedMc". Now the script will rotate the movie clip"

sory i didnt understand this part

thanks
--
Posted: 2008-08-16 11:33:03
Edit : Quote

LCARS-Expert Posts: 194

When Movie Clip is selected look to the Properties panel (down). The field that says with grey letters (lower left). Click in it and type "rotatedMc" (without quotes).
--
Posted: 2008-08-16 13:02:05
Edit : Quote

DarKMaGiCiaN Posts: > 500

I just see the thread !!!!

K850 and flash

that why I love me K850

this is one of the themes I created for my K850



I also created a themes that contains weeks
as will as day and night thems and the movment of the sun or moon

^_^


--
Posted: 2008-08-16 13:24:10
Edit : Quote

v2kai Posts: 1

need for speed prostreet is a good accelerometer based game too from the c902
anyone make a magic 8-ball game yet!?????
--
Posted: 2008-08-27 08:56:12
Edit : Quote
Page <  123456789>

New Topic   Reply
Forum Index

Esato home