Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Scaleform accelerometer access

0 REPLIES 0
Reply
Message 1 of 1
t_bhatb
355 Views, 0 Replies

Scaleform accelerometer access

Hi,

 

I am trying to access the Accelerometer in an Android and iOS device. Using the following Lua code:

 

--Acc
myAcc = scaleform.Accelerometer.create();
if myAcc then
scaleform.Accelerometer.set_requested_update_interval(myAcc,100);
end
local AccListener = scaleform.EventListener.create(AccListener, function(e)

print("X: "..e.data.accelerationX.." Y: "..e.data.accelerationY.." Z: "..e.data.accelerationZ);

end );

scaleform.EventListener.connect(AccListener, thisActor,scaleform.EventTypes.AccelerometerUpdate);

 

Are there any steps I am missing other than code?

 

Thanks

Bhaskar

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report