Copy link to clipboard
Copied
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>
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" />
Copy link to clipboard
Copied
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" />
Copy link to clipboard
Copied
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);
}
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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);
}
Copy link to clipboard
Copied
What is not working? Use the trace function to see why it does not work where you say it does not work.
Copy link to clipboard
Copied
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);
}
Copy link to clipboard
Copied
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;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now