Stopping a function
Is there any way to stop a function?
I have an event listener that is a function "onRollover1".
I have a second event listener that is a function
"onStageLeave1".
Is there a way to put some code into the "onStageLeave1"
function, to stop the "onRollover1" function?
In flash 9 there was no problem if the "onRollover1" function
didn't complete before the "onStageLeave1" function started. The
code worked fine. But ever since upgrading to CS3, there is a
glitch, in which causes undesirable effects.
http://demo.xennsoft.com/assets/menu.html
Any help would be great! Thanks in advance :)
the problem appears to be that there are two Tweens acting on
the same object at the same time, conflicting with each other.
First thing to do would be to set up a global variable for the
tween rather than a local variable. then you can refer to the tween
later, and tell it to stop before starting a new tween on the same
object.
Similar Messages
-
How Do You Stop a Function (k)
I have this code placed in the second frame of my timeline.
It is there
to pause the playhead for 4 seconds before moving onto the
next frame.
Problem with the code is that once the statement is true it
keeps
jumping ahead doing a perpetual nextFrame.
I want to reset the variables and stop the function. I have
no idea what
I am doing.
startTime = getTimer();
trace("startTime "+startTime);
this.onEnterFrame = function() {
currentTime = getTimer();
//4000 below = 4 seconds
if (currentTime-startTime>4000) {
nextFrame();
trace("currentTime "+currentTime);Figured it out:
stop();
startTime = getTimer();
this.onEnterFrame = function() {
currentTime = getTimer();
//4000 below = 4 seconds
if (currentTime-startTime>4000) {
nextFrame();
this.onEnterFrame = null;
W. Kirk Lutz wrote:
> I have this code placed in the second frame of my
timeline. It is there
> to pause the playhead for 4 seconds before moving onto
the next frame.
>
> Problem with the code is that once the statement is true
it keeps
> jumping ahead doing a perpetual nextFrame.
>
> I want to reset the variables and stop the function. I
have no idea what
> I am doing.
>
> //
> startTime = getTimer();
> trace("startTime "+startTime);
> this.onEnterFrame = function() {
> currentTime = getTimer();
> //4000 below = 4 seconds
> if (currentTime-startTime>4000) {
> nextFrame();
> trace("currentTime "+currentTime);
> }
> }; -
Can I stop the function of button SHIFT
HI every one
I want stop the function of button SHIFT in keyboard
how this in form?
another question
I want when I press F1 ==> save the form instead of F10
THANX ALOThi
For shift its not possible but for F1 its.
D:\DevSuiteHome_1\forms
open the following files in NotePad.And make a backup for u r files before changes.
Fmrpcweb.res
and
Fmrweb.res
sarah -
Hello,
I have a fuction module and I will export errors. When I export an error, the function module must stop. How can I stop the function module after the error message? Can I use exit?I don't use exceptions. In my function module I have some subroutines. In this subroutines are the error messages. When I use exit it don't stop? What can I do?
For example:
FORM XY CHANGING MSGERROR TYPE BAPIRETURN.
IF NOT XX <> ''.
error-type = 'W'.
error-message = 'Error'(001).
exit.
ENDIF.
ENDFORM. -
I fail to find stop watch function in N79. Do I need to install it? If yes, how and from where? Please help. Thanks.
Solved!
Go to Solution.Many thanks for your help. I use the stopwatch and countdown timer at at work and also sometimes when Cooking!
Does anybody know why Nokia decided to not include this feature? I would have thought this is now become a basic feature of a Mobile. I also used to use it to time xtra time when watching my team, Bury FC. I have bought a timer from the Ovi store but its not very good and seems to use a lot of battery power. I'm sure if Nokia design and create a timer and stopwatch it would be as good as in previous mobiles, being more integrated into the phone. Just my thoughts on what is otherwise a very good phone. -
Stopping previous functions and tweens onPress
Flash newbie. Trying to see if someone can guide me to a way I could stop my earlier tweens and onRollOver function when my onPress function is launched. What I worked out here with that McX/YScale.stop(); and that target9_mc.onRollOver = null; is kind of working but I don't want the onRollOver function to stop until the onPress function begins. Really appreciate any help. Thanks.
var mcl_obj9:Object = new Object();
mcl_obj9.onLoadInit = function(target9_mc:MovieClip) {
target9_mc._x = 410;
target9_mc._y = 10;
TransitionManager.start(target9_mc,{type:Fly, direction:Transition.IN, duration:1, easing:Elastic.easeInOut, startPoint:6});
var ogYScale = target9_mc._yscale;
var ogXScale = target9_mc._xscale;
new mx.transitions.Tween(target9_mc, "_xscale", mx.transitions.easing.Strong.easeOut, ogXScale, ogXScale-38, 30, false);
new mx.transitions.Tween(target9_mc, "_yscale", mx.transitions.easing.Strong.easeOut, ogYScale, ogYScale-38, 30, false);
target9_mc.onRollOver = function():Void {
var mcXScale:Tween = new Tween(target9_mc, "_xscale", Elastic.easeOut, 60, 64, 4, true);
var mcYScale:Tween = new Tween(target9_mc, "_yscale", Elastic.easeOut, 60, 64, 4, true);
mcXScale.stop();
mcYScale.stop();
target9_mc.onPress = function():Void {
target9_mc.onRollOver = null;
target9_mc._y += 5;
target9_mc._x += 5;
target9_mc._xscale += 5;
target9_mc._yscale += 5;
if (target9_mc._x >= 300) {
target9_mc._x = 475;
if (target9_mc._y >= -1) {
target9_mc._y = 40;
if (target9_mc._xscale <= 150) {
target9_mc._xscale = 200;
if (target9_mc._yscale <= 150) {
target9_mc._yscale = 200;
var my_mcl9:MovieClipLoader = new MovieClipLoader();
my_mcl9.addListener(mcl_obj9);
my_mcl9.loadClip("bottlebuild9.png",this.createEmptyMovieClip("img9_mc", this.getNextHighestDepth()));you can use:
var mcl_obj9:Object = new Object();
mcl_obj9.onLoadInit = function(target9_mc:MovieClip) {
target9_mc._x = 410;
target9_mc._y = 10;
TransitionManager.start(target9_mc,{type:Fly, direction:Transition.IN, duration:1, easing:Elastic.easeInOut, startPoint:6});
var ogYScale = target9_mc._yscale;
var ogXScale = target9_mc._xscale;
new mx.transitions.Tween(target9_mc, "_xscale", mx.transitions.easing.Strong.easeOut, ogXScale, ogXScale-38, 30, false);
new mx.transitions.Tween(target9_mc, "_yscale", mx.transitions.easing.Strong.easeOut, ogYScale, ogYScale-38, 30, false);
var mcXScale:Tween
var mcYScale:Tween
target9_mc.onRollOver = function():Void {
mcXScale = new Tween(target9_mc, "_xscale", Elastic.easeOut, 60, 64, 4, true);
mcYScale = new Tween(target9_mc, "_yscale", Elastic.easeOut, 60, 64, 4, true);
mcXScale.stop();
mcYScale.stop();
target9_mc.onPress = function():Void {
mcXScale.stop();
mcYScale.stop();
target9_mc.onRollOver = null;
target9_mc._y += 5;
target9_mc._x += 5;
target9_mc._xscale += 5;
target9_mc._yscale += 5;
if (target9_mc._x >= 300) {
target9_mc._x = 475;
if (target9_mc._y >= -1) {
target9_mc._y = 40;
if (target9_mc._xscale <= 150) {
target9_mc._xscale = 200;
if (target9_mc._yscale <= 150) {
target9_mc._yscale = 200;
var my_mcl9:MovieClipLoader = new MovieClipLoader();
my_mcl9.addListener(mcl_obj9);
my_mcl9.loadClip("bottlebuild9.png",this.createEmptyMovieClip("img9_mc", this.getNextHighestDepth())); -
How to stop the function if Validation is fail
Hello guys
Got an easy question. I am trying to validate the users inputs to see if they enter the values for my textInput. The validator instance is binded to the button click. If the user clicks the button without entering value, the error messages will pop up, if they enter the values then click the button, the application will process the click event handler. My question is when the user clicks the button without the input information, my handler still process the code, and give me runtime error because the textInput is empty. I know I could use conditional statement to prevent this, but I was wondering if there are any ways to stop the handler by USING VALIDATOR class. Thanks for any helps.
code
AS:
protected function insert_clickHandler(event:MouseEvent):void
//do something here if the name if not empty.....I thought the validator will stop the application if the validation is fail.....am I wrong?
mxml
<mx:StringValidator id="cityValid" source="{name}"
property="text" trigger="{add}"
triggerEvent="click.add" //only trigger when click on add state.....
required="true"/>Sorry for the confusion. the triggerEvent="click.add" should be triggerEvent.add="click"
I am using Flex 4. The validation is fail if the user don't input anything. Does clickHandler still process the code even though the validation is fail? -
Debugger Stopping on Function with No Errors
My code is at the bottom.
The debugger always stops on the getViewResults() function.
As you can see, I've created two date objects that are being passed
into the function as arguments.
Can anyone see from the code what may be causing the debugger
to stop on that line without any errors?
Thanks.
private function getData(event:MouseEvent):void
var date1:Date = new Date(0001, 1, 1, 12, 0, 0, 0);
var date2:Date = new Date(9999, 1, 31, 23, 59, 59, 9999999);
emkw.getWebService().addSimpleHeader("Header1","https://www.mydata.com/DataService/Data.a smx","testName","testValue");
emkw.getWebService().addHeader(header1);
emkw.addgetViewResultsEventListener(resultHandler);
trace("GOT DATA");
emkw.getViewResults("Patient
Conditions",date1,date2,null,null,0,0);
}"phillipus_rex" <[email protected]> wrote in
message
news:go6fm2$je4$[email protected]..
> My code is at the bottom.
>
> The debugger always stops on the getViewResults()
function. As you can
> see,
> I've created two date objects that are being passed into
the function as
> arguments.
>
> Can anyone see from the code what may be causing the
debugger to stop on
> that
> line without any errors?
Is there a blue dot next to the line number in the code
window? -
Stop Fax functionality for some buyer codes.
Hello Everyone,
We need to stop faxing for certain buyer codes in SRM. Because some buyers are retired and we do not want to fax the POs under their buyer codes.
Because we run the L7A and L6G programe and it sends all the purchase orders to faxing. We want to stop the faxing of these POs while these programs are running and once these programs are complete we want to turn on the Fax functionality.
Can somebody help me in this?
Thanks,
Khushbu.in MN05 you can maintain for which messagetype of the and vendor you want to use mail instead of fax
When you have a messagetype in de PO like ZXXX for sending the fax then you can also set it to email in MN05 for specific vendors. (in customising mail must also be active for ZXXX ofcourse)
kind regards
arthur
Edited by: A. de Smidt on Jan 4, 2011 3:50 PM -
How to stop trigger function when in post query?
Hi All,
I have a problem, not able to find the solution.
I have created a form with 10 field items.
For a field item called RECEIVED_15G, i have created a trigger:WHEN-VALIDATE-ITEM, it works fine as per my requirement.
The problem is that i want this trigger to work only when i run the form , that when system is in NORMAL mode.
I don't want this trigger to work after i do execute query, even here the system is in NORMAL mode.
So how do i make it to work ??
Is it possible to stop that trigger work after i click execute query (Something that i can code in Post query) ??
Help me . Thank You.
Oracle Forms 6i,
Oracle DB 9i.Hi
pls share with us the code my guess ; the When-Validate-Item (WVI) trigger is firing because you are setting a value in an item from post-Query Trigger>
Note: just assign a name in a display item in post-query trigger DONT assign an id or any db item.
Amatu Allah -
Actionscript 2 - stop a function
I have a function to make a number count up tp sixty. I want it so if you leave the frame the counter will reinitiate on return. As it is, the counter works fine the first time through, but runs faster everytime you return to frame. Here is the code.
textValue = 10;
addValue = 1;
txt_ET.text = textValue;
function countUp(){
clearInterval(Interval);
if (textValue < 60){
clearInterval(Interval);
textValue += addValue;
txt_ET.text = textValue;
setInterval(countUp,800);You should look in the help documentation regarding the use of setInterval and clearInterval to learn how they work.
If you want to clear an interval you need something to identify the interval. When the setInterval function executes, it returns a Number value that is such an identifier. You use that number in the clearInterval function call. So for what you show above, your setInveral line should look something like...
var Interval:Number = setInterval(countUp, 800);
then your clearInterval function call as shown should work... except you have a redundant calling of it within the function... one of the two shown is unnecessary - I would guess the first...
function countUp(){
clearInterval(Interval);
if (textValue < 60){
clearInterval(Interval); -
How to end (stop) this function
Hi all,
using this function to play a scene for 23 seconds after
which the movie moves on
to another scene - trouble is, every 23 seconds it happend
again !
Need a way to make the function work once and then never
again.
Help much appreciated
Best wishes
Tony
loadMovieNum("matrix.swf", 2);
function wait() {
unloadMovieNum(2);
gotoAndPlay("Scene 2", 1);
myTimer = setInterval(wait, 23000);Try using setTimeout() instead.
-
I moved to the facebook button, pushed it and now the I-Pad is locked in the on position...wl not turn off, nothing. How do I unlock it? Earl
If the reset doesn't work like tonefox suggests and the Facebook page is still loaded on the iPad, see if you can force quit the app. Hold down on the sleep button until the red slider appears but do not slide to shut down. let go of the sleep button and then hold down on the home button until Facebook quits. Then restart the iPad by holding down on the sleep button until the red slider appears but this time slide to shut down. Hold down on the sleep button again until the Apple logo appears - let go of the button - let the iPad finish restarting.
-
My ipad said not enough storage and it stop all function
the message say this ipad cannot be backed up because there is ot enough icloud storage available. you can manage your storage settings , but the button to
setting does nt work , the button close either , then what can i do? thanksReset it by holding the power and home buttons at the same time until you see the Apple logo, then release.
-
Need help with effect / function stop!
Hi all!
I tried to build some kind of custom pop-up-menu with fade
in/out effect, however the menu sometimes (< very often, but not
always) disappears while the mouse is still over it.
So i defined a function to stop/abort the effects, but this
doesn't work right.
Could anybody please tell me, how to stop all functions,
while the mouse is over a link?
/// This is the container to appear / disappear:
<div id="navislide" style="height:292px;
overflow:hidden;">
<a href="mylink.html" onMouseOver="killall();"
onMouseOut="hideit();">mylink</a>
</div>
/// This is the link to show the container:
<a href="#"
onMouseOver="slidefadein.start();">mylink</a>
<script type="text/javascript">
function displayblock() {
var thediv = document.getElementById('navislide');
thediv.style.display= "block";
slidetimer = setTimeout('slidefadeout.start();', 2000);
hideit = function() {
slidetimer = setTimeout('slidefadeout.start();', 2000);
function displaynone() {
var thediv = document.getElementById('navislide');
thediv.style.display= "none";
killall = function() {
clearTimeout(slidetimer);
slidefadeout.stop();
slidefadein.stop();
displayblock();
slidefadeup.start();
var slidefadein = new Spry.Effect.Fade("navislide", {from:0,
to:100, toggle:false, setup:displayblock, finish:hideit});
var slidefadeout = new Spry.Effect.Fade("navislide",
{from:100, to:0, toggle:false, finish:displaynone});
var slidefadeup = new Spry.Effect.Fade("navislide",
{from:100, to:100, toggle:false});
</script>
Probably, its all about the "killall"-function, because when
the mouse moves over the link, the function to abort all other
effects, does not take effect.
Thank you so much vor any kind of help or hint!!
Cheers,
idefixI would be most interested in a reply to this for I asked
weeks ago how to use an onClick stop() function for the links in my
page. I was given the stop function by VFusion (it is to stop
panels from rotating), but I could never figure out how to actually
get the function to stop the panels and could not get it no matter
what I tried, eventually had to take the panel rotation out.
Maybe you are looking for
-
I need to know the location where iTunes downloads software to, it is filling up my hard drive. I am trying to put my iPhone4 into recovery and then will restore it. iTunes starts extracting the software. But the iPhone reboots and by the time the s
-
How do I get my iPhone iPad n MacBook pro to all be in sync?
I really just don't get it
-
Please help me to find relation between workitem & Sap Doccument number .. ie SAP Table which has work item and sap doccument number
-
Conveter for DataTable that has access to DataModel row variable?
I am trying to make a conveter that I can use in conjunction with a datatable. So I can verfify the results against a DB and do custom calculations and easily display the error message next to that row. I do already have access to an EntityManager in
-
Can anyone Reproduce This screencast? Strange behavior from Mac
https://drive.google.com/file/d/0B5LXJD4aR7maZng4cnl6Z2UxS28/edit?usp=sharing 1. Open finder and click go 2. go to /var 3. click on var alias and go to at file After you open the /var/at folder there is a file called at.deny 4. Click on the file