Compile error 1061 displays when attempting to play timeline animation

  • Thread starter Thread starter fredlexus
  • Start date Start date
  • Tags Tags
    Animation Error
AI Thread Summary
The discussion revolves around a coding error encountered in Flash AS 3.0 while trying to implement a timeline animation triggered by a button click. The specific error, "1061: Call to a possibly undefined method play through a reference with static type Function," indicates that the method being called may not be properly defined or accessible in the current context. To resolve this, it is suggested that the function `spinbul_pt_1` should be defined as a proper function that returns an instance of a MovieClip or similar object that has a `play()` method. The code snippet provided shows an event listener for a button click that calls the `bullet` function, which in turn attempts to call `spinbul_pt_1.play()`. The solution requires ensuring that `spinbul_pt_1` is correctly instantiated and that the method being called is valid within its scope.
fredlexus
Messages
3
Reaction score
0
Hi,

Scenario: Click on button and timeline animation plays (the animation is a panel that rotates from the back to the front)

Flash AS - 3.0
CS5

Error:
Scene 1, Layer 'actions', Frame 1, Line 11
1061: Call to a possibly undefined method play through a reference with static type Function.

What does this error mean and what code needs to be added to fix it?

Any help will be appreciated.


Code:
[FONT="Verdana"][SIZE="1"]
import flash.events.MouseEvent;

bullet_btn.addEventListener(MouseEvent.CLICK, bullet);
function bullet(event:MouseEvent) :void
{
	spinbul_pt_1.play();
}

function spinbul_pt_1(){
	bul_pt_1_MC.play();
}
 
Technology news on Phys.org
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
2
Views
2K
Replies
6
Views
6K
Back
Top