OnExitFrame?
I know there is an onEnterFrame function and I currently using it to fade in, sort of like a rollover:
Code: _root[index].onEnterFrame = function() { if (_root[index].vid._alpha < _root[index].vid._targetAlpha) { _root[index].vid._alpha+=3; } }; which accomplishes what i want as far as fading. However, I want a way to track a sort of onExitFrame so i can also fade the object out. Is this possible?
Thanks
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 12-07-2006, 05:04 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
OnExitFrame ?
I have an issue with a nested movieClip that I am trying to understand.
I am trying to remove a movieclip from the stage when the the frame in which the movieclip is created is left.
I want to so something like:
onExitFrame = function(){
myClip.removeMovieClip();
}
But I understand their is no such method as onExitFrame.
Here is the code that creates the movieclip:
Code:
//usertype combobox
/*
I have an instance of the combobox component off stage in the parent movieclip. I am using attachMovie to avoid having to place the component into multiple movies.
*/
_root.createEmptyMovieClip("usertype_mc", 21001);
_root.usertype_mc.attachMovie("FComboBoxSymbol", "addUser_mc", 1);
_root.usertype_mc.addUser_mc._x = 120;
_root.usertype_mc.addUser_mc._y = 100;
_root.usertype_mc.addUser_mc.addItem("webtop", 1);
_root.usertype_mc.addUser_mc.addItem("website", 2);
//isactive combobox
_root.usertype_mc.attachMovie("FComboBoxSymbol", "isactive_mc", 2);
_root.usertype_mc.isactive_mc._x = 120;
_root.usertype_mc.isactive_mc._y = 150;
_root.usertype_mc.isactive_mc.addItem("active", 1);
_root.usertype_mc.isactive_mc.addItem("inactive", 2);
this.onUnload = function(){
_root.usertype_mc.removeMovieClip();
}
OnExitFrame
I'm using Flash 8. I would like an actionscript to run when a frame is completed. I want something like...
_root.onExitFrame = function () {(my code here)}
However, this doesn't work and I can't find something that will. Does anyone know?
OnExitFrame?
Does there exist a comand like that (or that does the same) so that when you leaves a frame it triggers an action?
Delete AS Onexitframe
hello, pretty new to this actionscript business,
but from seeing a tutorial I managed to adapt a nice little animation script for Flash 8 which I want to use in a preloader for a website.
Trouble is the script keeps working indefinitely after it has supposed to have finished.
Attaching the file should save me anymore words, help in this would alleviate much frustration. Cheers, John
OnExitFrame Event Listenter?
I have a flash project that is intended to be used as a website. I have ten frames on one layer. Each frame is a page on the website. I have a navigation bar at the top with ten buttons. I placed code in the actions layer to create a MouseEvent.CLICK listener for each button and to load the frame associated with each button. On the frames themselves I am using the using the URLLoader to import text from external html files and load the text into the htmlText of a TextField object that I am creating with the Loader function addChild(textfield); The code to do this is located in the individual frames.
The problem I am having is that when I click the button to load a different frame, the textfield child remains on the stage and shows on the next frame.
I want to be able to use the removeChild method to get rid of the TextField when I exit the frame.
ActionScript 3 doesn't seem to have an event that corresponds with exiting a frame.
Is there any event listener that can provide this functionality?
Can this possibly be done with LoaderInfo.unload?
[CS3] How Do I Get An "onExitFrame" Effect?
Maybe not so Newbie. I've killed days searching for the answer, and it seems there should be a fairly simple one.
Is there a way to affect an object after (as) you leave a frame without adding it to the exit method (button, etc.)?
(I had an FLVPlayer I couldn't simply stop (sound) as I left the frame. There are 3 possible nav modes to get off that frame through "global" nav bars. I DID NOT want to mod ALL with instance.stop() for this ONE exception to the norm!!!) There had to be a more elegant way!
I tried addEventListener(Event.ENTER_FRAME,killDamnedThing );
with a function checking for currentLabel change.
That works to get a trace after I've left that frame, but I can't mod the MC instance once I'm off the frame it's in. (no longer in display list, I know.)
I did finally solve it through SoundMixer.stopAll() -- because that is a persistent object; which got me to think: is there a way to make the FLVPlayer instance or any other object left behind, a global object (or have a global var link to it) to be able to affect it later like sending the trace? I couldn't get anything like that to work for me to stop() the FLVPlayer instance.
I'm still scripting in frames, so please don't say I need to read a few phone books tonight to put the answer in an .as file. (I'm working toward that.)
|