//------------------------------------------
//class page
//------------------------------------------
page = function(fill,line,destination,name,deep,mc,cube){
this.fill=fill;
this.line=line;
this.movie=destination.createEmptyMovieClip(name,deep);
this.movie.createEmptyMovieClip("objo",1);
this.movie.objo.createEmptyMovieClip("mc",1);
this.movie.objo.mc.createEmptyMovieClip("clip",1);
this.movie.objo.mc.clip.createEmptyMovieClip("container",1);
this.movie.objo.mc.clip.container.loadMovie(mc);
this.movie.createEmptyMovieClip("obju",2);
this.movie.obju.createEmptyMovieClip("mc",1);
this.movie.obju.mc.createEmptyMovieClip("clip",1);
this.movie.obju.mc.clip.createEmptyMovieClip("container",1);
this.movie.obju.mc.clip.container.loadMovie(mc);
waitForInit(this.movie.objo.mc.clip.container,this.movie.obju.mc.clip.container,cube);
}
function waitForInit(object1,object2,cube)
{
function callback() {
if(object2._width>0)
{
clearInterval(intervalID);
matchPerspective(object1,object2,cube);
}
}
var intervalID;
intervalID = setInterval(callback,33,object1,object2,cube);
}
function matchPerspective(obj1,obj2,cube)
{
for (var i in obj1)
{
if(typeof(obj1[i])=="movieclip"&&obj1[i]._name=="spacer")
{
obj1._xscale=cube.border/obj1[i]._width*100;
obj1._yscale=cube.border/obj1[i]._height*100;
obj2._xscale=cube.border/obj1[i]._width*100;
obj2._yscale=cube.border/obj1[i]._height*100;
}
if (typeof(obj1[i].text)=="string"&&typeof(obj1[i])=="object"&&obj1[i]._name!=null)
{
obj1[i].onScroller=function()
{
obj2[i].scroll=obj1[i].scroll;
}
obj2[i].onScroller=function()
{
obj1[i].scroll=obj2[i].scroll;
}
}
if (typeof(obj1[i]) == "movieclip")
{
matchPerspective(obj1[i],obj2[i],cube);
}
}
}
Object.registerClass("page",page);
//------------------------------------------