Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to load 2 xml galleries in single function loop.

New Here ,
Jul 04, 2013 Jul 04, 2013

how to load 2 xml galleries in single function loop.

my function is--------

var myGalleryXML = new XML();

myGalleryXML.ignoreWhite = true;

myGalleryXML.load("gallery.xml");

function callThumbs()

{

    _root.createEmptyMovieClip("wall",_root.getNextHighestDepth());

    wall._x = _root.gallery_x;

    wall._y = _root.gallery_y;

    wall.addEventListener(MouseEvent.CLICK);

    var clipLoader = new MovieClipLoader();

    var preloader = new Object();

    clipLoader.addListener(preloader);

   

        for (i =0; i <6; i++)

   

    {

        thumbURL = myImages.attributes.thumb_url;

        myThumb_mc = wall.createEmptyMovieClip(i, wall.getNextHighestDepth());

        myThumb_mc._x = _root.thumb_height * i;

        myThumb_mc._x = _root.thumb_position = -3100 + (i-j) * 765;

       

   clipLoader.loadClip("shop/" + thumbURL,myThumb_mc);  // i want to load this  by xml gallery "gallery1.xml"

preloader.onLoadStart = function(target)

        {

            target.createTextField("my_txt",target.getNextHighestDepth(),0,0,10,10);

            target.my_txt.selectable = false;

        };

        preloader.onLoadProgress = function(target, loadedBytes, totalBytes)

        {

            target.my_txt.text = Math.floor((loadedBytes / totalBytes) * 100);

        };

        preloader.onLoadComplete = function(target)

        {

            new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);

            target.my_txt.removeTextField();

            target.onRelease = function()

            {

                callFullImage(this._name);

            };

            target.onRollOver = function()

            {

                this._alpha = 100;

            };

            target.onRollOut = function()

            {

                this._alpha = 100;

            };

        };

   

   

    }

   

    for (i = 0; i < 6; i++)

   

    {

        thumbURL = myImages.attributes.thumb_url;

        myThumb_mc = wall.createEmptyMovieClip(i, wall.getNextHighestDepth());

        myThumb_mc._x = _root.thumb_height * i;

        myThumb_mc._x = _root.thumb_position = -7210 + (i-j) * 765;

        myThumb_mc._y = _root.thumb_position = 180;

        clipLoader.loadClip("banner/" + thumbURL,myThumb_mc);  // i want to load this  by xml gallery "gallery2.xml"

        preloader.onLoadStart = function(target)

        {

            target.createTextField("my_txt",target.getNextHighestDepth(),0,0,10,10);

            target.my_txt.selectable = false;

        };

        preloader.onLoadProgress = function(target, loadedBytes, totalBytes)

        {

            target.my_txt.text = Math.floor((loadedBytes / totalBytes) * 100);

        };

        preloader.onLoadComplete = function(target)

        {

            new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);

            target.my_txt.removeTextField();

            target.onRelease = function()

            {

                callFullImage(this._name);

            };

            target.onRollOver = function()

            {

                this._alpha = 100;

            };

            target.onRollOut = function()

            {

                this._alpha = 100;

            };

        };

    }

}

TOPICS
ActionScript
374
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 04, 2013 Jul 04, 2013

combine the two xml files into one if you want to create one gallery.

if you want two different galleries that display at different times, remove the movieclip wall after you're done with gallery1 and execute myGalleryXML.load("gallery2.xml");

Translate
Community Expert ,
Jul 04, 2013 Jul 04, 2013
LATEST

combine the two xml files into one if you want to create one gallery.

if you want two different galleries that display at different times, remove the movieclip wall after you're done with gallery1 and execute myGalleryXML.load("gallery2.xml");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines