I get Error 1136 : incorrect number of arguments, expected 1, for this code:
public class SpaceWolf extends MovieClip {
public function SpaceWolf() {
StarBg();
}}
public function StarBg() {
var star:Star = new Star();
for (var i:Number = 0; i < 70; i++){
star.x = (Math.floor(Math.random()*650));
star.y = (Math.floor(Math.random()*600));
addChild(star);
}}}
I'm kind of new to programming so It might be something basic. I don't have any parameters or arguments in the function so I'm confused why I get that error.
//Handle game logic mcPlayer.update(); //create question mcMathQu.update();
the first "update" function of external as file works , but the instance i added in the 2nd external file, it gives me that error... (there is a 3rd one behind it which works too)
note: the code itself is an external as file of a fla file. (and i checked, everything is linked properly to their individual external as file.
this is the whole function code. (still doing in process.)
public function update(evt:Event) { //This is the game loop //Handle user input
Basically i am working through a book called..Foundation Actionscript 3.0 Animation, making things move.i am now on Chapter 9 - collision detection. On two lines of my code i get the 1135 error, letting me know that i have an incorrect number of arguments.
package { import flash.display.Sprite; import flash.events.Event; public class Bubbles extends Sprite
[code].....
The bold parts are the lines im having trouble with!
I have currently picked up a flash piece from someone which I am trying to populate. The issue is that when I look to publish I receive the error as mentioned in the title. package com.XXX.video.ui { import com.XXX.components.ScrollBar; import com.greensock.TweenLite; import com.greensock.TweenMax; import com.greensock.easing.Back; [Code] .....
how do i get around the 1136: Incorrect number of arguments. Expected 1. i have a function that is called by a button, but i also want to use that function without pressing that button, as kind of a way of refreshing what is being done threw another function in the other function im using Function x() and this is what is giving me the error the original function when called from the button is function x(event:Event):void and the button executes that function via [URL]
I have a game I'm currently working on and I've got some library movie clips with actionscript attached, the constructors for the actionscript files have several arguments obviously when I instantiate the movieclip via code with the new() statement I simply pass those arguments in no problem, but how do I pass in the arguments when I drag an instance to the stage from within flash. All I currently get is an error message "incorrect number of arguments".
I'm just starting to learn AS3 and I'm trying to create a play button on a menu screen to start a game.I keep getting MMenu.as,Line20 1137:Incorrect number of arguments. Expected no more than 0. Every where I look the proper way to handle a dispatchEvent is as shown.
i found the error here what should i type in the constructor function between the braces to call the function to the main time line public function creation() {
I've got a 1126: Incorrect number of arguments (Expected 1) but I'm not sure what kind of an argument is involved with a trace statement. My goal is to 'package' things a little more so that I can have a 'pre-loader class' that will run first followed by a gallery or whatever. Usually, I just do it all in one package or in the timeline itself, but I'm hoping that this will clean things up and hopefully go faster for me.
I'm doing a little flash nav bar and I'm trying to have the buttons link to the correct web pages. My code is extensive and I'd rather not post the whole thing in here so I'll try to be as concise as possible.Basically I'm getting this error:1137: Incorrect number of arguments. Expected no more than 1.Everything was running smooth in my script until I added the URL requests here:[code]Is the syntax incorrect or something? Again, everything was fine up until I added those two at for case 0 and case 1.
I must be in space suffering oxygen deprivation because I can not remove this error nor understand why it is occurring."1136: Incorrect number of arguments. Expected 1."
package bna{ import flash.display.Sprite; public class BNALesson extends Sprite { public function BNALesson() { var sX:int = 16;
I'm trying to make a simple slideshow that ends with the option to click and enlarge each image. Clearly, I'm a complete n00b at this and know nothing about coding.
Here's what I've done:Created the slideshow. It works. Created a thumbnail of each picture and made it into a button (btn1, btn2, btn3, btn4) with the same instance names, each on their own layer. Created an Actions layer with the following code:
stop(); function rollOverFunction(evt:MouseEvent) { play();
[code]....
The code was working fine until I added the second button...now I get the error above.
When I have a function defined like this function stopDragging(e:MouseEvent):void{ stopDrag(); //and other stuff }
It gets called by various mouse events, thats fine. But when I want to call it like this if(some condition){ stopDragging(); }
I get an error 1136: Incorrect number of arguments. Expected 1. stopDragging(); And how do I get around it so that I can fire stopDragging from my if statement?
All i do is add a movieclip to the stage of a fresh FLA, adjust its 3d position, for example adjust the 'x' position in the '3d position and view' section within properties, export the file, and I get the following errors:MainTimeline, Line 531137: Incorrect number of arguments. Expected no more than 1.MainTimeline, Line 551137: Incorrect number of arguments. Expected no more than 7.
i want to set busycursor in loadValue Function. But i'm getting error as Here i'm getting an error as incorrect number of arguments expected 1.the error that i'm getting in 3rd line. and i have not pasted full code here. But i pasted only where i'm getting error when i tried to inser busyCursor.
I am stuck. I keep getting the same error I have been stuck on this for hours. here's my error: 1136: Incorrect number of arguments. Expected 0. here's my code: the error is supposedly on line 24 which is: volSlider = new VolumeSlider(this, volume_mc);
Below is my script from Flash CS5(AS3), there is an error on line 8 reading: 'Incorrect number of arguments. Expected no more than one.' and I cant for the life of me understand what's wrong. Obviously I understand the error, but I am running myself rugged trying to fix it!
I have a document class called Main that is defined for my main movie. In the library of that movie there is a MovieClip called HomeBlock for which I have written a custom class called HomeBlock that defines its behavior. This HomeBlock class accepts one parameter in the constructor right now, an XMLDocument, and the Main class sends it to HomeBlock in the constructor call like this [code]...
i have a small problem with the APEngine class.Everytime I try to run it, it gives me this errorPHP Code:1137: Incorrect number of arguments. Expected no more than 0. the line it refers is this one:PHP Code:force = new Vector(0,0); Whats going on?? I mean, I don't understand how it can be wrong, as the APEngine class imports a custom Vector class, but Flash thinks I'm using the original Adobe Vector class
I am trying to setup a startDrag in CS4, AS3 and can't seem to find the right syntax for it. The documentation says it should be: startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void. I interpret this as: mc.startDrag(false, 55, 0, 648, 0);
Unfortunately I am getting the following errors: 1067: Implicit coercion of a value of type int to an unrelated type flash.geom:Rectangle. 1137: Incorrect number of arguments. Expected no more than 2.
I am having a problem with this code: ActionScript Code: public function createEnemys():void { Levels[1]=[[5,1,1,1], [5,1,1,2]]; Levels[2]=[10,1,1,2]; var i:int; [Code] .....
And I am getting this error: ActionScript Code: 1136: Incorrect number of arguments. Expected 4. I am trying to create 2 different enemie, other having "5,1,1,1" properties and other "5,1,1,2".
I want my navigation bar to open other pages in the same window. Currently, it's opening as if it's _blank (must be the defaut when nothing is coded).I thought I was coding correctly, but the error above popped up - so now I don't know what to do next.The code as it is with the error is as follows - the line with the error is highlighted in italics.
function goHome(event:MouseEvent):void { var targetURL:URLRequest = new URLRequest("http://www.fairwoodcommunitynews.com/Alphatest/Home.html", "_parent"); navigateToURL (targetURL); } homeBtn.addEventListener(MouseEvent.CLICK, goHome);
I have EventListeners adding and removing all over the place. But in one case, I'm removing two MouseEvent Listeners within a function. They read like so:
Code: Select allmPhotographyAtPhotography.removeEventListener(MouseEvent.MOUSE_OVER, every_Photography_over, false, 0, true); mPhotographyAtPhotography.removeEventListener(MouseEvent.MOUSE_OUT, every_Photography_out, false, 0, true); I'm getting these errors, referring to the above lines: 1137: Incorrect number of arguments. Expected no more than 3.