all groups > flash data integration > april 2005 >
You're in the

flash data integration

group:

Scroll XML put on a movie clip



Scroll XML put on a movie clip tkitek
4/29/2005 12:00:00 AM
flash data integration: I have an XML content (txt and images) wich comes respectivly on a Txt_field
variable and MovieClip.
With no problem, I have the content brought and showed, but my problem is that
the content of the text and images is to long than the height of my clips.
Pliiiz Help Urgent ! How can I set the max height showed and scroll it by th
way ?
:confused;
Re: Scroll XML put on a movie clip tomeanand NO[at]SPAM hotmail.com
5/4/2005 12:00:00 AM
hi tkitek

can u just paste the xml here

Re: Scroll XML put on a movie clip tkitek
5/6/2005 12:00:00 AM
Thanks for your reply !
Well, here you have the action script for filling the xml, and the xml
structure...
Hope that you give a flexible solution... thanks a lot.


Action script--------------------------------------------

portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;


portfolioInfo.onLoad = function(){
portfolioTag = this.firstChild;
trace( count = portfolioTag.childNodes.length);
for (child = 0; child < count; child++){
currentPicture = portfolioTag.childNodes[child];
currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+child,child);
currentThumb._y = child *20;
image = currentThumb.createEmptyMovieClip("thumbnail_image",0);
image.loadMovie(currentPicture.attributes.THUMB);
currentThumb.NAME = currentPicture.attributes.NAME;
currentThumb.IMAGE = currentPicture.attributes.IMAGE;
currentThumb.TEXT = currentPicture.attributes.TEXT;
currentThumb.onRollOver = currentThumb.onDragOver = function(){
showName_txt.text = this.NAME;
}
currentThumb.onRollOut = currentThumb.onDragOut = function(){
showName_txt.text = "";
}
currentThumb.onPress = currentThumb.onDragOver = function(){
image_mc.loadMovie(this.IMAGE);
mcxml.info_txt.text = "Loading...";
// load the text into this timeline:
mcxml.loadVariables(this.TEXT);
}
}
}
portfolioInfo.load("portfolio_config.xml");
stop();
------------------------------------------------------------------------------

xml file :

<PORTFOLIO>
<PICTURE NAME="My Disk" THUMB="media/menu/image1.jpg"
TEXT="content/description1.txt" IMAGE="media/image1.jpg"/>
<PICTURE NAME="My Disk" THUMB="media/menu/image2.jpg"
TEXT="content/description2.txt" IMAGE="media/image2.jpg"/>
<PICTURE NAME="My Disk" THUMB="media/menu/image3.jpg"
TEXT="content/description3.txt" IMAGE="media/image3.jpg"/>
<PICTURE NAME="My Disk" THUMB="media/menu/image4.jpg"
TEXT="content/description4.txt" IMAGE="media/image4.jpg"/>
<PICTURE NAME="My Disk" THUMB="media/menu/image5.jpg"
TEXT="content/description5.txt" IMAGE="media/image5.jpg"/>
<PICTURE NAME="My Disk" THUMB="media/menu/image6.jpg"
TEXT="content/description6.txt" IMAGE="media/image6.jpg"/>
</PORTFOLIO>
Re: Scroll XML put on a movie clip tkitek
5/6/2005 12:00:00 AM
So what i want to do is scrolling the entire content of menu_mc :
currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+child,child);
currentThumb._y = child *20;
Is there a nice way to do it ?

AddThis Social Bookmark Button