you have here a script which works with the _alpha property, try working with 
_x property while setting the slideshow to the width value of your slideshow in 
negative at the start, and to the width value of your slideshow at the end of 
the tween.
Le 23 avr. 2011 à 15:07, Sam Sherlock a écrit :

> this is beyond the the scope of this list
> 
> try kirupa or actionscript.org
> 
> On 23/04/2011, abhymax <[email protected]> wrote:
>> Hello everyone
>> 
>> I will be highly oblized if I get a help from you experts. My actions
>> script skills are very bad so I need this help.
>> I have a set of action script codes through which I can run a xml
>> driven slideshow. In this slideshow the images basically have the fade
>> in and fade out effect. I want the images to have the sliding effect,
>> i.e. they slide from left to right , one after another. Guys please
>> help me with this. THANX in advance. the code is as follows :
>> -------------------------------------------------------------------------------------------------------------------------------------------------
>> import mx.transitions.Tween;
>> import mx.transitions.easing.*;
>> 
>> var myShowXML = new XML();
>> myShowXML.ignoreWhite = true;
>> myShowXML.load("slideshow.xml");
>> 
>> myShowXML.onLoad = function() {
>>      _root.myWidth = myShowXML.firstChild.attributes.width;
>>      _root.myHeight = myShowXML.firstChild.attributes.height;
>>      _root.mySpeed = myShowXML.firstChild.attributes.speed;
>> 
>>      _root.myImages = myShowXML.firstChild.childNodes;
>>      _root.myImagesNo = myImages.length;
>> 
>>      createContainer();
>>      callImages();
>> 
>> };
>> 
>> 
>> function createContainer() {
>>      _root.createEmptyMovieClip("myContainer_mc",1);
>> 
>>      myContainer_mc.lineStyle();
>>      myContainer_mc.lineTo(_root.myWidth,0);
>>      myContainer_mc.lineTo(_root.myWidth,_root.myHeight);
>>      myContainer_mc.lineTo(0,_root.myHeight);
>>      myContainer_mc.lineTo(0,0);
>> 
>>      myContainer_mc._x = (Stage.width-myContainer_mc._width)/2;
>>      myContainer_mc._y = (Stage.height-myContainer_mc._height)/2;
>> 
>> }
>> 
>> function callImages() {
>> 
>>      _root.myMCL = new MovieClipLoader();
>>      _root.myPreloader = new Object();
>>      _root.myMCL.addListener(_root.myPreloader);
>> 
>>      _root.myClips_array = [];
>> 
>>      _root.myPreloader.onLoadStart = function(target) {
>> 
>>              _root.createTextField("myText_txt",_root.getNextHighestDepth(),
>> 0,0,100,20);
>>              _root.myText_txt._x = (Stage.width-_root.myText_txt._width)/2;
>>              _root.myText_txt._y = (Stage.height-_root.myText_txt._height)/2;
>>              _root.myText_txt.autoSize = "center";
>> 
>>              _root.myText_txt.text = "test";
>> 
>>      };
>> 
>>      _root.myPreloader.onLoadProgress = function(target) {
>> 
>>              _root.myText_txt.text = "Loading.. "+_root.myClips_array.length
>> +"/"+_root.myImagesNo+" Completed";
>> 
>>      };
>> 
>> 
>>      _root.myPreloader.onLoadComplete = function(target) {
>> 
>>              _root.myClips_array.push(target);
>>              target._alpha = 0;
>> 
>>              if (_root.myClips_array.length == _root.myImagesNo) {
>> 
>>                      _root.myText_txt._y = myContainer_mc._y + 
>> myContainer_mc._height +
>> (myContainer_mc._height)/9 ;
>>                      _root.target_mc = -1;
>>                      moveSlide();
>>                      myShowInt = setInterval(moveSlide, 
>> (_root.mySpeed*1000)+1000);
>> 
>> 
>>              }
>> 
>>      };
>> 
>>      for (i=0; i<_root.myImagesNo; i++) {
>> 
>>              temp_url = _root.myImages[i].attributes.url;
>>              temp_mc = myContainer_mc.createEmptyMovieClip(i,
>> myContainer_mc.getNextHighestDepth());
>> 
>>              _root.myMCL.loadClip(temp_url,temp_mc);
>>      }
>> 
>> }
>> 
>> 
>> function moveSlide() {
>> 
>>      current_mc = _root.myClips_array[_root.target_mc];
>>      new Tween(current_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);
>> 
>>      _root.target_mc++;
>> 
>>      if (_root.target_mc>=_root.myImagesNo) {
>>              _root.target_mc = 0;
>>      }
>> 
>>      _root.myText_txt.text = _root.myImages[target_mc].attributes.title;
>>      next_mc = _root.myClips_array[_root.target_mc];
>>      new Tween(next_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
>> 
>> }
>> 
>> ------------------------------------------------------------------------------------------------------------------------------------
>> the part that control the image transition animation is :
>> 
>> function moveSlide (){
>> 
>> new Tween(current_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);
>> new Tween(next_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
>> 
>> }
>> 
>> In order to use the Tween Class we must import the class at the start
>> of your code,
>> 
>> import mx.transitions.Tween;
>> import mx.transitions.easing.*;
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "SWFObject" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/swfobject?hl=en.
>> 
>> 
> 
> 
> -- 
> - S
> 
> +44 (0)7908 069 219
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "SWFObject" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/swfobject?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to