1136 incorrect number of arguments. expected 0

package  {
          import flash.display.MovieClip;
          import flash.utils.Timer;
          import flash.events.Event;
          import flash.net.URLLoader;
          import flash.net.URLRequest;
          import flash.events.*;
          import flash.events.TimerEvent;
          public class JuteBox extends MovieClip {
                    private var tracks:Array;
                    private var i:int=0;          //points to current track
                    private var pollTimer:Timer = new Timer(100);          //updates UI periodically
                    public function JuteBox(url:String="content/playList.xml") {
                              trace( "JuteBox" );
                              //load the playList
                              var loader = new URLLoader();
                              loader.load( new URLRequest(url));
                              loader.addEventListener( Event.COMPLETE, onListLoaded );
                              //set up the timer
                              pollTimer.addEventListener(TimerEvent.TIMER, updateUI );
                              pollTimer.start();
                              //initizlize the interface
                              //buttons
                              play_btn.addEventListener( MouseEvent.CLICK,
                                        function (e) { tracks[i].play() }
                              //sliders
                              //text box
                              // constructor code
                    }//con
                    private function onListLoaded(e:Event):void {
                              trace( "onListLoaded");
                              var loader = e.target;
                              //populate the array tracks
                              var playList = new XML( loader.data );
                              trace( playList.Song );
                              tracks = [];
                              for each (var song in playList.Song) {
                                        tracks.push( new Track ( song.@src ));
                    }//onbListLoaded
                    //updates the interface perdically
                    private function updateUI(e:Event=null):void {
                    }//updateui
                    //advances to next track
                    private function next(e:Event=null):void {
                    }//next
                    //goes to previous track
                    private function prev(e:Event=null):void {
                    }//prev
          }//class
}//pack
I'm sure it is something obvious but I can't find it. 

For the line you highlighted in red you appear to be creating a new Track object... 
                    tracks.push( new Track ( song.@src ));
which means you should have imported that class if it being used.
Why did you highlight that line?.

Similar Messages

  • ui:ContextMenuItem in MXML causes Error 1136: Incorrect number of arguments

    Hello,
    I'm trying to define a context menu declaratively like so:
    quote:
    <ui:ContextMenu id="editChartDataContextMenu">
    <ui:customItems>
    <mx:Array>
    <ui:ContextMenuItem caption="Clear"/>
    </mx:Array>
    </ui:customItems>
    </ui:ContextMenu>
    However, the Flex compiler gives an error for the line that
    reads "<ui:ContextMenuItem ....". (the line in boldface).
    The error is: 1136: Incorrect number of arguments. Expected
    1.
    Needless to say, I have experimented with varying number of
    attributes, but no luck.
    I have googled in vain to find examples where context menus
    are built up using markup; all examples seem to be imperative
    (ActionScript) code, instead of declarative.
    Any ideas?
    Joubert

    I know context menus can be used in limited situations with
    limited functionality in Flex. Don't know if your usage is within
    the ways context menus are used in Flex.

  • Incorrect number of arguments expected 1

    Hi,
    I'm new to this flex. Actually 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.
    So please help me what i hv to change. waiting for your replay.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
              creationComplete="loadValues()" horizontalAlign="center"      --------------->  Here i'm getting an error as incorrect number of arguments expected 1.
              verticalAlign="middle"  color="#080808" borderColor="#FFF8E0" backgroundColor="#FFF8E0"
              xmlns:local="*"
              xmlns:tInput="assets.actionScript.*"
              xmlns:controls="com.iwobanas.controls.*"
              initialize="initTimer()"
              xmlns:dataGridClasses="com.iwobanas.controls.dataGridClasses.*"
              applicationComplete="init(event)" height="100%" width="100%">
    <mx:Style source="defaults.css" />
    <mx:Script>  
              <![CDATA[
                        import assets.actionScript.Trim;
                        import com.scottlogic.charts.DataGridExporter;
                        import mx.controls.ComboBase;
                        import assets.script.pods.view.Data;
                        import org.alivepdf.layout.Unit;
                        import mx.collections.ICollectionView;
                        import assets.actionScript.EscalationDTO;
                        import alarmSlide.TowerSelection;
                        import flash.net.navigateToURL;
                        import mx.binding.utils.BindingUtils;
                        import mx.controls.dataGridClasses.DataGridItemRenderer;
                        import mx.events.ListEvent;
                        import mx.charts.chartClasses.DualStyleObject;
                        import assets.actionScript.TowerInchargeRoleMappingDTO;
                        import flash.utils.clearInterval;
                        import flash.utils.setInterval;
                        import alarmSlide.SendMessageForEscalation;
                        import mx.skins.halo.BusyCursor;
                        import alarmSlide.REForAlarmReport;
                        import mx.managers.ToolTipManager;
                        import mx.controls.ToolTip;
                        import mx.collections.SortField;
                        import mx.collections.Sort;
                        import mx.messaging.messages.RemotingMessage;
                        import mx.events.AdvancedDataGridEvent;
                        import assets.actionScript.TowerStatus; 
                        import mx.rpc.events.FaultEvent;
                        import mx.rpc.events.ResultEvent;
                        import assets.actionScript.ValueObject;
                        import mx.messaging.channels.AMFChannel;
                        import alarmSlide.LEDChar;
                        import mx.utils.URLUtil;
                        import com.adobe.serialization.json.JSON;
                        import com.adobe.serialization.json.JSONDecoder; 
                        import mx.collections.ArrayCollection;
                        import mx.collections.IViewCursor;
                        import mx.collections.IHierarchicalCollectionView;
                        import mx.controls.Alert;
                        import mx.managers.PopUpManager; 
            import flash.net.FileReference;
                   import mx.messaging.messages.IMessage;
                  import mx.messaging.Channel;
                  import mx.messaging.ChannelSet;
                  import mx.messaging.channels.StreamingAMFChannel;
                        import flash.display.StageDisplayState;      
                        import mx.collections.ArrayCollection;
                        import mx.managers.CursorManager;
                        private var sendMessageScreen:SendMessageForEscalation;
                        private var escalationAlarmHistoryPopup:EscalationAlarmHistoryPopup;
                        public var manualOrScheduleTicketing:ManualOrScheduleTicketing;
                        public var editEscalationLevelPopup:EditEscalationLevelPopup;
                        private var escalationLevelPopup:EscalationLevelPopup;
                        private var escalationSiteDetailsPopup:EscalationSiteDetailsPopup;
                        [Bindable] private var towerName:String = "NoData";  
                        [Bindable] private var contactNumber:String = "NoData";
                        // Data Storgae variables
                        [Bindable] private var energyConsumption:ArrayCollection = new ArrayCollection();
                        [Bindable] public var dataColl:ArrayCollection = new ArrayCollection();
                        [Bindable] public var closedTicketArrayColl:ArrayCollection = new ArrayCollection();
                        [Bindable] private var towerDetails:ArrayCollection = new ArrayCollection();
                        [Bindable] private var escalationData:ArrayCollection = new ArrayCollection();
                        [Bindable] public var escalationLevelDetails:ArrayCollection = new ArrayCollection();
                        [Bindable] public var towerEscalationLevelDetails:ArrayCollection = new ArrayCollection();
                        [Bindable] private var escalationMasterList:ArrayCollection = new ArrayCollection();
                        [Bindable] public var alarmDetailsList:ArrayCollection = new ArrayCollection();
                        [Bindable] public var siteInformationList:ArrayCollection;
                        [Bindable] public var communicationInfoList:ArrayCollection;
                        [Bindable] public var operatorDetailsList:ArrayCollection;
                        [Bindable] public var siteLiveDataList:ArrayCollection;
                        [Bindable] public var siteLiveAlarmDetailsList:ArrayCollection;
                        [Bindable] public var ticketEscalationStateList:ArrayCollection = new ArrayCollection();
                        [Bindable]
                        public var siteAndDistrictDisplayName:String="";
                        public var categoriesArrColl:ArrayCollection = null;
                        public var tempArrColl:ArrayCollection = null;
                        public var userID:int = 0;
                        public var customertId:int = 3;
                        private var popupWin:PopupForTicketing;
                        // to store tower configuration
                        public static var data:ArrayCollection = new ArrayCollection();
                        private var intervalUnit:uint;
                        [Bindable]  
                        public var folderList:XMLList;
                        // BlazeDS variables
                 [Bindable] public var channelUrl:String;  
                  [Bindable] public var liveId:int=0;
                           [Bindable]
                           public var emailOrSmsMessageFormat:String = "";
                        [Bindable]
                        private var escalationEditOption:Boolean = false;
                        [Bindable]
                        private var swapCount:int = 0;
    //  ---------------------------- To Control Session ------------------------- //
            public var myTimer:Timer;
                        private function initTimer():void
                                   myTimer = new Timer(1800000);
                             myTimer.addEventListener("timer",logout);
                             this.addEventListener(MouseEvent.MOUSE_MOVE, resetTimer);
                             myTimer.start();
                        private function logout(event:Event):void
                                  this.addEventListener(MouseEvent.CLICK,forward);
                        private function forward(event:Event):void
                                  navigateToURL( new URLRequest("jsp/checkin/index.jsp"),"_self");
                        private function resetTimer(event:Event):void
                                  myTimer.reset();
                            initTimer();
    //  ---------------------------- To Control Session ------------------------- //
                            * This method will be called as soon as SWF loads in the browser , creating a AMF channel which communicates to Java
                            private function loadValues(mouse:MouseEvent):void{   ----------------------------------------------------------------->> When i enter Event to the loadvalues function i'm getting that error
                                            ticketViewStack.selectedChild = liveTicketVBox;
                                      userID = Application.application.parameters.userId;
                                      customertId = Application.application.parameters.customerId;
                                             if("true" == Application.application.parameters.escalationEditOption.toString()){
                                                escalationEditOption = true;
                                            channelUrl = "./messagebroker/amf";
                                             userID = 92;
                                      customertId = 3;
                                               escalationEditOption = true;
                                              channelUrl = "http://172.16.1.144:5009/messagebroker/amf";
                                var cs:ChannelSet = new ChannelSet();
                                            var customChannel:AMFChannel = new AMFChannel("my-amf",channelUrl);
                                            cs.addChannel(customChannel);
                                            remoteObject.channelSet = cs;
                                            remoteObject.getEscalationMaster();
                                            cursorManager.setBusyCursor();
                                            remoteObject.getAllLiveEscalationDetails(userID,customertId,displayTo wer.selectedItem.data,ticketType.selectedItem.data);
                                            cursorManager.removeBusyCursor();
                                            displayTower.selectedIndex = 0;
                                            refereshTime.selectedIndex = 0;

    Hi, Actually i did changes like show below.
    i made creationComplete="loadValues()"
    And i made
    private function loadValues():void
    I want to  set a busy cursor, But its not working.
    Actaully the loadValues() function will load the data when we open that perticular page.but it;ll take some time to load so that i want to put busy cursor. In above Code i used busy cursor but its not working.

  • 1136: Incorrect number of arguments.  Expected 1

    i got the error in the following code please help me how this happens
    package zoo{
        import flash.utils.setInterval;
        import flash.utils.clearInterval;
        internal class VirtualPet{
            internal var PetName;
            private static var maxNameLength = 20;
            private static var maxCalories = 2000;
            private static var caloriesPerSecond = 100;
            private var digestIntercalID;
            private var CurrentCalories=VirtualPet.maxCalories/2;
            public function VirtualPet(name){
                //object.variableName = "some value";
                this.PetName = name;
                digestIntercalID= setInterval(digest,1000);
            public function eat(foodItems){
                if(CurrentCalories==0){
                    trace (getName() + "is dead you cannot feed it");
                    return;                   
                if (foodItems is Apple){
                    if(foodItems.hasWorm()){
                        trace ("the" + foodItems.getName()+ "had a worm"+ getName() + "cannot eat it");
                        return;
                //object.variableName = value;
                //this.CurrentCalories +=numberOfCalories;
                //setCalories(CurrentCalories + numberOfCalories);
                trace (getName() +"ate " + foodItems.getName());
            setCalories(CurrentCalories + foodItems.getCalories());
            private function digest(){
                trace (getName()+"digested some food");
                setCalories(getCalories() - VirtualPet.caloriesPerSecond);
            public function setCalories(newCurrentCalories){
                if(newCurrentCalories >VirtualPet.maxCalories){
                    CurrentCalories = VirtualPet.maxCalories;       
                }else if (newCurrentCalories <0){
                    CurrentCalories = 0;
            }else {
                CurrentCalories = newCurrentCalories;
            //calculate the amount of calories left   
            var caloriePercentage = Math.floor(getHunger()*100);
            trace (getName()+ "has "+ CurrentCalories + "Calories"+ caloriePercentage +"% of food remeaning" );
            if (caloriePercentage == 0){
                clearInterval(digestIntercalID);
                trace (getName()+"has died you can't feed it");
                return;
            public function getCalories(currentCalories){
                return CurrentCalories;
            public function getHunger(){
                return CurrentCalories / VirtualPet.maxCalories;
            public function setName (newName){
                if(newName.length>VirtualPet.maxNameLength){
                    newName = newName.substr(0,VirtualPet.maxNameLength);
                }else if (newName.length==" "){
                    return;
                PetName = newName;           
            public function getName(){
                return  PetName;

    What Murphy is trying to say is that you're supposed to use an argument within the getCalories function.
    Like this:
    setCalories(getCalories(theMissingArgumentHere) - VirtualPet.caloriesPerSecond);
    This is because when you created your getCalories function you "asked" for an argument:
    public function getCalories() //function expecting 0 arguments
    public function getCalories(currentCalories) //function expecting 1 argument (currentCalories)
    public function anyOtherFunction (num1:int, num2:int, num3:int) //function expecting 3 arguments...and so on.

  • ORA-02315: incorrect number of arguments for default constructor

    I was able to register the XML schema successfully by letting Oracle creating the XML Types. Then when I try to execute the create view command the ORA-02315: incorrect number of arguments for default constructor is always raised.
    I tried using the XMLTYPE.createXML but it gives me the same error.
    Command:
    CREATE OR REPLACE VIEW samples_xml OF XMLTYPE
    XMLSCHEMA "http://localhost/samplepeak4.xsd" ELEMENT "SAMPLE"
    WITH OBJECT ID (ExtractValue(sys_nc_rowinfo$, '/SAMPLES/SAMPLE/SAMPLE_ID')) AS
    SELECT sample_t(s.sample_id, s.patient_info, s.process_info, s.lims_sample_id,
    cast (multiset(
    SELECT peak_t(p.peak_id, p.mass_charge, p.intensity, p.retention_time,
    p.cleavage_type, p.search_id, p.match_id, p.mass_observed,
    p.mass_expected, p.delta, p.miss, p.rank, p.mass_calculated,
    p.fraction)
    FROM peak p
    WHERE s.sample_id = p.sample_id) AS PEAK107_COLL))
    FROM sample s;
    Can someone help me.
    Thanks
    Carl

    This example runs without any problems on 9.2.0.4.0. Which version are you running? And which statement causes the error message?

  • UserManager's Create, CreateAsync and FindAsync methods giving "Incorrect number of arguments for call to method Boolean Equals(...)"

    I've made custom User and UserStore classes.
    Now I'm trying to register or login with a user, but I get the error
    'Incorrect number of arguments supplied for call to method Boolean Equals(System.String, System.String, System.StringComparison)'
    The error is on line 411:
    Line 409: }
    Line 410: var user = new User() { UserName = model.Email, Email = model.Email };
    --> Line 411: IdentityResult result = await UserManager.CreateAsync(user);
    Line 412: if (result.Succeeded)
    Line 413: {
    The problem is that I can't really debug UserManager's methods, because it is in a closed DLL.
    I get this same error on
    UserManager.FindAsync(user), UserManager.CreateAsync(user,password), UserManager.Create(User user)
    Now the error doesn't occur when I log in with an External Login, like Google, which also uses methods from UserManager. Entering the email works
    as well, but when the user has to be created from an External Login with the inserted email, it gives the CreateAsync error
    too.
    How can I fix this? Do I need to create my own UserManager? Or do I need another solution entirely?
    Packages (relevant):
    package id="Microsoft.AspNet.Mvc" version="5.1.2"
    id="Microsoft.Owin" version="2.1.0"
    id="Microsoft.AspNet.Identity.Core" version="2.0.1"
    UserStore.cs
    public class UserStore :
    IUserStore<User, int>,
    IUserPasswordStore<User, int>,
    IUserSecurityStampStore<User, int>,
    IUserEmailStore<User, int>,
    IUserLoginStore<User, int>
    private readonly NFCMSDbContext _db;
    public UserStore(NFCMSDbContext db)
    _db = db;
    public UserStore()
    _db = new NFCMSDbContext();
    #region IUserStore
    public Task CreateAsync(User user)
    if (user == null)
    throw new ArgumentNullException("user");
    _db.Users.Add(user);
    _db.Configuration.ValidateOnSaveEnabled = false;
    return _db.SaveChangesAsync();
    public Task DeleteAsync(User user)
    if (user == null)
    throw new ArgumentNullException("user");
    _db.Users.Remove(user);
    _db.Configuration.ValidateOnSaveEnabled = false;
    return _db.SaveChangesAsync();
    public Task<User> FindByIdAsync(int userId = 0)
    int userid;
    if (userId == 0)
    throw new ArgumentNullException("userId");
    return _db.Users.Where(u => u.UserId == userId).FirstOrDefaultAsync();
    User.cs
    public class User : IUser<int>
    public User()
    UserLogins = new List<UserLogin>();
    public int UserId { get; set; }
    public string UserName { get; set; }
    public string PasswordHash { get; set; }
    public string SecurityStamp { get; set; }
    public string Email {get; set; }
    public bool IsEmailConfirmed { get; set; }
    int IUser<int>.Id
    get { return UserId; }
    public ICollection<UserLogin> UserLogins { get; private set; }
    public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<User, int> manager)
    // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
    var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
    // Add custom user claims here
    return userIdentity;
    Startup.Auth.cs
    public partial class Startup
    // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
    public void ConfigureAuth(IAppBuilder app)
    // Configure the db context and user manager to use a single instance per request
    app.CreatePerOwinContext(NFCMSDbContext.Create);
    app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
    // Enable the application to use a cookie to store information for the signed in user
    // and to use a cookie to temporarily store information about a user logging in with a third party login provider
    // Configure the sign in cookie
    app.UseCookieAuthentication(new CookieAuthenticationOptions
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/Account/Login"),
    Provider = new CookieAuthenticationProvider
    OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, User, int>(
    validateInterval: TimeSpan.FromMinutes(20),
    regenerateIdentityCallback: (manager, user) => user.GenerateUserIdentityAsync(manager),
    getUserIdCallback: (id) => (Int32.Parse(id.GetUserId())))
    // Use a cookie to temporarily store information about a user logging in with a third party login provider
    app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); (...)
    Any help or ideas are greatly appreciated!
    Kind regards,
    Nils

    Hi,
    According to your description, I am afraid your problem is out of support in C# forum. For ASP.NET question, please go to
    ASP.NET Forum to post your thread.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and
    makes it easier for other visitors to find the resolution later.

  • Error 1137: Incorrection number of arguments. Expected no more than 1

    Hello from a beginner!
    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.  Any help would be appreciated.  Thanks in advance.
    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);

    Thanks - I have been googling and playing with the code and inserted "_self" (below) and it worked.  What is the difference between "_parent" and "_self" ?
    Thanks for taking the time to help!
    function goHome(event:MouseEvent):void {
    var targetURL:URLRequest = new
    URLRequest("http://www.fairwoodcommunitynews.com/Alphatest/Home.html");
    navigateToURL (targetURL, "_self");
    homeBtn.addEventListener(MouseEvent.CLICK, goHome);

  • Incorrect number of arguments error

    Seems like a simple task, and 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. I made bold the line with the error.
    var loader:Loader;
    var i:Number = 1;
    var container:Sprite;
    function imgLoad(e:MouseEvent):void {
         i++;
         if (i == 3) {
              i = 0;
         loader = new Loader();
         loader.load(new URLRequest("resized Images/Bracelet" + String(i) + ".jpg"));
         preload_mc.visible = true;
         loader.contentLoaderInfo.addEventListener(Event.INIT,imgComplete,false,0,true);
         loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,imgProgress,false,0,true );
    function imgProgress(e:ProgressEvent):void {
         var loaded:Number = e.bytesLoaded;
         var total:Number = e.bytesTotal;
         var pct:Number = loaded/total;
         preload_mc.loader_mc.scaleX = pct;
    function imgComplete(e:Event):void {
         container = new Sprite();
         addChild(container);
         var myLoader:Loader = new Loader(e.target.loader);
         container.addChild(myLoader);
         smallImg_mc.visible = false;
         fullMode_txt.visible = false;

    Loader constructor doesn't accept any arguments:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html#Loader

  • 1136: Wrong Number of Arguments

    Hi,
    I'm a flash beginner and I wanted to do a "Space Invaders" like game. Now I get an error, wehn I try to call a function in an other function.is that not allowed? I want that the Bullet shoots directly when I click. but when I hold the left mouse button pressed, the mode should be auto shoot and bullets should shoot out with a timer of 100. I got sucsess by writing both in the start shoot timer, like this:
    public function startShootTimer (e:MouseEvent):void {
                ShootTimer.start();
                var bullet:Bullet = new Bullet();
                bullet.x = bazooka.x + 70;
                bullet.y = bazooka.y - 3;
                addChild(bullet);
                Bullets.push(bullet);
    But it would be better (for future projects) to have 2 functions, or not ? Is that possible ? Very thank you for your help ! Here's my full not working program:
    package  {
        import flash.display.*;
        import flash.events.Event;
        import flash.utils.Timer;
        import flash.events.MouseEvent;
        import flash.events.TimerEvent;
        public class Main extends MovieClip {
            var bazooka:Bazooka = new Bazooka();
            var Bullets:Array = new Array();
            var ShootTimer:Timer = new Timer(500);
            public function Main() {
                startGame();
            public function startGame() {
                addPlayer();
                stage.addEventListener(Event.ENTER_FRAME, mainLoop);
                ShootTimer.addEventListener(TimerEvent.TIMER, autoShootBullet);
                stage.addEventListener(MouseEvent.MOUSE_DOWN, startShootTimer);
                stage.addEventListener(MouseEvent.MOUSE_DOWN, shootBullet);
                stage.addEventListener(MouseEvent.MOUSE_UP, stopShootTimer);
            public function addPlayer():void {
                bazooka.x = 0;
                bazooka.y = stage.stageHeight * .5;
                addChild(bazooka);
            public function shootBullet(e:MouseEvent):void {
                var bullet:Bullet = new Bullet();
                bullet.x = bazooka.x + 70;
                bullet.y = bazooka.y - 3;
                addChild(bullet);
                Bullets.push(bullet);
            public function startShootTimer (e:MouseEvent):void {
                ShootTimer.start();
            public function stopShootTimer (e:MouseEvent):void {
                ShootTimer.stop();
            public function autoShootBullet (e:TimerEvent):void {
                shootBullet();      // Heres my error
            public function mainLoop (e:Event):void {
                for (var b:int = 0; b < Bullets.length; b++) {
                    Bullets[b].x += 20;

    that's allowed.
    but your shootBullet function expects a mouse event to be passed as a parameter.  there are two quick and easy ways to resolve:
    1.  use shootBullet(null)
    2.  change your shootBullet function to:
      public function shootBullet(e:MouseEvent=null):void {
                var bullet:Bullet = new Bullet();
                bullet.x = bazooka.x + 70;
                bullet.y = bazooka.y - 3;
                addChild(bullet);
                Bullets.push(bullet);

  • Grey screen and "incorrect number of thread records"

    I think I am in trouble. My eMac will not boot and gets stuck on the great screen with the Apple logo and the spinning windmill. I have followed the instructions in the Apple help article up to but not including "archive and install". I tried the advanced secure boot and the messages I got over and over were "HFSSWAPHFSPlusBTIternalmode: catalog record #30 keylength=34 expected=144 node=15278 File ID=4 volume= Macintosh HD device=/dev/disk 0s 10"
    And
    "Jan31 12:00:35 Launched: /System /Library/CoreServices/Loginwindow.app/Contents/MacOS/Loginwindow Port/dev/console exited abnormally: Trace/ BPT trap"
    And
    Jan31 12:02:13 Launched: Getty repeating too quickly on port/ dev/ console, sleeping"
    I rest the PRAM and NVRAm as instructed.
    I booted from the OSX 10.4 install disk and ran the verify disk and repair disk sequences several times. It did repair a number of things but it kept coming back to "
    Message was edited by: Mont Rigaud Stud
    Itkept coming back to "incorrect number of thread records". Even after running repair disk again several times it came back to the same thing and said
    "the volume Macintosh HD could not br repaired after 3 attempts
    ERROR: the underlying task reported failure On exit
    1HFS volume checked
    1 vOlume could not be repaired because of an error
    Repair attempted on 1 volume
    1 volume could not be repaired"
    What should I do? I am NOT BACKED UP! How do I back up now? Can I usean external Hard drive? I really do not want to lose my photOs, email and business files.
    I am typing my question on my iPhone, so that accounts for the poor capitalization.
    Thanks
    Doug

    Will it boot in Safe Mode? See
    What is Safe Boot, Safe Mode? (Mac OS X)
    http://docs.info.apple.com/article.html?artnum=107392
    Takes a while to run, but it usually "fixes" problems.
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck
    http://docs.info.apple.com/article.html?artnum=106214
     Cheers, Tom

  • Variable number of arguments in C functions

    Hello. I know how to achieve creating a function that accepts a variable number of arguments. For example:
    #include <stdio.h>
    #include <stdarg.h>
    int add (int x, ...);
    int main (int argc, const char * argv[])
    int result = add(3, 5, 3, 7);
    printf("%d", result);
    return 0;
    int add (int x, ...)
    va_list argList;
    va_start(argList, x);
    int sum = 0;
    int i;
    for (i = 0; i < x; ++i)
    sum += va_arg(argList, int);
    va_end(argList);
    return sum;
    The first argument, x, is sent to the function and represents how many additional optional arguments will be sent to the function (3 in the above example). Then, the definition of the add function totals those remaining (3) arguments, returning a value of (in this case) 15, which main then prints to the console. Simple enough, but here's my question:
    What if I want to achieve this same optional arguments concept without having to send the function the number of optional arguments it will be accepting. For example, the printf() function takes an optional number of arguments, and nowhere there do you have to specify an extra argument that represents the number of additional optional arguments being passed (unless maybe the number of formatting specifiers in the first argument determines this number). Can this be done? Does anyone have any input here? Thanks in advance.

    Hi Tron -
    I looked over my first response again, and it needs to be corrected. Fortunately Bob and Hansz straightened everything out nicely, but I still need to fix my post:
    RayNewbie wrote:
    Yes, the macros are designed to walk a list of args when neither the number of args or their type is known.
    The above should have said. "The macros are designed to walk a list of args when neither the number of args or their type is known _at compile time_".
    If I may both paraphrase and focus your original question, I think you wanted to know if there was any way the function could run without knowing the number of args to expect. The answer to this question is "No". In fact at runtime, the function must know both the number of args and the type of each.
    Tron55555 wrote:
    ... the printf() function takes an optional number of arguments, and nowhere there do you have to specify an extra argument that represents the number of additional optional arguments being passed (unless maybe the number of formatting specifiers in the first argument determines this number).
    As both Bob and Hansz have explained, the underlined statement is correct. Similarly, the example from the manual gives the number and types of the args in the first string arg.
    Hansz also included an alternative to an explicit count or format string, which is to terminate the arg list with some pre-specified value (this is sometimes called a "sentinel" value. However when using a sentinel, the called function must know the data types. For example, you could never simply terminate the args with a sentinel and then pass a double followed by an int. The combined length of these args is 8 + 4 => 12 bytes, so unless the function knew which type was first at compile time, it wouldn't be possible to determine whether the list was 4+8 or 8+4 at runtime.
    If you're interested in knowing why a variable arg function is limited in this way, or in fact how any C function finds its args, its parameters, and how to return to the calling function, you might want to do some reading about the "stack frame". You can learn the concept without getting into any assembler code. Here's an article that might be good to start with: [http://en.citizendium.org/wiki/Stack_frame].
    After you have some familiarity with the stack frame, take a look at the expansions of the stdarg macros and see if you can figure out how they work, especially how va_arg walks down the stack, and what info is required for a successful trip. Actually, I don't think you can find these expansions in the stdarg.h file for Darwin; it looks like the #defines point to built-in implementations, so here are some typical, but simplified defs:
    // these macros aren't usable; necessary type casts have been removed for clarity
    typedef va_list char*;
    #define va_start(ap,arg1) ap = &arg1 + sizeof(arg1)
    #define va_arg(ap,type) *(ap += sizeof(type))
    #define va_end(ap) 0
    Note that I"m trusting you not to start asking questions about the stack or the above macros until you've studied how a stack works and how the C stack frame works in particular.
    - Ray

  • Error: An insufficient number of arguments were supplied for function

    Hi ,
    I changed the data source for a data set on my report . The data source  is still pointing to same server and database but I am getting this error 
    "An error occurred during local report processing
    Query execution failed for data set 'Data Set Name'
    An insufficient number of arguments were supplied for function "
    I checked the function number of arguments again and it was correct and even executed the function in the dataset query designer and it works fine.
    any ideas for the reason for this error ?

    Without seeing the query you use or function its hard to suggest.
    See if parameter passed from SSRS has expected values. Is there some multivalued parameters involved?
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Error when installing the OID9022 Patchset - test: argument expected

    Hi to everybody.
    Currently, i try to install the OID9022 patchset in infrastructure instance.
    So, i try to run patch.sh
    %./patch.sh
    SHUTDOWN ALL THE OID Processes
    SHUTDOWN THE LISTENER
    *** Important ***
    This patch should be installed on OID 9.0.2.1.0 only
    Do you want to continue (Y/N):y
    Is this a INFRASTRUCTURE Installation? (Y/N):y
    Installation of OID 9.0.2.2.0 PATCH in Progress...
    ./patch.sh: make: not found
    ./patch.sh: make: not found
    ***** Important ******
    Complete the following post-install steps
    Start the Listener
    Switch User (su) to root and execute /data2/oracle/infra/root.sh
    In order to do the schema upgrade, execute:
    oidpatchca.sh -connect <Connect String>
    -systempwd <SYSTEM Password> -odspwd <ODS Password>
    -sudn <Super-User DN> -supwd <Super-User Password>
    -dippwd <Password to register DIP server>
    OiD 9.0.2.2.0 Patch Installed
    The final message is "OiD 9.0.2.2.0 Patch Installed ", so i assume it is ok, so then i tried to run the root.sh as the instruction ask.
    but, when i try to run it, got this error...
    # cd /data2/oracle/infra
    # ./root.sh
    ./root.sh: test: argument expected
    # root.sh
    root.sh: not found
    # pwd
    /data2/oracle/infra
    # ./root.sh
    ./root.sh: test: argument expected
    Can anybody help?...Thanks...it urgent.
    Best Wishes,
    Rushdan Md Saad.

    Hi Rushdan
    I think your assumption about the patch being installed correctly is false. A make error is generally serious as it implies that something has not been recompiled and probably several files have not been copied into the correct locations.
    In my past experience this has been caused by incorrect environment variable settings ie you can't find the make utility or incorrect OS level patches have been applied.
    And my final comment is that this is the Portal Upgrade forum. You are more likely to get a definitive response on OID issues from the OID forum.
    Regards

  • When I restore my Mac with Time Machine and then want to partition my disk, Disk Utility always says incorrect number of extended attributes

    When I need to restore my Mac from a time machine backup and then partition my hard disk (the disk inside the computer not the time machine disk), Disk Utility always says "Incorrect Number of Extended Attributes". I then boot into Recovery HD and run disk repair. The result? "The volume Macintosh HD appears to be OK". So then I reboot into normal OS and try the partition again, still Incorrect number of extended attributes. I have even tried /sbin/fsck -fy in single-user mode but it still says the volume is ok. I have tried partition my disk in the recovery HD and it still fails.
    Can anyone please help me solve this problem?

    Try something stronger, such as DiskWarrior or TechTool Pro.
    iMac refurb (27-inch Mid 2011), OS X Mavericks (10.9.4), SL & ML, G4 450 MP w/Leopard, 9.2.2

  • Incorrect Number error message only started today ...

    Hi there
    Had my N900 since July and this is first time I have had major problem..
    Really weird...I text my wife everyday and have been doing so today as well..but within the last half hour, when I try to SMS her, I get an "Incorrect Number" error message
    I have tried deleteing the conversation and restrarting the phone but problem still there
    I can SMS other contacts
    I can still dial my wife's number
    But for some reason, the SMS for that number is now failing
    Any ideas??
    Thanks
    Solved!
    Go to Solution.

    Turns out three has disconnected phone by accident. So morale of the story is avoid the three network like the plague if you can! Their customer service well and truly sucks!

Maybe you are looking for

  • IPod Nano LCD screen cracking/scratching

    i am a possible, going to be nano buyer and i was wondering if anyone who is a owner has had problems with the screen cracking and/or scratching. Also this is a question for owners with the problem and APPLE if the screen gets cracked or overally scr

  • Problems with JDBC Connection, invalid Oracle-URL

    H, i can't use a JBDC Connection. Maybee i tried a wrong oracle url syntac This Url jdbc:oracle:thin@bilent:1521:bilent throws an error java.sql.SQLException: invalid Oracle-URL The following parameter worked Driver :thin hostname:bilent JDBC Port:15

  • I am trying to connect my E1000 to my Directv DVR

    I am trying to connect my E1000 to my Directv DVR and it isnt working. I have internet but can not get it to connect to the

  • Need a list with pricing conditions for each customer

    Hi experts, I am searching for a function module or BAPI which reads out all the pricing conditions for a certain customer. The FM/ BAPI should provide the pricing conditions in an internal table. Now I do this with BAPI_SALESORDER_SIMULATE. It retur

  • Which QuickDock model is compatible with tx1410us notebook?

    Unfortunately the original product web page that listed the right docking station for this notebook is no longer up, so I wonder if anybody here can give me the right answer.  This Pavilion notebook has the Expansion Port 3 but I found at least two Q