3 # Programming Languages {#programming-languages}
5 DALi applications can be written in several different programming languages.
10 Dali::Actor actor = Dali::Actor::New();
11 actor.SetParentOrigin( Dali::ParentOrigin::CENTER );
12 actor.SetAnchorPoint( Dali::AnchorPoint::CENTER );
13 Dali::Stage::GetCurrent().Add( actor );
15 bool OnPressed( Dali::Actor, const TouchEvent& event )
17 Dali::Animation anim = Dali::Animation::New( 1.5f );
18 anim.AnimateTo( Property( actor, Actor::Property::POSITION ), Vector3( 200,-100,0), AlphaFunctions::Bounce );
20 return true; // consume the touch event
23 actor.TouchedSignal().Connect( &OnPressed );
28 ## JavaScript {#java-script-support}
31 var actor = new dali.Actor();
32 actor.parentOrigin = dali.CENTER;
33 actor.anchorPoint = dali.CENTER;
34 dali.stage.add( actor );
36 function onPressed( actor, touchEvent )
38 var animOptions = { alpha: "bounce", delay: 0, duration: 15 };
39 var anim = new dali.Animation();
40 anim.animateTo( actor, "position", [ 200,-100,0], animOptions );
42 return true; // consume the touch event
45 actor.connect( "touched", onPressed );
49 ## JSON {#json-support}
62 "property":"position",
64 "alpha-function": "BOUNCE"
74 "anchor-point": "CENTER",
75 "parent-origin": "CENTER",
78 { "name" : "touched", "action": "play", "animation": "move" }