Home
> FlashEff 1 (Discontinued version)
> Topic
Dynamically start staged FlashEff instance
Posted by jensworld
Dynamically start staged FlashEff instance March 23, 2009 01:05PM | Registered: 15 years ago Posts: 2 |
I've already setup my FlashEff component on the stage and want to not autoplay, but start it dynamically (i.e. say, on mouse click) - how do I do that? Most of the examples I'm seeing are creating the FlashEff instance dynamically as well, but I need to start one that has already been setup in the timeline.
Re: Dynamically start staged FlashEff instance March 23, 2009 01:34PM | Admin Registered: 15 years ago Posts: 405 |
Re: Dynamically start staged FlashEff instance March 23, 2009 01:56PM | Registered: 15 years ago Posts: 2 |
Precisely what I tried. I have something like this in my document class - where myFlashEff is the instance name of FlashEff on the stage. The FlashEff instance's auto play under the show tab is unchecked:
public function docClass() {
startFlashEff();
}
public function startFlashEff():void {
myFlashEff.show();
}
...I get this error:
FLASHEFF WARNING: Please set the target or _targetInstanceName property before applying an effect.
If I comment out myFlashEff.show() and check the FlashEff instance's autoplay, everything works fine, but of course, its automatically playing.
public function docClass() {
startFlashEff();
}
public function startFlashEff():void {
myFlashEff.show();
}
...I get this error:
FLASHEFF WARNING: Please set the target or _targetInstanceName property before applying an effect.
If I comment out myFlashEff.show() and check the FlashEff instance's autoplay, everything works fine, but of course, its automatically playing.
Re: Dynamically start staged FlashEff instance May 11, 2009 04:13PM | Registered: 15 years ago Posts: 30 |
Re: Dynamically start staged FlashEff instance May 12, 2009 07:08AM | Admin Registered: 15 years ago Posts: 405 |
jensworld,
Write this above the show() method to see if you have a target set.
trace( myFlashEff._targetInstanceName )
Are you using a loader to load an image? If so, make sure you add the effect only when the image has loaded 100%
tania,
To add a button pattern to a movie clip just set it from the panel, go to the button tab and its pretty self explanatory from there.
Write this above the show() method to see if you have a target set.
trace( myFlashEff._targetInstanceName )
Are you using a loader to load an image? If so, make sure you add the effect only when the image has loaded 100%
tania,
To add a button pattern to a movie clip just set it from the panel, go to the button tab and its pretty self explanatory from there.
Re: Dynamically start staged FlashEff instance April 10, 2014 09:26AM | Registered: 10 years ago Posts: 4 |
Re: Dynamically start staged FlashEff instance June 15, 2015 01:13PM | Registered: 8 years ago Posts: 12 |
Re: Dynamically start staged FlashEff instance July 22, 2015 05:21AM | Registered: 8 years ago Posts: 12 |
I really liked this article and i appreciate good content as always I do have lots of good content about
Visit This Dean Winchester Coat
Visit This Dean Winchester Coat
Sorry, you do not have permission to post/reply in this forum.