Hi…
I just d/l the fla source from kirupa and then what I want to do is I wanna load the data from dtbase using php into flash.meaning that after it’s finishing sliding the page then it’ll load the data using loadvars…and I want everytime I slide to that particular page it’ll load the data…hope you guys clear about it…
this is the code in the fla
var currentPosition:Number = contentHold.content1._x;
var startFlag:Boolean = false;
function menuSlide(input:MovieClip) {
if (startFlag == false) {
startFlag = true;
var finalDestination:Number = input._x;
var distanceMoved:Number = 0;
var distanceToMove:Number = Math.abs(finalDestination-currentPosition);
var finalSpeed:Number = .3;
var currentSpeed:Number = 0;
var dir:Number = 1;
if (currentPosition<=finalDestination) {
dir = -1;
} else if (currentPosition>finalDestination) {
dir = 1;
}
this.onEnterFrame = function() {
currentSpeed = Math.round((distanceToMove-distanceMoved+1)*finalSpeed);
distanceMoved += currentSpeed;
contentHold._x += dir*currentSpeed;
if (Math.abs(distanceMoved-distanceToMove)<=1) {
contentHold._x = maskMovie._x-currentPosition+dir*distanceToMove;
currentPosition = input._x;
startFlag = false;
delete this.onEnterFrame;
trace("done slide");
//I guess this portion I have to load the data using loadvars object
}
};
}
};
var contentArr:Array = [contentHold.content1,contentHold.content2,contentHold.content3,contentHold.content4,contentHold.content5];
for(var i=0;i<5;i++){
this["b"+i].ivar = i;
this["b"+i].onPress = function(){
menuSlide(contentArr[this.ivar]);
}
}
Hope someone will give me the idea
thanks
http://fifin04.propertyaccess.com.my/teststuff/easing_source_final.fla