|
#1
|
|||
|
|||
|
hai to all plz help me
i want to know about xml photo gallery. i tried but i couldnot understand. i have two pics and description for it in xml--its is fine i used attributes for filename url and desc. i had loaded one pic in the temp movieclip in flash but i couldnot load another pic in another movieclip. plz help me |
|
#2
|
||||
|
||||
|
It would help if you posted the code you are using. Also you only need one topic per question. Starting multiple threads about the same thing is frowned upon in most communities, including this one.
Post your code here and we will go from there. |
|
#3
|
|||
|
|||
|
i am sorry for it
i tried with two files first files :- var main:Array = new Array(); myPhoto = new XML(); myPhoto.ignoreWhite = true; myPhoto.onLoad = function(success) { //portfolioTag = this.firstChild; var numimages = this.firstChild.childNodes.length; trace(numimages); vspacing = 100; for (i=0; i<numimages; i++) { this.holder_mc = this.firstChild.childNodes[i]; this.thumb_mc = thumb_mc.createEmptyMovieClip("thumb_mc"+i, i); this.thumb_mc._y = i*vspacing; this.thumbLoader = this.thumb_mc.createEmptyMovieClip("thumb_mc"+i, 0); this.thumbLoader.loadMovie(this.holder_mc.attributes.thmb); _root.desc_txt.text = this.holder_mc.attributes.desc; trace(_root.desc_txt.text); this.thumb_mc.main[i] = this.holder_mc.attributes.pics; trace(this.thumb_mc.main[i]); this.thumb_mc.onPress = function() { holder_mc.loadMovie(this.main); desc_txt.text = this.desc; }; } }; myPhoto.load("cont.xml"); second file: var thmpics:Array = new Array(); var mainpics:Array = new Array(); var desc:Array = new Array(); var xl:XML = new XML(); xl.load("cont.xml"); xl.ignoreWhite = true; xl.onLoad = function(ok) { if (ok) { total = xl.firstChild.childNodes.length; for (i=0; i<total; i++) { thmpics[i] = xl.firstChild.childNodes[i].attributes.thmb; trace(thmpics[i]); mainpics[i] = xl.firstChild.childNodes[i].attributes.pics; trace(mainpics[i]); desc[i] = xl.firstChild.childNodes[i].attributes.desc; trace(desc[i]); _root.thumb_mc.createEmptyMovieClip("thumb_mc"+i, i); thmpics[i]; "thumb_mc"+i.loadMovie(thmpics[i]); trace("loded"); //_root.thumb_mc.loadMovie(thmpics[i]); //thumb_mc._x = thumb_mc._x*10; thumb_mc.onPress = function() { _root.holder_mc.loadMovie(mainpics[i]); _root.desc_txt.text = desc[i]; }; } } else { trace("XML not loaded"); } }; |
|
#4
|
||||
|
||||
|
The first one looks fine.. unless I am missing something. What does your XML look like?
Here is a working AS file for loading thumbnails and photos into the file: Code:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.load("xmlphoto.xml");
myPhoto.onLoad = function(success) {
numimages = this.firstChild.childNodes.length;
spacing = 70;
for (i=0; i<numimages; i++) {
picHolder = this.firstChild.childNodes[i];
this.thumbHolder = _root.thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._x = i*spacing;
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.main = this.picHolder.attributes.main;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image"+i, i);
this.thumbLoader.loadMovie(picHolder.attributes.thmb);
thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
};
}
};
|
|
#5
|
|||
|
|||
|
hai to all
here thumbs r loaded dynamic but what i want is when i click on them the main pics should be loaded in holder_mc. and on rollover they should be alpha=100% plz correct them and send plzzzzzzzzzzz i am enable to upload file how to upload here? |
|
#6
|
||||
|
||||
|
Make sure you go to "Advanced" Reply. Then under the text box is the "manage attachments" option.
The allowed file types are listed there along with the "browse" to find it locally. Alternately you can upload it to your server and link to it in a post. |
|
#7
|
|||
|
|||
|
here i dont have a server to upload
|
|
#8
|
||||
|
||||
|
Oops... after you browse to your file, make sure you click the "upload" button as well
![]() If it is an invalid file type (swf, fla etc) put it in a zip file first. Then upload the zip file. |
|
#9
|
|||
|
|||
|
it's ok
i have a prob here what i did is i made a gallery its work fine. i made a mc. in that the gallery is there. so that i can link that photogallery mc to scroll pane its worked fine. on top of it i have a dynamic textbox where if i press on the thumbs the correspondent desc should loaded in that textbox.say how to do i know this will confuse u becoz no source kada ok thx for the help |
|
#10
|
||||
|
||||
|
So the gallery works fine?
The text box works fine? The loading of the full picture into the holder_MC does not work? Is this correct? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|