Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Error #1034: Type Coercion failed ?

Guest
Jan 25, 2012 Jan 25, 2012

Hi there,

I'm using Action Script 3 and CS4

I'm trying to create a product and when i play it I get this error:

TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::MovieClip@16ed7e1 to flash.display.SimpleButton.

at flash.display::MovieClip/gotoAndPlay()
at Homepage_fla::MainTimeline/after()[Homepage_fla.MainTimeline::frame88:5]

The coding for the scene is:


stop();

function Goto (event:MouseEvent): void {
gotoAndPlay (1,"The Course");
}
function GoBack(event:MouseEvent): void {
gotoAndPlay (1,"Aperture");
}
function Home(event:MouseEvent): void {
gotoAndPlay (1,"Homepage");
}

btn_bac.addEventListener(MouseEvent.CLICK, GoBack);

btn_thecourse.addEventListener(MouseEvent.CLICK, Goto);

btn_homepagee.addEventListener(MouseEvent.CLICK, Home);

TOPICS
ActionScript
2.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Jan 25, 2012 Jan 25, 2012

The error doesn't really make sense and I am no expert on timeline coding, I never use it.

Having goToAndPlay(1, "The Cource"); on the main timeline is telling the the playhead to go to frame 1 in the scene called "The Cource"

Do you have separate scene for all these pages, and do you have a separate scene called "The Cource"? Is this a spelling mistake and should be "The Course"?

The thing I don't understand is why its thinking the main timeline is a SimpleButton.

Translate
Advocate ,
Jan 25, 2012 Jan 25, 2012

this is the code from frame 88 on the main timeline?

which line is line 5?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 25, 2012 Jan 25, 2012

gotoAndPlay (1,"The Course");

I think sorry not very good at Flash, don't know what i'm doing!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 25, 2012 Jan 25, 2012

The error doesn't really make sense and I am no expert on timeline coding, I never use it.

Having goToAndPlay(1, "The Cource"); on the main timeline is telling the the playhead to go to frame 1 in the scene called "The Cource"

Do you have separate scene for all these pages, and do you have a separate scene called "The Cource"? Is this a spelling mistake and should be "The Course"?

The thing I don't understand is why its thinking the main timeline is a SimpleButton.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 25, 2012 Jan 25, 2012
LATEST

Spelling mistake thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines