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

how i can add description tag in xml gallery

New Here ,
Jun 29, 2013 Jun 29, 2013

my xml is....................

<?xml version="1.0" encoding="utf-8"?>

<?xml-stylesheet href="xmldesign.css" type="text/css"?>

<gallery thumb_width="400" thumb_height="290" gallery_width="400" gallery_height="700" gallery_x=" " gallery_y=" " full_x="1220" full_y="50" >

<image thumb_url="t1.jpg"  full_url="full01.jpg" title="Mango Juice"/>

<image thumb_url="t2.jpg"  full_url="full01.jpg" title="Mango Juice"/>

<image thumb_url="t3.jpg"  full_url="full01.jpg" title="Mango Juice"/>

<image thumb_url="t4.jpg"  full_url="full01.jpg" title="Mango Juice"/>

<image thumb_url="t5.jpg"  full_url="full01.jpg" title="Mango Juice"/>

<image thumb_url="t6.jpg"  full_url="full01.jpg" title="Mango Juice"/>

</gallery>

TOPICS
ActionScript
929
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

LEGEND , Jun 29, 2013 Jun 29, 2013

You could modify each tag in a similar manner as follows....

<image thumb_url="t6.jpg"  full_url="full01.jpg" title="Mango Juice" desc="description here" />

Translate
LEGEND ,
Jun 29, 2013 Jun 29, 2013

You could modify each tag in a similar manner as follows....

<image thumb_url="t6.jpg"  full_url="full01.jpg" title="Mango Juice" desc="description here" />

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
New Here ,
Jun 29, 2013 Jun 29, 2013

but where i put it on my function

my function is---

..............

.............

fullPreloader.onLoadStart = function(target)

    {

        target.createTextField("my_txt",ajit.getNextHighestDepth(),20,0,700,20);

        my_txt.selectable = true;

       

       

    };

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

    {

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

    };

    fullPreloader.onLoadComplete = function(target)

    {

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

        target.my_txt.text = myTitle;           //////          this is my title

       

    };

    fullClipLoader.loadClip("full_images/" + myURL,ajit);

}

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
LEGEND ,
Jun 29, 2013 Jun 29, 2013

Look at the rest of your code where you extract the title and the file name.  THat should be enough for you to figure out what you need to do.

function callFullImage(myNumber)

{

    myURL = myImages[myNumber].attributes.full_url;

    myTitle = myImages[myNumber].attributes.title;

   myDesc = ..... figure this out based on the above

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
New Here ,
Jun 30, 2013 Jun 30, 2013

its not working...... pls correction in my function......

function callFullImage(myNumber)

{

    myURL =   myImages[myNumber].attributes.full_url;

    myTitle = myImages[myNumber].attributes.title;

   myDesc =  myImages[myNumber].attributes.desc; // new line added by me


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

    ajit._x = _root.full_x = 130;

    ajit._y = _root.full_y = 32;

   

    _root.onEnterFrame = function()

    {

        wall._alpha = 0;

        if (_root._currentframe == 2)

        {

            wall._alpha = 100;

        }

    };

    this.gotoAndStop(21);

    var fullClipLoader = new MovieClipLoader("ajit");

    var fullPreloader = new Object();

    fullClipLoader.addListener(fullPreloader);

    fullPreloader.onLoadStart = function(target)

    {

        target.createTextField("my_txt",ajit.getNextHighestDepth(),20,0,700,20);

        my_txt.selectable = true;

       

    };

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

    {

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

    };

    fullPreloader.onLoadComplete = function(target)

    {

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

        target.my_txt.text = myTitle;

        target.my_txt._y=480;

        target.my_txt.textColor = 0xffffff;

       

       target.my_txt.text = myDesc;              //   new line added by me

        target.my_txt._y=280;                           //   new line added by me

       

    };

   

    fullClipLoader.loadClip("full_images/" + myURL,ajit);

}

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
LEGEND ,
Jul 01, 2013 Jul 01, 2013

What is not working?  Use the trace function to see why it does not work where you say it does not work.

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
New Here ,
Jul 01, 2013 Jul 01, 2013

sir, its working, and showing "desc" ..  but not  showing "title"...

<gallery>

<image thumb_url="shop1.png"  full_url="full01.jpg" title="Mango Juice" desc="Hello this is my description"/>

</gallery>

function callFullImage(myNumber)

{

    myURL =   myImages[myNumber].attributes.full_url;

    myTitle = myImages[myNumber].attributes.title;

   myDesc =  myImages[myNumber].attributes.desc;             //          add by me

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

    ajit._x = _root.full_x = 130;

    ajit._y = _root.full_y = 32;

   

    _root.onEnterFrame = function()

    {

        wall._alpha = 0;

        if (_root._currentframe == 2)

        {

            wall._alpha = 100;

        }

    };

    this.gotoAndStop(21);

    var fullClipLoader = new MovieClipLoader("ajit");

    var fullPreloader = new Object();

    fullClipLoader.addListener(fullPreloader);

    fullPreloader.onLoadStart = function(target)

    {

        target.createTextField("my_txt",ajit.getNextHighestDepth(),20,0,700,20);

        my_txt.selectable = true;

       

       

    };

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

    {

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

    };

    fullPreloader.onLoadComplete = function(target)

    {

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

        target.my_txt.text = myTitle;

        target.my_txt._y=480;

        target.my_txt.textColor = 0xffffff;

        target.my_txt.text = myDesc;               // added by me

        target.my_txt._y=280;                         // added by me

        target.my_txt.textColor = 0xffffff;         // added by me

    };

   

    fullClipLoader.loadClip("full_images/" + myURL,ajit);

}

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
LEGEND ,
Jul 02, 2013 Jul 02, 2013
LATEST

That is because you are overwriting the title with the description...  first you have...

     target.my_txt.text = myTitle;

then you reassign it a few lines later with

     target.my_txt.text = myDesc;

If you want them both to appear in the same textfield then you need to append the description, not assign it...

     target.my_txt.text += myDesc;

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