Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: xml photo gallery in flash mx 2004

  1. #1
    Join Date
    Jan 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face xml photo gallery in flash mx 2004

    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. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Jan 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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;
    };
    }
    };
    Take a look and see if you are missing anything...
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Jan 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face xml gallery plz

    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. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #7
    Join Date
    Jan 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    here i dont have a server to upload

  8. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #9
    Join Date
    Jan 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    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?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •