Slideshow Component AS2 Documentation
Actionscript 2, Documentation, Flash Components December 19th, 2007Here is the documentation for working with the Slideshow Component AS2. I hope you’ll find it easy to use. If you have any questions, feel free to ask.
To preview and download the component go here.
Requirements
Authoring: Flash 8, Flash CS3
Actionscript: Actionscript 2 (Actionscript 3 version available here)
Player: Flash Player 8, Flash Player 9
Methods
loadImage(i:Number)
example: mySlideshow.loadImage(3);
nextImage()
example: mySlideshow.nextImage();
prevImage()
example: mySlideshow.prevImage();
setSize(w:Number, h:Number)
example: mySlideshow.setSize(400, 300);
Properties
xmlPath
- type:String
- the path to the xml file
example: mySlideshow.xmlPath = “images.xml”;
scaleMode
- type:String
- available values: “exact fit”, “maintain aspect ratio”, “no scale”
- default value: “exact fit”
example: mySlideshow.scaleMode = “maintain aspect ratio”;
alignType
- type:String
- available values: “top-left”, “top-center”, “top-right”, “center-left”, “center”, “center-right”, “bottom-left”, “bottom-center”, “bottom-right”
- default value: “center”
example: mySlideshow.alignType = “top-left”;
autoLoad
- type:Boolean
- default value: true
example: mySlideshow.autoLoad = false;
setBorder
- type:Boolean
- default value: false
example: mySlideshow.setBorder = true;
borderThickness
- type:Number
- default value: 3
example: mySlideshow.borderThickness = 10;
borderAlpha
- type:Number
- default value: 100
example: mySlideshow.borderAlpha = 50;
borderColor
- type:Number
- default value: #ffffff
example: mySlideshow.borderColor = 0×33ffcc;
preloaderType
- type:String
- available values: “bar”, “circular”, “none”
- default value: “bar”
example: mySlideshow.preloaderType = “circular”;
barPreloaderWidth
- type:Number
- default Value: 100
example:mySlideshow.barPreloaderWidth = 200;
circularPreloaderRadius
- type:Number
- default Value: 20
example:mySlideshow.circularPreloaderRadius = 30;
preloaderFillColor
- type:Number
- default value: #ffffff
example: mySlideshow.preloaderFillColor = 0×33ff00;
preloaderLineColor
- type:Number
- default value: #ffffff
example: mySlideshow.preloaderLineColor = 0×33cc33;
preloaderFillAlpha
- type:Number
- default value: 50
example: mySlideshow.preloaderFillAlpha = 40;
preloaderLineAlpha
- type:Number
- default value: 100
example: mySlideshow.preloaderLineAlpha = 80;
setTextPreloader
- type:Boolean
- default value: true
example: mySlideshow.setTextPreloader = false;
textPreloaderFont
- type:String
- default value: “Arial”
example: mySlideshow.textPreloaderFont = “Verdana”;
textPreloaderSize
- type:Number
- default value: 12
example: mySlideshow.textPreloaderSize = 10;
textPreloaderColor
- type:Number
- default value: #ffffff
example: mySlideshow.textPreloaderColor = 0×33ff00;
textPreloaderBold
- type:Boolean
- default value: false
example: mySlideshow.textPreloaderBold = true;
transitionEffect
- type:String
- available values: “random”, “fade”, “blur”, “brightness”, “noise”, “pixel dissolve”, “threshold”, “pixelate”, “squares”, “explode”, “fly”, “none”
- default value: “random”
example: mySlideshow.transitionEffect = “brightness”;
transitionSpeed
- type:Number
- this propertie represents the speed of the transition in frames and the way this propertie influences the transition depends also on the transition effect (a lower value for the transitionSpeed means a higher speed and vice versa)
- default value: 30
example: mySlideshow.transitionSpeed = 10;
The next properties are available only for some effects.
horizontalSquares
- type:Number
- available for “squares” and “explode” effects
- default value: 10
example: mySlideshow.horizontalSquares = 20;
verticalSquares
- type:Number
- available for “squares” and “explode” effects
- default value: 10
example: mySlideshow.horizontalSquares = 14;
squaresEffectType
- type:String
- available for “squares” effect
- available values: “scale”, “height”, “width”, “alpha”, “blur”
- default value: “scale”
example: mySlideshow.squaresEffectType = “blur”;
squaresDirection
- type:String
- available for “squares” effect
- available values: “top-bottom”, “bottom-top”, “right-left”, “left-right”, “TL-BR”, “TR-BL”, “BL-TR”, “BR-TL”, “margin-center H”, “center-margin H”, “margin-center V”, “center-margin V”, “jump one T-B”, “jump one B-T”, “jump one L-R”, “jump one R-L”, “jump one V”, “jump one H”, “spiral M1″, “spiral M2″, “spiral C1″, “spiral C2″, “random”
- default value: “top-bottom”
example: mySlideshow.squaresDirection = “margin-center V”;
squaresSpeed
- type:Number
- available for “squares” effect
- represents the speed(in seconds) at which the square grows
- default value: 1
example: mySlideshow.squaresSpeed = 0.5;
squaresAAT
- type:Number
- available for “squares” effect
- represents the number of squares that are animated at a time
- default value: 2
example: mySlideshow.squaresAAT = 5;
registrationPoint
- type:String
- available for “squares” and “fly” effect
- available values: “center”, “center-right”, “center-left”, “top-right”, “top-center”, “top-left”, “bottom-right”, “bottom-center”, “bottom-left”
- default value: “center”
example: mySlideshow.registrationPoint = “top-right”;
easingType
- type:String
- available for “squares” and “fly” effect
- available values: “Back”, “Bounce”, “Circular”, “Cubic”, “Elastic”, “Exponential”, “Linear”, “Quadratic”, “Quartic”, “Quintic”, “Sine”
- default value: “Exponential”
example: mySlideshow.easingType = “Quadratic”;
easingMethod
- type:String
- available for “squares” and “fly” effect
- available values: “easeIn”, “easeOut”, “easeInOut”, “easeOutIn”
- default value: “easeOut”
example: mySlideshow.easingMethod = “easeInOut”;
flyDirection
- type:String
- available for “fly” effect
- available values: “top-bottom”, “bottom-top”, “left-right”, “right-left”, “zoom”
- default value: “top-bottom”
example: mySlideshow.flyDirection = “zoom”;
pixelSize
- type:Number
- available for “pixelate” effect
- represents the maximum pixel size for the transition
- default value: 100
example: mySlideshow.pixelSize = 50;
Working with XML
Use the “path” attribute to tell the slideshow the path to the image.
example:
-
<images>
-
<img path="images/image0.jpg" />
-
<img path="images/image1.jpg" />
-
<img path="images/image2.jpg" />
-
<img path="images/image3.jpg" />
-
<img path="images/image4.jpg" />
-
<img path="images/image5.jpg" />
-
<img path="images/image6.jpg" />
-
<img path="images/image7.jpg" />
-
<img path="images/image8.jpg" />
-
<img path="images/image9.jpg" />
-
</images>
Other attributes: effect, squaresDirection, verticalSquares, horizontalSquares, squaresAAT, squaresSpeed, registrationPoint, squaresEffectType, pixelSize, transitionSpeed, flyDirection, easingType, easingMethod, urlPath, urlWindow
example:
-
<images>
-
<img path="images/image0.jpg" effect="fade" transitionSpeed="20" />
-
<img path="images/image1.jpg" effect="fly" flyDirection="left-right" easingtType="Elastic" easingMethod="easeOut" />
-
<img path="images/image2.jpg" effect="pixelate" pixelsize="50" />
-
<img path="images/image3.jpg" effect="brightness" urlPath="http://flashotaku.com" ulrWindow="_blank" />
-
<img path="images/image4.jpg" effect="pixel dissolve" />
-
<img path="images/image5.jpg" effect="threshold" />
-
<img path="images/image6.jpg" effect="explode" horizontalSquares="30" verticalSquares="20" />
-
<img path="images/image7.jpg" effect="squares" squaresEffectType="blur" squaresDirection="random" squaresAAT="2" squaresSpeed="1" horizontalSquares="20" verticalSquares="14" transitionSpeed="20" />
-
<img path="images/image8.jpg" effect="noise" transitionSpeed="10" />
-
<img path="images/image9.jpg" effect="squares" squaresEffectType="scale" squaresDirection="spiral M1" squaresAAT="2" squaresSpeed="2" horizontalSquares="15" verticalSquares="7" transitionSpeed="30" />
-
</images>
Working with events
transitionStart
- dispatched when the transition is starting
transitionComplete
- dispatched when the transition is complete
onLoadXML
- dispatched when the loading of the XML file is complete
onSlideStart
- dispatched when the loading of a slide is starting
onSlideProgress
- dispatched when a slide is loading
onSlideComplete
- dispatched when the loading of a slide is complete
onSlideInit
- dispatched when the properties of a slide are available
release
- dispatched when the user releases the mouse over a slide
rollOver
- dispatched when the user moves the mouse over a slide
rollOut
- dispatched when the user moves the mouse away from a slide
example:
-
var initObject:Object = new Object();
-
var progressObject:Object = new Object();
-
var transitionCompleteObject:Object = new Object();
-
-
mySlideshow.addEventListener("onSlideInit", initObject);
-
mySlideshow.addEventListener("onSlideProgress", progressObject);
-
mySlideshow.addEventListener("transitionComplete", transitionCompleteObject);
-
-
initObject.onSlideInit = function(evt:Object){
-
trace(evt.target.id);
-
}
-
-
progressObject.onSlideProgress = function(evt:Object){
-
trace(evt.target.bytesLoaded);
-
trace(evt.target.bytesLoaded);
-
}
-
-
transitionCompleteObject.transitionComplete = function(evt:Object){
-
trace("transition is complete");
-
}
Support
As of 11 March 2009, support is no longer provided for the free components. If you need support, please purchase the commercial version of the components.
March 13th, 2008 at 9:07 pm
[...] just the stills to separate JPEG images, and using the awesome free slideshow component found here you could re-create the slideshow. As a bonus, you would be able to offer your client: OOOA) A [...]
March 20th, 2008 at 2:00 pm
Hi there,
Im still on AS2, not made the move to AS3 yet! Im struggling to get the component to load up a random image for the first image…I have tried to attach a loadImage to the onLoadXML event but it seems to ignore the loadImage method.
I would like a random image to show up as the first image rather than the first one.
Thanks for the component..very slick.
Rolf
March 20th, 2008 at 3:23 pm
Hi,
It seems like there was a small bug. Please re-download the component. Also, I’ve made a simple example in which a random image is loaded… http://flashotaku.com/files/slideshow_rnd.zip
March 20th, 2008 at 3:52 pm
Wow, that was quick work =)I’ll grab it again now. Also I was reading the tutorial for the AS3 version with some extra fields in the XML, is this also possible in the AS2 version..?
Thanks
Rolf
March 20th, 2008 at 4:02 pm
Just tried the new component out..it doestn seem to work starting at a random place if you attach the component programmatically rather than placing it on the stage. Your little file works ok, but the same code doesnt work on my fla…the only difference I can see is that I have attached the component.
Cheers
Rolf
March 20th, 2008 at 4:09 pm
Yes I have just tested it and it works ok with a stage placed component instance but not with an attached instance.
March 20th, 2008 at 4:44 pm
Have you set the xmlPath property ?
It works for me.
http://flashotaku.com/files/slideshow_rnd.zip
March 22nd, 2008 at 3:12 pm
How can I make the slideshow pass the images automaticaly - without pressing any button?
March 22nd, 2008 at 6:44 pm
you can use setInterval…
example:
var myInterval = setInterval(myFunction, 1000);
function myFunction(){
mySlideshow.nextImage();
}
March 25th, 2008 at 5:32 pm
Hi (again!),
I cant get the transitionStart and transitionComplete events to fire…Ive just cut and pasted the code example above and the trace “transition complete” never appears.
Also trace(evt.target.bytesLoaded); shows undefined.
Thanks
Rolf
March 25th, 2008 at 6:20 pm
Hi
The above code had some errors…I’ve corrected it
March 25th, 2008 at 6:25 pm
Cheers, the transitionComplete fires correctly now..still undefined for the onSlideProgress event.
March 25th, 2008 at 6:29 pm
If you simulate a download only the first trace shows undefined , the other traces will display correct values… I’ll check it out when I’ll have some time but it should work fine even now if you want to build a custom preloader, for example
March 27th, 2008 at 10:54 pm
Thank you for this wonderful component!
Is it possible to load images without using an XML?
Thanks again
March 27th, 2008 at 11:25 pm
Glad you like it.
For now, you can only load images using XML.
March 30th, 2008 at 8:39 am
Thank you for responding
I’m particularly fond of the different variations of the ’squares’ effect.
It would be nice if in addition to ‘maintain aspect ratio’ and ‘exact fit’, the ’scale mode’ parameter also featured a ‘crop’ option. This would come in handy when not all images are the same size or aspect ratio.
My other humble wish is that the component would not mandate XML, so one could assign individual slide paths explicitly.
Thank you again
April 2nd, 2008 at 1:16 am
hi,
i really need help in intregrating xml data like title and description to this gallery.i went though ur as3 version where u have title and description but cant use it on my site as my site is based on flash 8 and so the gallery does not work as it is called up by a flash 8 swf. can u send me the scripts for intregrating the same title and description for the AS2 version of the slide and the scroller. thanks
April 2nd, 2008 at 7:35 am
Hi there!
Awesome component!
I currently have a problem with the squares effect; when it appears, the sqaures appear white, and not with the next picture on them. What am i missing?
Thanks,
YoS
April 2nd, 2008 at 12:51 pm
Hi,
I don’t know what the problem could be. As you can see it works fine in the examples posted on the site.
Maybe you could post your code here or send me your source to check it out.
April 2nd, 2008 at 1:19 pm
Hi all
Can we had a sample for a simply slideshow ?
Regards
seb
April 2nd, 2008 at 2:35 pm
Hi Seb,
Could you be more specific about what slideshow would you want?
April 5th, 2008 at 4:44 pm
Thanks for the Super component! Donation coming soon.
April 13th, 2008 at 11:36 am
Hi,
Is there any way to know the actual width and height of the currently shown image?
Thanks,
YoS.
April 13th, 2008 at 12:42 pm
Hi,
If you want to know the size of an image before it is resized use this code
var initObj:Object = new Object();
mySlideshow.addEventListener(”onSlideInit”, initObj);
initObj.onSlideInit = function(event:Object){
trace(event.target._width);
trace(event.target._height);
}
April 27th, 2008 at 12:09 pm
Hi, thanks for the great component. I encounter the following:
How to center the images nicely for both landscape and portrait images
April 27th, 2008 at 12:14 pm
Also few more questions. I am using AS2 Flash 8. How to fix the following ?
1. Thumbnail vertical orientation does not work
2. When I change to “maintain aspect”, the border disappears eventhough border is set to true
3. Centering the images in the stage nicely for both Landscape and Portrait oriented images.
April 28th, 2008 at 9:32 pm
one more question: How do I use this component to “auto play” without user pressing next/prev buttons ? (AS2 / Flash 8)
April 29th, 2008 at 11:49 am
mcs,
1. it should work…change the size of the component and also change the direction to vertical using the component inspector or myScroller.direction = “vertical”
2. never encountered that problem
3. use scaleMode=”maintain aspect ratio” and alignType=”center”
For auto play use setInterval to call the nextImage() method
April 30th, 2008 at 10:54 am
Very very slick component. Amazing work mate. Thank a bunch for awesome work.
The XML loading works great for web. I was wondering if it is possible to load images without XML, that is from internal library. Would be great for self-contained flash presentations (CD, offline media).
Once again, Thanks a lot!!
April 30th, 2008 at 12:30 pm
For this component you can only use an XML as a source. With the next version, which will be only for AS3, other source types will be available.
May 1st, 2008 at 9:38 pm
I have been trying many different ways to get a hand cursor to appear instead of an arrow and I either get one of two results: The hand cursor does not display, or the hand cursor displays but I am not longer able to click on the images to be taken to the urlPath. Is it possible to have a hand cursor displayed instead of the arrow using the slideshow component and Action Script 2?
May 2nd, 2008 at 2:58 pm
I’ve added the handCursor parameter to the slideshow. Please re-download the component. You can use the component inspector to set the handCursor parameter to true or false.
May 2nd, 2008 at 6:10 pm
Thank a ton. I spent all yesterday trying to get that to work and I kept hitting roadblocks. Thanks for your help!
May 14th, 2008 at 2:53 am
If I add a movieclip as a background underneight the slideshow component is there a way to change the background color from the xml file, “images.xml”?
May 14th, 2008 at 5:31 pm
Yes. Here’s an example: http://flashotaku.com/files/slideshow_bgcolor.zip
May 14th, 2008 at 11:31 pm
Thanx for the help!
May 28th, 2008 at 12:36 am
Hi!!
It´s incredible this component. I like to much. But I have 2 questions for u.
1) Have anyway into slideshow when I click in the image the same appear above with a new width, height and buttons to move the next image ?
2) I would like to know if have the fla components of this when I install in the flash, where they stay ?
May 28th, 2008 at 5:54 pm
Hi,
1) You could do that
var releaseObj:Object = new Object();mySlideshow.addEventListener("release", releaseObj);
releaseObj.release = function(event:Object)
{
attachMovie("Slideshow", "mySlideshow2", 10);
mySlideshow.xmlPath = "images.xml";
// set x, y, width, height
}
2) The component is a compiled clip, so the source code is not available
May 28th, 2008 at 11:27 pm
Hi!!
Thanks for tip !!
I have done that and works!! Now I try to show in the second mySlideshow the same photo that was showing in the first mySlideshow. But doesn´t works.
Because the ideias is the second mySlideshow be a SlideShow for a big photos, the same foto that I click in the first mySlideshow.
Have any ideia how I do that ??
May 29th, 2008 at 1:33 pm
Here is how I would do this:
http://flashotaku.com/files/mslideshow_as2.zip
May 29th, 2008 at 2:54 pm
Hi!!
Thanks again for the tip!!! But I didn´t made. I try to put this example in my flash but doesn´t work. I´m also try to put a set Interval, like other example that u gave, but the images doesn´t chance.
I put this way inside a MC:
function change(){
mySlideshow.nextImage();
}
setInterval(change, 200);
Can u help ? Have any e-mail that I could send the .fla for u take a look ?
May 29th, 2008 at 3:14 pm
Well…the example I gave you worked fine for me.
You don’t need to attach the code inside a movieclip, but on the timeline as you can see in the example.
You can send me the files at flashotaku [at] gmail [dot] com
May 29th, 2008 at 3:14 pm
Hi!!
I fix the problem about the setInterval, I have change the order. But I still have the problem about the gallery.
Imagine that I have :
- A scroll that catch the images and list them, like the default that u do. When I click in anyone shows me the clicked photo into the mySlideshow. ( This Works )
- When I click into the Slideshow, that have the image clicked, open it a attachMovie with a new Slideshow. This is the same example that u gave to me. ( This works )
- Now is the problem, when the attachMovie shows, He catch the first image, like the autoload, and not the image that I clicked before into the mySlideshow.
Can u help with this ?
July 8th, 2008 at 11:34 am
Hello. First of all… thanx for a great slideshow component… but.. I experience problems with it when it comes to timing in a setInterval setup auto-slideshow.
I have thumbnails on my siteproject. When you click on one, the slideshow component becomes ._visible, and the xmlPath is set. with setInterval I change picture every 3 sek, exactly as the code above in this forum said.
If I click another thumbnail, and then back to the slideshow thumbnail again.. the code makes the slideshow component invisible, and then visible again with a new or the same xmlPath.
I then experience jerky timelapses between the images fading in and out. It seems irregular. It always goes faster then 3 sek, sometimes directly after each other and then slowing down or speeding up. Why is that ???? Have I done something wrong with the setInterval command ? It doesn’t mater if I use clearInterval(myslideshow); on each thumbclick. The jerky timelapses is there.
What shall I do ???
July 8th, 2008 at 7:24 pm
Hi Daniel,
It would be better if you could post your code or send me the file to check it.
July 17th, 2008 at 5:52 pm
I’m looking for a way to add text to my images through the XML also. Can this be done? Any help is most appreciated!
July 18th, 2008 at 9:53 am
See this and this.
September 8th, 2008 at 3:30 pm
I was wondering how to omit the preloader. I use other swf files instead of jpgs and it works great but I don’t want to show the preloader.
September 8th, 2008 at 5:24 pm
Hi Mark,
Go to the Component Inspector and set the preloader type property to “none”. Or you could use AS : mySlideshow.preloaderType = “none”.
September 15th, 2008 at 7:58 pm
Hi thanks for the slideshow component…
I’d like to ask you one thing: let’s say i have two pictures, one is 2000×1500 (width x height) and the other one is 350×250 with a screen resolution of 1024×768, I want the larger picture to scale to the screen resolution, and the small one, to keep the original size and stay centered in the screen center, is that possible? how could i do it?
Thanks
September 16th, 2008 at 2:53 pm
Hi,
Try this:
1. resize the component to 1024×768 and set the scaleMode to “no scale”;
2. add this code
mySlideshow.addEventListener(SlideshowEvent.SLIDE_INIT, slideshowInitHandler);
function slideshowInitHandler(event:SlideshowEvent){
if (mySlideshow.width > 1024 || mySlideshow.height > 768)
{
mySlideshow.scaleMode = “exact fit”;
mySlideshow.x = mySlidehow.y = 0;
}
else
{
mySlideshow.scaleMode = “no scale”;
//center the image to stage
mySlideshow.x = (1024 - mySlideshow.width)/2;
mySlideshow.y = (768 - mySlideshow.hieght)/2;
}
}
See if it works. I haven’t tried the code myself.
September 17th, 2008 at 2:26 pm
Hi,
Thankyou very much for helping me, the indications you give me were really useful, At the end i used the following code, very similar to yours but AS2
var initObj:Object = new Object();
slide_mc.addEventListener(”onSlideInit”, initObj);
initObj.onSlideInit = function(event:Object)
{
WidthImg = event.target._width;
HeightImg = event.target._height;
if((WidthImg > 1024) || (HeightImg > 768))
{
_root.slide_mc.scaleMode = “exact fit”;
_root.slide_mc._x = slide_mc._y = 0;
}
else
{
_root.slide_mc.scaleMode = “no scale”;
_root.slide_mc._x = (1024 - WidthImg)/2;
_root.slide_mc._y = (768 - HeightImg)/2;
}
}
Thanks once again
September 28th, 2008 at 5:58 am
Hi FlashOtaku,
Thank you for the greatvslideshow and scroller, but i was hoping you can help me with a few things. I saw in the posting above that someone already asked you about the stop and play button for the slideshow, but that was as3. Im currently using as2 and was hoping you can help me with that. Also, is it possible to put a field somewhere, where the end user can set a time for the show, for instance 5 secs or 10 secs before the next image appears. And how would i go about creating different categories/albums so i can have different galleries for different events? I would greatly appreciate your help. Thank you again.
wan23fob
September 29th, 2008 at 1:10 pm
Hi wan23fob,
I’ve made a simple example for you: http://flashotaku.com/files/auto_slideshow3_as2.zip
September 29th, 2008 at 11:50 pm
Thank you for your quick response, but i was unable to open the .fla file, error reads: Unexpected file format?
wan23fob
September 30th, 2008 at 7:12 am
Hi,
You can disregard the last reply. I got it to open thanks. I do have another question though. With your scroller, is it possible to have an effect when you hover over the thumbnail a slightly larger thumbnail pops right above it? Thanks again!
wan23fob
September 30th, 2008 at 12:25 pm
Hi,
That’s not a built-in feature but off course it’s possible if you can build it :D
Here’s an example I’ve made: http://flashotaku.com/files/scroller_tt_as2.zip
October 2nd, 2008 at 7:31 pm
Hi FlashOtaku,
THANK YOU!! it works GREAT!!!…one last question (i hope)… i was reading the other tutorials and came across an example you created, for an auto slideshow where the borders of the thumbnails are highlighted during the show, but in that gallery the next/previous buttons are not present. The gallery I currently have has next/previous buttons and during the slideshow the end user can still move the thumbnail scroller while the autoslideshow is still in “play” mode and the highlighted thumbnail is now out of view. My question is, it possible to move the scroller back/forward to show where along the scroller the autoslideshow is currently at?, after the end user has stop clicking the next/previous buttons. Thanks again!
wan23fob
October 3rd, 2008 at 1:07 pm
Hi wan23fob,
Unfortunately, that’s not possible with this version or at least, at this moment, I don’t see a work-around for that.
October 3rd, 2008 at 9:08 pm
Thank you. Not a problem. I’ll just disable/enable my next/prev button with ._visible when the stop/play button is “released”. Thank you for all your help!!
wan23fob
October 22nd, 2008 at 8:08 am
Hi,
I used the component with the parameters “fade” and “maintan aspect ratio” but when the transition occur, the previous image is stretch to fit the size of the next image, so it’s visible and not pretty. How can I avoid to see this stretch ?
Thanks for that great component.
October 22nd, 2008 at 11:29 am
Hi Florent,
Unfortunately, you can’t avoid the stretch.
November 23rd, 2008 at 2:05 pm
Hi Otaku,
great component - thank you for all your work and information supplied.
One silly question: How can I stop the slideshow e.g. at slide 4. I’m using autoLoad set “true” and setInterval.
Thank you very much in advance for any help.
November 24th, 2008 at 10:36 am
Hi Flashmike,
Try this code:
var slideInitObject:Object = new Object();
mySlideshow.addEventListener(”onSlideInit”, slideInitObject);
slideInitObject.onSlideInit = function(event:Object)
{
if (event.target.id == 4)
{
clearInterval(myInterval);
}
}
February 5th, 2009 at 10:23 am
Hi FlashOtaku,
sorry, somehow I missed your answer.
At the present time I have this code to make the slideshow run automatically (works fine)
var transitionCompleteObject:Object = new Object();
var intervalId:Number;
// start counting only after the transition is complete
mySlideshow.addEventListener(”transitionComplete”,transitionCompleteObject);
transitionCompleteObject.transitionComplete = function(evt:Object) {
intervalId = setInterval(myFunction, 3000);
};
function myFunction() {
clearInterval(intervalId);
mySlideshow.nextImage();
}
How/where do I add your code to make it stop at picture No. 4? You wrote:
var slideInitObject:Object = new Object();
mySlideshow.addEventListener(”onSlideInit”, slideInitObject);
slideInitObject.onSlideInit = function(event:Object)
{
if (event.target.id == 4)
{
clearInterval(myInterval);
}
}
Thanks for helping again.
February 10th, 2009 at 1:23 pm
Hi,
You add the code in the same place your current code is. Have you tried it and it doesn’t work?
March 11th, 2009 at 12:57 pm
[...] Documentation for this component is available here. [...]