ScrollPane problem dynamic

  • flatcedrik
  • Born
  • Born
  • flatcedrik
  • Posts: 2

Post 3+ Months Ago

Hello,
For a site dimage I have several buttons that are supposed to load into a scrollpane images.
My code works but there is a problem with scrollpane bars: you can not sen servir.Mon problem comes from my onEnterFrame but trying to add a deleteEnterFrame the end of my office, the images do not remain visible in the scrollpane
Here's the code:

bouton5.onRelease = function () {
container. _visible = true;
monscrollpane._visible = true;
file = "5";
_root.chargejournal = new LoadVars;
_root.chargejournal.onLoad = function () {
_root.createEmptyMovieClip ("container", 1);
_root.conteneur._x =- 9000;
_root.conteneur._y =- 9000;
for (i = 0; i <_root.chargejournal.nbphotos; i + +) {
_root.conteneur.attachMovie ("galerieMC", "gallery" + i, i);
_root.conteneur ["gallery" + i]. _x = _root. chargejournal ["espacephotos" + i];
_root.conteneur ["gallery" + i]. createEmptyMovieClip ("cadrephoto", 1);
_root.conteneur ["gallery" + i]. cadrephoto.loadMovie ("work /" + _root.dossier +"/"+_ root.chargejournal ["Title" + i] + ". jpg");
}
}
_root.chargejournal.load ("work /" + _root.dossier + "/ log. txt ");// in my log file, the number of pictures and their positions (space images) are shown.
advertising ();
};
public function () {
onEnterFrame = function () {
_root.monscrollpane.setScrollContent (_root.conteneur);
};
}
Jaimerai add more smoothing images loaded with addListener...I do not know where the application...
Thank you in advance for your help...
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • DEVNEB
  • Newbie
  • Newbie
  • User avatar
  • Posts: 9
  • Loc: Quebec

Post 3+ Months Ago

Très drôle le petit mix anglais/français... j'imagine que c'est une traduction automatique...

Peut-être que ce serait mieux (pour toi et pour moi) que tu m'expliques ton problème en français... car j'avoue que certains détails de ta demande et de ton code sont assez obscurs.

Mais vite de même, je ne vois pas pourquoi tu rafraichis ton scrollPane sur un enterFrame. Ton code devrait plutôt être :

Code: [ Select ]
bouton5.onRelease = function () {
    
    container. _visible = true;
    monscrollpane._visible = true;
    file = "5";
    
    _root.chargejournal = new LoadVars;
    _root.chargejournal.onLoad = function () {
        _root.createEmptyMovieClip ("container", 1); // ***** Tu crées un MC nommé "container", mais ensuite tu fais référence à "conteneur" ????
        //_root.conteneur._x =- 9000; // ***** Pourquoi déplacer ton contenu de cette façon, quel est l'intérêt ???
        //_root.conteneur._y =- 9000;
        for (i = 0; i <_root.chargejournal.nbphotos; i + +) {
            _root.conteneur.attachMovie ("galerieMC", "gallery" + i, i);
            _root.conteneur ["gallery" + i]. _x = _root. chargejournal ["espacephotos" + i];
            _root.conteneur ["gallery" + i]. createEmptyMovieClip ("cadrephoto", 1);
            _root.conteneur ["gallery" + i]. cadrephoto.loadMovie ("work /" + _root.dossier +"/"+_ root.chargejournal ["Title" + i] + ". jpg");
        }
            
        /******
        Le refresh de ton scrollContent ne devrait être fait qu'une seule fois...
        soit à la fin de ton onLoad (les images étant toute prêtes).
        De plus, je ne suis pas certain.. il me faudrait vérifier, mais normalement le
        scrollPane devrait s'ajuster automatiquement au contenu.
        *******/
        _root.monscrollpane.setScrollContent (_root.conteneur);
    }
    _root.chargejournal.load ("work /" + _root.dossier + "/ log. txt ");// in my log file, the number of pictures and their positions (space images) are shown.
    advertising ();
};
  1. bouton5.onRelease = function () {
  2.     
  3.     container. _visible = true;
  4.     monscrollpane._visible = true;
  5.     file = "5";
  6.     
  7.     _root.chargejournal = new LoadVars;
  8.     _root.chargejournal.onLoad = function () {
  9.         _root.createEmptyMovieClip ("container", 1); // ***** Tu crées un MC nommé "container", mais ensuite tu fais référence à "conteneur" ????
  10.         //_root.conteneur._x =- 9000; // ***** Pourquoi déplacer ton contenu de cette façon, quel est l'intérêt ???
  11.         //_root.conteneur._y =- 9000;
  12.         for (i = 0; i <_root.chargejournal.nbphotos; i + +) {
  13.             _root.conteneur.attachMovie ("galerieMC", "gallery" + i, i);
  14.             _root.conteneur ["gallery" + i]. _x = _root. chargejournal ["espacephotos" + i];
  15.             _root.conteneur ["gallery" + i]. createEmptyMovieClip ("cadrephoto", 1);
  16.             _root.conteneur ["gallery" + i]. cadrephoto.loadMovie ("work /" + _root.dossier +"/"+_ root.chargejournal ["Title" + i] + ". jpg");
  17.         }
  18.             
  19.         /******
  20.         Le refresh de ton scrollContent ne devrait être fait qu'une seule fois...
  21.         soit à la fin de ton onLoad (les images étant toute prêtes).
  22.         De plus, je ne suis pas certain.. il me faudrait vérifier, mais normalement le
  23.         scrollPane devrait s'ajuster automatiquement au contenu.
  24.         *******/
  25.         _root.monscrollpane.setScrollContent (_root.conteneur);
  26.     }
  27.     _root.chargejournal.load ("work /" + _root.dossier + "/ log. txt ");// in my log file, the number of pictures and their positions (space images) are shown.
  28.     advertising ();
  29. };
  • flatcedrik
  • Born
  • Born
  • flatcedrik
  • Posts: 2

Post 3+ Months Ago

Hello
Thank you for your response, I mexcuse to the "small mix English" it is well obviously dune independent automatic translation of my will, I not navais attention...
For my code:
-&gt; the also machine translation: I nai makes quun "container" and not a container and a container.
&gt; for "_root.conteneur._x = - 9000" is true it ny has no interest in moving my clip (it date dune another step where I loaded clip during the rest of my animation so I had to make it out of sight javais not even thought about _visible = false)
-&GT; if I remove the function carried out by the end of the onrelease (onenterframe = _root.monscrollpane.setScrollContent (_root.conteneur);) then more visible scroll nest bar and the clip is beyond the area of the scrollpane.
-&GT; if I put the function _root.monscrollpane.setScrollContent (_root.conteneur); as you wash is on your code, then the scroll bar is visible (after the second click on the button...) but is not adapted to the size of the clip (it sadapte from the click on this button even 3rd) and the clip exceeds the scrollpane...

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 11 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.