Javascript static method

<html>
<head>
	<script type="text/javascript" src="external.js"></script>
	<script type="text/javascript">
		Serhat.show();
	</script>
</head>
<body>
</body>
</html>

var Serhat = (function(){

	function show()
	{
		return alert("message");
	}
	

	return
	{
		show: show
	}

})();
Advertisements

My new app on Android devices – 1

Hey I thought new app for only android devices. It’s called “InstaVideo” this application aims to shows instagram video using to instagram #tag and shows a lot of videos related tag. For example user enters the instavideo application and search it like this “#funny” and subsequently shows him a lot video related “#funny” tag.

I just starting think how do I do it ? Here I am going to share steps what I’ve done.

TweenMax için göreceli duration hesabı

stage.addEventListener(MouseEvent.CLICK, onclick);

var pixel_per_second:Number = 100;

function onclick(event:MouseEvent):void
{
	trace(getDuration(mc.x, stage.mouseX));
}

function getDuration(startX:Number, destinationX:Number)
{
    var duration:Number = Math.abs((startX - destinationX) / pixel_per_second);
    return duration;
}