cristi_tulcea
04-19-2005, 12:17 PM
a photo gallery. maybe it's not as2 code but the other code i use in the gallery won't work only in fp7, as2.
the site is http://www.work.ro/cristi/ralImageVue/
everithing is working fine except when i'm attempt to load the big picture. the way i do is:
-load the picture
-see his coordinates and dimensions
-center it: the middle of the picture is the middle of the free area left on the page.
-then center a black square under it.
on mozzila seems not to work every time, if you insist you'll see how showld be working and how it's working.
in explorer it's no problem.
incarca_poza_aici= the movie where is loaded the picture
rama=that black contour.
loader=a movie where it's a dinamic text preloader.
start_anim=a movie that animate the picture after it's loaded.
Code:
var distx = 280;
var disty = 245;
var margini_rama = 40;
loader._visible = false;
rama._visible = false;
this.onEnterFrame = function() {
if (can_get) {
trace("..........CAN GET............");
if (incarca_poza_aici.getBytesLoaded() != incarca_poza_aici.getBytesTotal()) {
trace("..........INCA INCARCA............");
loader.loader = String("Loader: "+Math.round(incarca_poza_aici.getBytesLoaded()/1000)+"Kb - "+
Math.round(incarca_poza_aici.getBytesLoaded()*100/incarca_poza_aici.getBytesTotal())+"%");
} else {
trace("..........SA INCARCAT............");
incarca_poza_aici._x = distx-incarca_poza_aici._width/2;
incarca_poza_aici._y = disty-incarca_poza_aici._height/2;
rama._visible = true;
rama._width = incarca_poza_aici._width+margini_rama;
rama._height = incarca_poza_aici._height+margini_rama;
rama._x = incarca_poza_aici._x-margini_rama/2;
rama._y = incarca_poza_aici._y-margini_rama/2;
start_anim.gotoAndPlay(2);
can_get = false;
loader._visible = false;
}
}
};
thanks in advance. i'll be very thankfull if you know whats the problem with mozilla. if you need can i extract only this part and save as fla to see more clear the code.
the site is http://www.work.ro/cristi/ralImageVue/
everithing is working fine except when i'm attempt to load the big picture. the way i do is:
-load the picture
-see his coordinates and dimensions
-center it: the middle of the picture is the middle of the free area left on the page.
-then center a black square under it.
on mozzila seems not to work every time, if you insist you'll see how showld be working and how it's working.
in explorer it's no problem.
incarca_poza_aici= the movie where is loaded the picture
rama=that black contour.
loader=a movie where it's a dinamic text preloader.
start_anim=a movie that animate the picture after it's loaded.
Code:
var distx = 280;
var disty = 245;
var margini_rama = 40;
loader._visible = false;
rama._visible = false;
this.onEnterFrame = function() {
if (can_get) {
trace("..........CAN GET............");
if (incarca_poza_aici.getBytesLoaded() != incarca_poza_aici.getBytesTotal()) {
trace("..........INCA INCARCA............");
loader.loader = String("Loader: "+Math.round(incarca_poza_aici.getBytesLoaded()/1000)+"Kb - "+
Math.round(incarca_poza_aici.getBytesLoaded()*100/incarca_poza_aici.getBytesTotal())+"%");
} else {
trace("..........SA INCARCAT............");
incarca_poza_aici._x = distx-incarca_poza_aici._width/2;
incarca_poza_aici._y = disty-incarca_poza_aici._height/2;
rama._visible = true;
rama._width = incarca_poza_aici._width+margini_rama;
rama._height = incarca_poza_aici._height+margini_rama;
rama._x = incarca_poza_aici._x-margini_rama/2;
rama._y = incarca_poza_aici._y-margini_rama/2;
start_anim.gotoAndPlay(2);
can_get = false;
loader._visible = false;
}
}
};
thanks in advance. i'll be very thankfull if you know whats the problem with mozilla. if you need can i extract only this part and save as fla to see more clear the code.