What is a static type MovieClip?

Hello AS3 programmers,.

I'm a newbie muddle my way through the AS3.  I have a MC, balance, which includes a small animation on the timeline.  The BalanceMC.as class contains a function, MoveBalance, to determine which framework the playhead is.  I get a compilation error when I try to get the currentFrame.  This is the error: 1195: any attempted access of inaccessible method via a static reference currentFrame type balance.

package {}
import flash.display. *;
import flash.text. *;

SerializableAttribute public class extends MovieClip {} balance
public var thisFrame:int;

public void BalanceMC() {}
trace ("balance");
this.gotoAndStop (1);
State = 0;
}

public void MoveBalance(x:int):void {}
thisFrame = this.currentFrame ();     //The error occurs in this line
trace ("MoveBalance, frame =" + thisFrame);
}
}
}

What is a static type movieclip so how do I determine the number of the frame where the playhead is?  Your help will be greatly appreciated.

this.currentFrame (); should be

this.currentFrame;

currentFrame is a property, is not a method.

http://livedocs.Adobe.com/Flash/9.0/ActionScriptLangRefV3/Flash/display/MovieClip.html#cur rentFrame

Tags: Adobe Animate

Similar Questions

  • Access to the number of property may not set through a reference with static type...

    Hi all!

    I encounter this problem today... Take a look at the code:

    import com.trick7.effects.TeraFire;

    for (var j: uint = 0; j < 10; j ++) {}

    var fire: TeraFire = new TeraFire();

    Fire.x = j * 40 + 20;

    Fire.y = 100;

    Fire.Number = j; This line is causeing the problem

    addChild (fire);

    fire.buttonMode = true;

    }

    Class TeraFire creates fire particles. Compiler error is:

    Scene 1, Layer 'layer 1', frame 1, line 7.1119: access of the number of property may not set through a reference with static type com.trick7.effects:TeraFire.

    Can someone help me find a solution to this problem.

    I can do this 'number' with a clip, but not in this case. What can I do?

    Sorry oops misspelling... I meant fire ['number'] = j;

    The class must also be dynamic for this work, i.e.:

    public dynamic class TeraFire extends MovieClip
    

    (a dynamic class extension is not the class dynamic sub...)

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.UK/

  • 1119: access of possibly property indefinite Timer through a reference with static type class

    Hello

    I am trying to create a timer event for delaying the instantiation of my clip on the stage, but I get the error message:

    1119: access of possibly property indefinite Timer through a reference with static type class

    I am confused with how to proceed. I thought that the timer was a term already in the library for AS3, so how can he be undefined? Any help that you could provide to help me understand the problem and how to fix it, would be great.

    Thank you

    Here's a look at my code:

    import flash.display.MovieClip;

    import flash.utils.Timer;

    import flash.events.Event;

    import flash.events.TimerEvent;

    var dripTimer:Timer = new Timer (3000)

    var blood1:MovieClip = new Blood();

    dripTimer.addEventListener (TimerEvent.Timer, bloodDrip)

    dripTimer.start ();

    function bloodDrip(e:TimerEvent):void {}

    trace ("blood flows");

    blood1.x = 300;

    blood1.y = 100;

    addChild (blood1);

    }

    AS3 is case sensitive.

    Thus, the code should be:

    dripTimer.addEventListener (TimerEvent.TIMER, bloodDrip) - upper

  • 1119: access of property may be undefined with currentFrameLabel through a reference with static type f

    1119: access of property may be undefined with currentFrameLabel through a reference with static type flash.display:DisplayObject.

    line with the error: if (holder.getChildAt (i).currentFrameLabel.search ("false")! = - 1) {}

    any help?

    Try:

    If (MovieClip (holder.getChildAt (i)).currentFrameLabel.search ("false")! = - 1)

  • addEventListener leads to 1119: access to property may be undefined "myEvent" through a reference with static type class

    I use a main application mxml and a component

    I said a metatag in the component

    [Event(name ="myEvent"type ="events.myEvent")]

    I have this hurry of the component

    I have a listener on the main application

    componentid.addEventListener (Event.MyEvent, gotoMyFunction, true);

    I get a compile error, no matter what I do

    1119: access of property may not set through a reference with static type class

    Any ideas. I had at least 3 examples and in all cases I end up with the same result

    Put [event (name = "myLoadDoneEvent" type = "events.loadDoneEvent")] before the class declaration:

    public class loadDoneEvent extends event

    [Event (name = "myLoadDoneEvent" type = "events.loadDoneEvent")]

    If this post answers your question or assistance, please mark it as such.

  • static type checking

    void demo(int a[][64])
    {
    }
    
    int main(void)
    {
        int b[20][128];
        demo(b);
        return 0;
    }
    

    Look at this simple source code, compiler of LabWindows/CVI just let pass without even a warning! From there, we can see is the weakness of the control of static type of LabWindows/CVI function. If there is no switch to open a stronger control mode, please tell me. However, since the speed of the compiler is already very slow, I think open function will be too slow.

    It depends on the version of the CVI and your build settings... With CVI2013f1 and level set to Common warning I get

    WARNING: incompatible pointer types from ' int [20] [128] "to the type parameter ' int (*) [64].

  • 1119: access of nativeWindow property possibly not defined through a reference with static type flash.display:Stage.

    I tried this code:

    http://help.Adobe.com/en_US/AS3/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7e08.html

    but it displays error: 1119: access of nativeWindow property possibly not defined through a reference with static type flash.display:Stage.

    package

    {

    import flash.display.Sprite;

    import flash.events.MouseEvent;

    import flash.text.TextField;

    SerializableAttribute public class MinimizeExample extends Sprite

    {

    public void MinimizeExample (): void

    {

    var minTextBtn:TextField = new TextField();

    minTextBtn.x = 10;

    minTextBtn.y = 10;

    minTextBtn.text = "minimize";

    minTextBtn.background = true;

    minTextBtn.border = true;

    minTextBtn.selectable = false;

    addChild (minTextBtn);

    minTextBtn.addEventListener (MouseEvent.CLICK, onMinimize);

    var maxTextBtn:TextField = new TextField();

    maxTextBtn.x = 120;

    maxTextBtn.y = 10;

    maxTextBtn.text = "zoom";

    maxTextBtn.background = true;

    maxTextBtn.border = true;

    maxTextBtn.selectable = false;

    addChild (maxTextBtn);

    maxTextBtn.addEventListener (MouseEvent.CLICK, onMaximize);

    var restoreTextBtn:TextField = new TextField();

    restoreTextBtn.x = 230;

    restoreTextBtn.y = 10;

    restoreTextBtn.text = "restore";

    restoreTextBtn.background = true;

    restoreTextBtn.border = true;

    restoreTextBtn.selectable = false;

    addChild (restoreTextBtn);

    restoreTextBtn.addEventListener (MouseEvent.CLICK, onRestore);

    var closeTextBtn:TextField = new TextField();

    closeTextBtn.x = 340;

    closeTextBtn.y = 10;

    closeTextBtn.text = 'close this window ';

    closeTextBtn.background = true;

    closeTextBtn.border = true;

    closeTextBtn.selectable = false;

    addChild (closeTextBtn);

    closeTextBtn.addEventListener (MouseEvent.CLICK, onCloseWindow);

    }

    function onMinimize(event:MouseEvent):void

    {

    this.stage.nativeWindow.minimize ();

    }

    function onMaximize(event:MouseEvent):void

    {

    this.stage.nativeWindow.maximize ();

    }

    function onRestore(event:MouseEvent):void

    {

    this.stage.nativeWindow.restore ();

    }

    function onCloseWindow(event:MouseEvent):void

    {

    this.stage.nativeWindow.close ();

    }

    }

    }

    You can not force-close a browser with the exception of a window with javascript window.

  • I get what looks like a type of lines of scanning through my photos printed in Photoshop. They have been taken with a cell phone camera.

    I get what looks like a type of lines of scanning through my photos printed in Photoshop. They have been taken with a cell phone camera.

    You might be low on ink.

  • When setting type in photoshop for printing purposes what setting should the type set to crisp or too strong?

    When setting type in photoshop for printing purposes what setting should the type set to crisp or too strong?

    Never, ever, rasterized text for printing purposes.

  • What the best data type for storing jpeg/gif images?

    Hello
    What the best data type for storing jpeg/gif images?
    Idon't want to use the blob data type
    Ordimage is the best?
    Thank you.

    VDH says:

    What the best data type for storing jpeg/gif images?
    Idon't want to use the blob data type
    Ordimage is the best?

    Don't be stupid.

    If you do not want to use BLOBs then, or you can use the ordimage.

    It uses ordsys.ordsource for the storage of the image data type. This is a user defined Type of data in advance and has a property called LocalData that stores the actual image. And what is its data type? BLOB OBJECT.

  • Peopleimages property possibly access not defined through a reference with static type class.

    Hello

    I have a custom MXML component called SeeElement.mxml, within this file I defined a VBOX as shown

    SeeElement.mxml

    < mx:VBox id = 'personimages' >
    < mx:Label id = "viewname" / >
    < / mx:VBox >

    Now inside another ActionScript file, I try to make visible to false, as shown:
    SeeElement. peopleimages.visible = false;

    I am thie error

    Peopleimages property possibly access not defined through a reference with static type class.

    Please help me solve this problem.

    Thank you.

    inside your "a few other sctionscript the file' you need a reference to the SeeElement object

    var seeElement:SeeElement = new SeeElement();

    Then you can seeElement.personImages.visible = false;

    SeeElement (with a capital S) refers to the class SeeElement and personImages is not a class member variable its an instance member variable

  • What is the oldest type of file PS that can be opened in CS5?

    I have a lot of work that has been created in PS 7.0. I want to get the latest version. What is the oldest type of file can be opened in CS5?

    You will have no problem with files created with PS7.

    I have files of the PS3 that still not open!

  • What are the different types of tools available for the siebel file cleaning

    Hi all

    Please let me know what are the different types of tools available for siebel file system cleaning.

    Thanks in advance
    Remy

    assuming that you have installed the Siebel server under d:\D:\dba81

    CD D:\sba81\siebsrvr\bin

    (1) mode considered
    sfscleanup.exe/u SIEBEL-USER /p /C SIEBEL-word of PAST SIEBEL-DATA-SOURCE /d SIEBEL-OWNER of the TABLE/f SIEBEL-LEADER-SYSTEM/m SIEBEL-FILE-SYSTEM-FOR-INCORRECT_FILES/r Y/x 'D:\sba81\siebsrvr\log\sfscleanup_report.log '.

    (2) actual performance
    Replace/r Y, N/r

    Best regards
    EvtLogLvl

  • property may be undefined by reference to static type flash.

    Hi guys, well I created a slide show. Only problem is that I keep getting error messages that say "property may not defined by reference to the static type flash.", or they say 'access of undefined property...'

    I've done a lot of research, and my situation does not change if I use Action Script 2 or 3. In the example of his three. I did the numeric keys that are supposed to make to cover the slide show. I would really appreciate any suggestions.
    You can see the slideshow here:

    http://Paragon-NJ.com/slideshow.html

    and the FLA:

    http://Paragon-NJ.com/slideshow.fla


    Currently I use this code with one, two and three being the butttons:

    {one.onRelease = function ()}
    gotoAndPlay (90);
    }

    {two.onRelease = function ()}
    gotoAndPlay (175);
    }

    {three.onRelease = function ()}
    gotoAndPlay (260);
    }

    If you publish a swf file with actionscript 2 with this code and nothing else, you generate no error messages.

  • Pavilion 15-ab121dx: 15 laptop HP Pavilion (15-ab121dx) w / AMD A10 8700 p - what are the speed/types/sizes of RAM supported?

    I bought a new laptop over the weekend (15-ab121dx - CPU AMD A - 10 p 8700, 6 GB of DDR3 RAM memory) and the sales associate could not tell me the max supported RAM.  I guess I could quickly find the info online, but was strangely wrong...  I searched HP and the Internet in general site but can't find what the maximum RAM allowed in this laptop.  I'm assuming that the laptop is so new, the information is just not there yet?    He came only installed with 6 GB or ram (SODIMM 1 is 4 GB and the 2nd SODIMM 2 GB) and I want to change to 16GB SODIMM (2x8GB) or 32 GB (2x16GB) SODIMM.   The problem is that I can't find the maximum supported memory, speed, memory type for my new machine.  One of the main reasons that I decided to go with this laptop is I read good things about the A10 AMD 8700 p and that it can work with RAM speeds up to 2133 mhz...  But before I buy the fast RAM, I want first of all to ensure that this speed of RAM will work in this laptop?  Please list the supported RAM types, size of RAM, RAM speeds for this laptop.   In addition, support DDR3L, DDR3, or both?    Thank you!

    Yes thank you, but the link you have sent (the model computer laptop 15-ab121dx on the HP site) was the first place I checked when I started searching for information on the laptop.    It not there no guide service or y at - it clues about the supported RAM configurations.   I knew that the price of the machine and the CPU is perhaps a little too good to be true.     ... Not extensible user is bad.  Looks like the laptop everything would need to be dismantled to even just replacing the hard drive and, to install or replace the motherboard of the laptop RAM must be removed!    I should have done more research.  But I guess even if I had, I wouldn't have found much (since having to place a post in a forum to know these basic things like access and type of RAM)...   I plan to return it.  Thanks for the quick responses to the post office - this was appreciated.

Maybe you are looking for