FORUMS: list search recent posts

Can't stop running carousel gallery (AS2 - XML)

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dzenisz Pankratov
Can't stop running carousel gallery (AS2 - XML)
on Jan 30, 2010 at 9:47:49 am


I have problems with this carousel image gallery.

The main problem is, that I can't make it disappear in order to load a new action on the main stage.

If every one of the menu buttons should load the same kind of action script(on different frames, with different XMLs), every time they load the new gallery over the previous one, without removing it. The result is a whole chaos, with several galleries :)

The problem is the same, if every gallery is on different Scenes.
That's why I thought, that firstly I have to stop running the script and clean the stage.

Any suggestions?

Thank you in anticipation

Return to posts index

Aaron Kiersky
Re: Can't stop running carousel gallery (AS2 - XML)
on Feb 1, 2010 at 4:15:29 pm

yeah, scenes are usually a bad idea... especially for scripting. I would say, if you need to keep a reference to a carousel, that is, if you will be bringing it back at some point, you can set the visible property for the MC containing the carousel.

For example, you load the first carousel, when someone clicks an item, another carousel is created and the current one fades (or whatever transition you want) out, once the one fades completely out of view, set it's visible property to false, this will inactivate the mouse event listeners(they will still be there though. If you start to have problems with memory you can remove the listeners when you make it invisible), until you bring it back and set the visible to true.

I would suggest looking at the TweenLite/Max tweening class, which has a way to animate them fading out, and automatically set the visible property to false, using the 'autoAlpha' property. it also has an onComplete that you could have call a function to remove the listeners if necessary.

good luck!

Return to posts index

Aaron Kiersky
Re: Can't stop running carousel gallery (AS2 - XML)
on Feb 1, 2010 at 4:16:43 pm

oh, I didn't see you were in AS2, hopefully that should still mostly apply, I can't remember exactly how things work.

why not as3, much easier to use xml, among other benefits

Return to posts index

Dzenisz Pankratov
Re: Can't stop running carousel gallery (AS2 - XML)
on Feb 2, 2010 at 9:28:28 am

Thanks a lot!

I have already solved the problem with MC too, but at the beginning using it wrong.

I'm a designer, so I'm not writing the scripts, just adapt them to my needs :)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved