Jump to content
Search Community

kbat

Members
  • Posts

    4
  • Joined

  • Last visited

kbat's Achievements

0

Reputation

  1. Hi karl here ye go.. thaks very much
  2. hi guys thanks very much for the replys Karl I tried to add an eventListener that will run when the images complete loading but i couldn't get it to work I would very much appreciate if you would take a look at this If i post a zip of my gallery so you can take a look at it. How can i get this file to you ? I tried to pm you but there is no place to attach a file ?
  3. Hi..I have an Xml gallery built with thumbnails I would like to use the tween Max or the tween Lite class to fade my images in as the gallery loads and when the thumbnail is clicked for the main image to fade in also. I know you have to import the files at the top of the .fla import com.greensock.*; import com.greensock.plugins.*; import com.greensock.TweenLite; And apply target, a duration, and an object. but i dont where or how to apply these to my code. Any suggestions would be greatly appreciated. Thanks in advance. import flash.display.MovieClip; import com.greensock.*; import com.greensock.plugins.*; import com.greensock.TweenMax; import flash.events.MouseEvent; import fl.transitions.*; import fl.transitions.easing.*; var imageLoader:Loader; var xml:XML; var xmlList:XMLList; var xmlLoader:URLLoader = new URLLoader(); var numClips:int=6; var columns:int=2; xmlLoader.load(new URLRequest("data/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 = 6 +( i % columns )*600; imageLoader.y = 6 +(Math.floor(i/columns)*106); 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=158; imageLoader.y=6; addChild(imageLoader); }
×
×
  • Create New...