Can anyone tell me if it is possible to TellTarget based on a focus event and how?
I’m going slightly mad.
Can anyone tell me if it is possible to TellTarget based on a focus event and how?
I’m going slightly mad.
Well, tellTargets have been depreciated in Flash MX, so it’s generally better to avoid using them…
I use tellTarget a lot, what do you use as a substitute?
Tell targets are easely replaced by this:
_root.pathTo.target.action;
or
_parent.pathTo.target.action;
or
_level#.pathTo.target.action;
…
[SIZE=1]Note:
_root refers to the main Timeline;
_parent to refer to a movie clip in which the current movie clip is nested;
_level# to target a loaded movie at the level assigned by #. [/SIZE]
Just the dot notation, so like:
onPress() {
_root.movie.gotoAndPlay(2)
}
Instead of the longer:
onPress() {
tellTarget(_root.movie){
gotoAndPlay(2)
}
}
Use full stops to separate them, and you can even use the targetting icon in Normal Mode to select the movie and it’ll write the path for you.
Thanks to both of you, but I’m still stuck with my original problem.
Getting an event like VB’s gotfocus to tell my movieclip to play when the window has focus.
The animation I created is 3d and uses a lot of processing power, so whenever an app is opened in front of it I stop the animation so the app can run faster. Now I need to start that animation up again everytime it’s own window has focus over the app.
Can you help me with that?
myMovieClip.onKillFocus = function (newFocus) {
statements;
};
and,
myMovieClip.onSetFocus = function(oldFocus){
statements;
};
:-\
:: Copyright KIRUPA 2024 //--