Results 1 to 2 of 2

Thread: Gallery code working inside of a mc

  1. #1
    Join Date
    Jun 2008
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Gallery code working inside of a mc

    Hei everybody,

    I have this very simple problem:

    I have my flash xml gallery which works perfectly. Now I just want to put the code inside of a MC (movie clip) so that I can manipulate the whole mc.

    The problem is that after I put the code inside of the MC it doesn't work anymore.

    I know it's a stupid question but I can't seem to figure it out.

    I'd really appreciate your help, because I'm kind in a hurry with this project.

    Thank you!

  2. #2
    Join Date
    Jun 2008
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    import templateGallery.mvcgallery.*;
    import templateLoader.mvctemplate.*
    stop();

    /////////////////////////////////////////////////////////////

    var mc:MovieClip = this.createEmptyMovieClip("mc_container", 100);
    mc._x = 0;
    mc._y = 0;
    var gallery:Gallery = new Gallery(mc);
    m = gallery.__model;

    /////////////////////////////////////////////////////////////

    function loadDate(url_){
    date = new XML();
    date.ignoreWhite = true;
    date.onLoad =Delegate2.create(this,this.onLoadedXml)
    date.load(url_);
    }

    //////////////////////////////////////////////////////////

    function onLoadedXml() {
    create_gallery(date.firstChild)
    };

    /////////////////////////////////////////////////////////

    function create_gallery(xml_:XMLNode){
    var array = XML_.getArrayObject(xml_);
    array.unshift("");
    ///////////////////////////////////
    m.setData(array);
    /////////////////
    m.loadThumb();
    ///////////////////
    //m.loadImage(1);

    }

    /////////////////////////////////////////////////////////////////////

    if(_root==this){
    loadDate("xml/gallery1.xml")
    }else{
    create_gallery(Loader.getInstance().__model.__dateTemplate.firstChild)
    }

    /////////////////////////////////////////////////////////////////////

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
  •