Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

xml gallery - scroll

This is a discussion on xml gallery - scroll within the advanced Actionscript 3.0 forums, part of the Flash CS3 eng category; Hello! I have this xml gallery only made in actionscript 3. I would like to be able to add unlimited ...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Flash CS3 eng > advanced Actionscript 3.0

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-02-08, 11:03
Junior Member
 
Join Date: Feb 2008
Posts: 1
Rep Power: 0
motown is on a distinguished road
xml gallery - scroll

Hello!
I have this xml gallery only made in actionscript 3. I would like to be able to add unlimited pictures and then scroll through the thumbnail horizontally. So I guess I should add a mask and a scrolling function but I don't know how to do this in AS3? Can anyone help and do I explain myself properly???
Here is my code:

import fl.transitions.Tween;
import fl.transitions.easing.*;

var fadeTween:Tween;

var imageText:TextField = new TextField();

var imageLoader:Loader;
var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("images.xml"));

xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);

function xmlLoaded(event:Event):void
{
xml = XML(event.target.data);
xmlList = xml.children();

for(var i:int = 0; i < xmlList.length(); i++)
{
imageLoader = new Loader();
imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
imageLoader.x = i * 125 + 25;
imageLoader.y = 5;
imageLoader.name = xmlList[i].attribute("source");
addChild(imageLoader);
imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
}

}

function showPicture(event:MouseEvent):void
{
imageLoader = new Loader();
imageLoader.load(new URLRequest(event.target.name));
imageLoader.x = 25;
imageLoader.y = 125;
addChild(imageLoader);
imageText.x = imageLoader.x;
imageText.y = 530;
for(var j:int = 0; j < xmlList.length(); j++)
{
if(xmlList[j].attribute("source") == event.target.name)
{
imageText.text = xmlList[j];
}
}
fadeTween = new Tween(imageLoader, "alpha",None.easeNone,0,1,1,true);
}
imageText.autoSize = TextFieldAutoSize.LEFT;
addChild(imageText);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 09-02-08, 13:28
tem's Avatar
tem tem is offline
Moderator
 
Join Date: Jan 1970
Posts: 442
Rep Power: 39
tem is on a distinguished road
Re: xml gallery - scroll

Hi!
take a look at this script.. it does more or less what you need
http://www.flepstudio.org/forum/down...do=file&id=102
hope it can help.. otherwise.. tell us.. and we'll try to make a commented example..
__________________
http://www.thetconcept.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Classe Scroll Clip in base al valore mouseX tem Utilità degli utenti di FlepStudio 7 29-08-08 14:16
Scroll Panel plutoste AIUTO utilità free 0 28-04-08 16:40
Scroll Particolare fantamieru Flash CS3 generale 0 06-04-08 11:06
Scroll Continuo Images Scroller soteha AIUTO utilità free 13 29-02-08 11:22
Scroll Clip with mouseX Value tem advanced Actionscript 3.0 5 25-08-07 23:57


All times are GMT. The time now is 20:01.


Powered by vBulletin versione 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406