Bonjour,
J'ai un soucis de redomensionnement d'image. J'explique le processus :
Création d'une fiche à la volée contenant texte et image chargés dynamiquement.
Sur cette fiche possibilité de zoom sur l'image.
possibilité de fermeture de la partie texte.
Quand je ferme la partie texte, avec la version publiée flash 6, l'image se redimensionne et occupe toute la surface.
Mon pb avec la version publiée flash player 7 et 8 elle ne se redimensionne pas lors de la fermeture de la zone texte.
Code :
initialisation sur la scène principale :
// Chargements de la base des oeuvres :
DATA = new XML();
DATA.ignoreWhite = true;
DATA.load('doc/catalogue.xml');
// Initialisation des variables globales
_global.sel_auteurs = 'All';
_global.sel_siecles = 'All';
_global.sel_genres = 'All';
_global.sel_pays = 'All';
_global.sel_villes = 'All';
_global.lang = 'fr';
// Definition de la fonction d'affichage des oeuvres (fiche complete)
function afficheOeuvre(ID)
{
//trace(ID)
for(n in _global.catalogue){
if(_global.catalogue[n][0] == ID){
TMP = _global.catalogue[n];
break;
}
}
//trace(TMP)
if(TMP != undefined)
{
iniOeuvre = new Object;
iniOeuvre._visible = false;
_root.attachMovie('detail_oeuvre','FICHE',1000,iniOeuvre);
_root.FICHE._x = 512;
_root.FICHE._y = 382;
_root.FICHE.myOeuvre = TMP;
_root.FICHE.gotoAndPlay(1);
_root.FICHE._visible = true;
}
}
// Definition de la fonction d'affichage des legendes seules (panorama)
function afficheLegende(ID)
{
//trace(ID)
for(n in _global.catalogue){
if(_global.catalogue[n][0] == ID){
TMP = _global.catalogue[n];
break;
}
}
//trace(TMP)
if(TMP != undefined)
{
iniOeuvre = new Object;
iniOeuvre._visible = false;
_root.attachMovie('mini_oeuvre','LEGEND',1000,iniOeuvre);
//_root.LEGEND._x = _xmouse;
//_root.LEGEND._y = _ymouse;
_root.LEGEND._x = 540;
_root.LEGEND._y = 385;
_root.LEGEND.myOeuvre = TMP;
_root.LEGEND.gotoAndPlay(1);
_root.LEGEND._visible = true;
}
}
// Definition de la fonction d'affichage des legendes dates (chronologie)
function afficheLegendec(ID)
{
//trace(ID)
for(n in _global.catalogue){
if(_global.catalogue[n][0] == ID){
TMP = _global.catalogue[n];
break;
}
}
//trace(TMP)
if(TMP != undefined)
{
iniOeuvre = new Object;
iniOeuvre._visible = false;
_root.attachMovie('chrono_oeuvre','CHRONO',1000,iniOeuvre);
//_root.LEGEND._x = _xmouse;
//_root.LEGEND._y = _ymouse;
_root.CHRONO._x = 540;
_root.CHRONO._y = 350;
_root.CHRONO.myOeuvre = TMP;
_root.CHRONO.gotoAndPlay(1);
_root.CHRONO._visible = true;
}
}
code sur le clip détail oeuvre :
// gestion du zoom "souple" au rollover
onEnterFrame = function(){
if(zoomp.hitTest(_root._xmouse, _root._ymouse, false)){
dphoto.photo.cWidth = dphoto.photo._width + dphoto.photo._width*1/100
dphoto.photo.cHeight = dphoto.photo._height + dphoto.photo._height*1/100
}
if(zoomm.hitTest(_root._xmouse, _root._ymouse, false)){
newW = dphoto.photo._width - dphoto.photo._width*1/100
newH = dphoto.photo._height - dphoto.photo._height*1/100
if(newW >= dphoto.photoMWidth || newH >= dphoto.photoMHeight){
dphoto.photo.cWidth = newW
dphoto.photo.cHeight = newH
}
else{
dphoto.photo.cWidth = photoMWidth
dphoto.photo.cHeight = photoMHeight
}
}
}
merci de vos réponses...