ActionScript 3.0 :: Incorrect Number Of Arguments - Expected No More Than One
Nov 8, 2010
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!
[Code]....
View 3 Replies
Similar Posts:
Feb 17, 2009
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.
View 6 Replies
Feb 2, 2012
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.
[code]...
View 3 Replies
Jul 18, 2011
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
View 2 Replies
Jul 29, 2009
When i test the game I am making I get this error: 1136:Incorrect number of arguments. Expected 1.
My question is how do I get the showSponsors(); (in bold) to call the private function showSponsors.
[Code]...
View 6 Replies
May 17, 2010
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!
View 1 Replies
Nov 4, 2011
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] .....
View 6 Replies
Feb 3, 2009
why this code:
Code:
var subPoints:Point = new Point(subObject.x, subObject.y);
is generating this error?
1136: Incorrect number of arguments. Expected 0.
View 8 Replies
Aug 22, 2011
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.
[Code]...
View 1 Replies
Sep 15, 2010
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() {
[Code]...
View 1 Replies
Jan 18, 2012
//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
[Code]...
View 1 Replies
Apr 6, 2009
frame 1 line 1:
Code:
function onAboutClick(evt:MouseEvent) {
var newCircle:aboutMC = new aboutMC();
newCircle.x = 500;[code]....
I get the following error:
"Error 1136: Incorrect number of arguments. Expected 1"
View 2 Replies
Jul 30, 2009
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.
View 3 Replies
Jul 6, 2009
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;
[code]....
View 3 Replies
Nov 18, 2009
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?
View 2 Replies
Dec 4, 2008
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".
View 4 Replies
Mar 27, 2010
I've used the same method for other files but for some reason it doesn't recognize the arguments. Here's just the code relating to my error.[code]...
View 2 Replies
Sep 21, 2011
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.
View 7 Replies
Nov 6, 2009
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);
[Code]...
View 3 Replies
Nov 15, 2010
I have a project I created about a year ago. It's targeting Flash Player 9 and compiles perfectly.
When I try to compile with Flash Player 10 I get the following error.
ActionScript Code: 1137: Incorrect number of arguments. Expected no more than 0.
The lines that are getting this error are
[Code]...
what changed from Flash Player 9 to 10 that is causing this ?
View 2 Replies
Apr 14, 2010
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.
View 1 Replies
Feb 14, 2010
trying to call a function from a .as file and am getting this error.AS FILE
[CODE].....
View 5 Replies
Aug 4, 2009
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);
View 3 Replies
Feb 26, 2009
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]...
View 5 Replies
Mar 16, 2009
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.
View 3 Replies
Jan 18, 2011
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".
View 3 Replies
Dec 10, 2010
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]
View 2 Replies
Aug 5, 2010
I wonder why I get this error?: Incorrrect numer of arguments This is my code on a 3-framed movie:
[Code]...
View 3 Replies
Oct 23, 2009
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.
[Code]...
View 3 Replies
Feb 2, 2009
explain this...
var i:Number = 7059467160524343000;
trace(i);
i = 7059467160524343700;
trace(i);
i = 7059467160524343999;
[Code]...
View 1 Replies