![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 185 Pomógł: 10 Dołączył: 29.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Mam problem z galerią, która pobiera nazwy plików z XML a pliki z osobnych katalogów. Zdjęcia jak najbardziej się wyświetlają, ale nie wiem jak zrobić by po kliknięciu zostały one załadowane do komponentu Scroll Panel.
Kod Kod AS wygląda tak:
var slideShowXML:XML = new XML(); var slideShow:Array; function showThumbs() { var thumbLevel:Number = 200; for( var thumbLoopIndex:Number = 0; thumbLoopIndex < slideShow.length; thumbLoopIndex++ ) { var kbPictureNode:XMLNode = slideShow[thumbLoopIndex]; var kbPicture:String = kbPictureNode.attributes.file; var thumbPic:MovieClip = _root.createEmptyMovieClip( "thumb" + thumbLoopIndex, thumbLevel + thumbLoopIndex ); thumbPic._y = (Math.floor(thumbLoopIndex % 8) * 45) + 10; // 8 pictures are in a row 40 pixels high thumbPic._x = 10; // each picture is 60 pixels wide thumbPic._alpha = 100; thumbPic.loadMovie( "thumbs/" + kbPicture ); } } slideShowXML.onLoad = function( success:Boolean ):Void { var slideShowRoot:XMLNode = slideShowXML.firstChild; slideShow = slideShowRoot.childNodes; showThumbs(); } slideShowXML.ignoreWhite = true; slideShowXML.load( "ogien.xml" ); thumbLoopIndex.onRelease=function(){ pokaz.contentPath="thumbs/" + kbPicture; } Ten post edytował marian84 21.02.2008, 21:12:48 |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 6.07.2025 - 06:20 |