ActionScript 2.0 :: ClearTimeout Method?
Jul 10, 2008I'm not sure why its not clearing,
panel_mc.inv_btn.onRelease = runScript;
var my_timedProcess:Number = setTimeout(closePanel, 4500, "Image3");
function runScript():Void[code]....
I'm not sure why its not clearing,
panel_mc.inv_btn.onRelease = runScript;
var my_timedProcess:Number = setTimeout(closePanel, 4500, "Image3");
function runScript():Void[code]....
I have swf movies that load in on a timeDelay on Click, but can't get to unload correclty when another click happens, I was directed to this adobe file:
[URL]
but never used before and don't really understand, would anyone beable to help implement to my onCLick script?? this is what I have on my onClick;
[Code]...
var clearId:int = setTimeout(function():void{
//some code here
clearTimeout(clearId);
[code].....
Why timeout is not clearing. I declare the timer outside of everything so it can be seen by everybody. After the mouse moves on the stage, the timeout is set. Then as soon as the mouse goes down on a movieclip, the btnDown function gets called which is supposed to clear the timeout. And when the mouse goes up, the timeout is supposed to be set again. The funny thing is the timeout does get cleared when the hideControls function is called, just not when the btnDown function is called. However, everything is working like it's supposed to in the btnDown function except the timer.
Code:
var controlsTimer:uint;
// BEGIN TWEEN
stage.addEventListener(MouseEvent.MOUSE_MOVE, showControls);
function showControls(e:MouseEvent):void {
Tweener.addTween(controls_mc, controlsTweenIn);
[Code] ......
I am getting this error: 1180: Call to a possibly undefined method startWorld.but the method startWorld is defined as you can see in attachment.
View 4 RepliesI'm tryng to make a public static method call another method, but Flash throws error 1180, sayng that the method called by the static method is undefined.
Code: Select allpackage
{
import flash.display.MovieClip;[code]....
i have a fortran method which creates random numbers. i want to convert this method to a flash method . I want to get numbers from this method and use them in the delay method of flash.
the fortran method is the folowing
real znew1 , zold1 ,a,m,z1,p,TIME1
a= 16807.
m=2147483647
B=2
[Code]....
I have a class called Animal that has a method foo() and I call it out within the Animal class.
Code:
protected function foo():void
{
trace("Animal");
}
I also have a class called Cat that extends Animal and overrides the method foo()
Code:
override protected function foo():void
{
trace("Cat");
}
However when calling the function foo() from the superclass it traces out Animal not Cat (using a Cat object).How can I make superclass call out methods in the subclass?
two classes, both extend EventDispatcher. Static method in 1st class calls instance method in 2nd event not getting caught. [code]also, since dispatchEvent() is an instance method, is there any way of calling it without first instantiating the class? i expect not.
View 2 Replies[Code].....
getUser was already in UserService.java. I just created getUser2 and it's identical to getUser. When I try to call getUser2, i get the "Cannot invoke method" error. question: Do I need to specify getUser2 in some other file? like in some configuration file? if so, which one and how do I do it.
Is there a way to get a method's parameters from outside the method? I know that there's an "arguments" property but it's only accessable from within the method. I'm working on a RPC system and need to store the method parameter types in a hash table for easy access later on.
View 1 RepliesCode:
class A{
function A(){
trace("construct");
}
private function moo(){
[code]....
yet this doesn't, I'd expect it to: construct, start mooing, moo!, moo!, moo!, ...yet the moo! moo! moo! doesn't appear, as if moo() never gets called it all.
OK, from what I know actionscript in Flex runs asynchronously. I need the ability to run a method in a loop synchronously. Consider this code:
public class CustomerContainer extends VBox
{
public function CustomerContainer ()
{
[Code]....
This is not my exact situation as it is a bit more complicated to explain here. There is an abstract class and several custom view objects derived from it. Some of the views are dependent on others being completed first but I cannot seem to order them in the correct order. TIMERS are not an option. Probably not explaining this correctly.
How can I access the "draw" method from the "startDrawing" method below, why is the trace ouput for this code:
Drawing Started
undefined
Drawing Stopped
And once that is solved will the "draw" method be able to call the pen.makeMark method as attempted?
Code:
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;[code].....
I have a class. I can call the constructor (initialize the class), and the constructor can then call a function/method inside it's own class (so I know it works), but when I try to call the same function/method myself from the instance of the class I just initialized, I get an error.
View 3 RepliesI can make a slideshow by importing 30 or so images and using the timeline. I can make a slideshow by importing 30 or so images and using actionscript so that the timeline is realtively short.
What is the best way? I discovered how to do it by loading a movieclip with the image, but that is risky because depending on the connection, it sometimes loads too late.
What is the most streamlined, small filesize way to make a long slideshow? Can you point me to posts that talk about this or tutorials?
I was googling all the evening trying to find a safe way to send data to MySQL db.
The method that I was using in past projects is like this (AS2 > PHP > MySQL):
[Code]...
This method is unsafe since it sends data to PHP with a GET method, the URL string insertDB.php?Name=Jonh&Age=18&Country=USA&Points=123 So anyone can just type in the address bar [URL]..and insert this record (for example with 999 points) into database.
I am using an FLV component dragged to the stage and then bringing in video content. How can I make it visible=false when it has finished playing using the COMPLETE event?
View 3 Replieshow to use get and set method?Is there any easy example for using this methods ?Can i use only the get method or both methods should use together ?Can i call the getter variable in any other class and how do i call it ?
View 1 RepliesI have a greyscale image and I want to scan the pixels out of the Image and this is what I get :
var i:int;
var j:int;
for (i = 0; i < img.contentWidth ; i++) {
for(j = 0; j < img.contentHeight; j++){
pixeldaten.addItem({x:i,y:j,pixel:bmd.getPixel(i,j)});
}}
But the table doesn't look like RGB Values . (R , B , and G must be the same).
How to call AS2 method from Javascript? Without ExternalInterface use.
View 1 RepliesThere is a Point (flash.geom.Point) class in as3.I want to add method to class Point (e.g. convertToStagePointMyMethod()) and I'd like to call this method by using [code]What should I do in order to add this method to class Point? Is it possible without inheritance. I'd like to use it like "partial" classes in .NET
View 4 RepliesI have installed [code]I have read about this method and about SoftKeyboardEvent but i could not access softkeyboard method and SoftKeyboardEvent as well.I am making a Flex Mobile Project in which user can add text at run time.How can i open soft keyboard to add text at run time.
View 1 RepliesI created a class of sliders that are used to control the opacity of various movieclips. The movieclips are layered on top of eachother, so if one slider is at 100%, you can't see the other movieclips below it.
Is it possible to push one slider (e.g., 'sliderBus') down to 0% when a new slider (e.g., sliderAir) is moved above 0%? Basically, I only want 1 slider to be able to be above 0% at any given time.
.fla code:
Code:
var thumbAir:img02 = new img02();
thumbAir.x = 450;
thumbAir.y = 773;
[Code]....
I'm using this code to make a really simple button
on (press) {
Color.nextFrame();
}
But I keep getting this error: There is no method with the name 'nextFrame'.
I get the same error when using prevFrame also. What's wrong??
I'm getting an error that says Method cannot be used as a constructor - and I can't seem to find what that means exactly.
Here's my code (the line that is getting the error should be in bold):
stop();
var currentAnimation = new mapIdle;
makePlay();
[Code]......
I'm having a couple of problems. One is that in my custom MovieClip class, I have a textbox that refuses to show up when embedFonts is true, but is otherwise fine when it is left alone. The second is that for some reason, I can't access a method in this custom class from the main class (AT least I think that's what's wrong). It gives me an error:
[Code]...
Wondering if anyone knows how to tweak the scroller() method in the mp3 tutorial to work more like a news ticker in that the artist and track continuously move from right to left and repeat itself (like the Zune radio on myspace) instead of moving back and forth
[Code]....
I have one script which is working a treat ( using ASBroadcasters ) and then today, I copied and pasted the same script into a new site and whenever I try to register a listener, I get the dreaded "There is no method with the name addListener"... oh, and a few things. the broadcasting object is a class extending the XML class, and i have used the same script before with no issues the listening object extends the object class, and whilst this class has been freshly developed, the last time I used the ASBroadcaster methods I didn't have to extend anything for it to work.
View 2 RepliesRight now I have a .swf file I'm using to hold some fonts that I later upload and embed in a different project file.
I know nothing about SWC files except that you can export them into your components folder for use. Is there a way to do this with my font file? I'd like to get away from the getURL() method.