
Код:
image_mc.m = 100;
image_mc.action = "ready";
image_mc.onEnterFrame = function() {
// trace( this.action + " " + this.m );
if ( this.action == "ready" ) {
// sit idle
} else if ( this.action == "close" ) {
this.m -= ( this.m - 0 ) * .33;
if ( Math.round( this.m ) == 0 ) {
this.m = 0;
this.action = "ready";
this.image.loadMovie( this.my_url );
show_progress_bar();
}
// Cosing animation here m is animated from 100 down to 0
for ( var p in this.mask ) { // set a property of all of the mask clips to m
this.mask[ p ]._xscale = this.m; // set xscale to m
this.mask[ p ]._yscale = this.m; // set yscale to m
}
} else if ( this.action == "open" ) {
this.m -= ( this.m - 100 ) * .33;
if ( Math.round( this.m ) == 100 ) {
this.m = 100;
this.action = "ready";
}
// opening animation
for ( var p in this.mask ) { // use the for in loop to find all of the clips in the mask clip
this.mask[ p ]._xscale = this.m;
this.mask[ p ]._yscale = this.m;
}
}
};
image_mc.load_image = function( the_url ) {
//trace( "Loading:" + the_url );
this.my_url = the_url;
this.action = "close";
};
progress_mc._visible = false;
show_progress_bar = function() {
// trace( "showing progress bar" );
progress_mc._visible = true;
progress_mc.bar_mc._xscale = 0;
progress_mc.percent_txt.text = "0%";
progress_mc.onEnterFrame = function() {
var b = image_mc.image.getBytesLoaded();
var t = image_mc.image.getBytesTotal();
if ( b > 100 ) {
var p = ( b / t ) * 100;
this.bar_mc._xscale = p;
this.percent_txt.text = Math.round( p ) + "%";
if ( b == t ) {
this._visible = false;
image_mc.action = "open";
delete this.onEnterFrame;
}
}
};
};
stop();
b_0.onRelease= function() {
cont.load('w_0.jpg' );
cont.onMouseDown = function () {
trace ("onMouseDown called");
getURL ('http://www.mariyas.net/rock', false);
stop();
}
};
b_1.onPress= function() {
cont.loadMovie( 'w_1.jpg' );
this.onMouseDown = function () {
trace ("onMouseDown called");
getURL ("http://newmedia.academyart.edu/~02046141/products", false) ;
}
clear();
stop();
};
b_2.onPress = function() {
cont.loadMovie( 'w_2.jpg' );
this.onMouseDown = function () { trace ("onMouseDown called");
getURL ("http://mariyas.net/mojave/table.html",false) ;
}
clear();
stop();
};
b_3.onPress = function() {
cont.load( "w_3.jpg" );
this.onMouseDown = function () {
getURL ("http://newmedia.academyart.edu/~02046141/menu2.php",false) ;
}
clear();
stop();
};
b_4.onPress=function() {
cont.loadMovie( "w_4.jpg" );
this.onMouseDown = function () {
trace ("onMouseDown called");
getURL ("http://mariyas.net/zen/zen.html", false) ;
}
clear();
stop();
};
b_5.onPress = function() {
cont.loadMovie( "w_5.jpg" );
this.onMouseDown = function () {
trace ("onMouseDown called");
getURL ("http://mariyas.net/ch", false) ;
}
clear();
stop();
};
b_6.onPress = function() {
cont.loadMovie( "w_6.jpg" );
this.onMouseDown = function () {
trace ("onMouseDown called");
getURL ("http://newmedia.academyart.edu/~02046141/FINAL", false) ;
}
clear();
stop();
};
/***
stop();
b_0.onRelease= function() {
gotoAndStop('web1');
};
v1.onRelease=function(){
getURL ("www.mariyas.net/mojave/table.html") ;
};
****/