Copy link to clipboard
Copied
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);
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.
Copy link to clipboard
Copied
this is the code from frame 88 on the main timeline?
which line is line 5?
Copy link to clipboard
Copied
gotoAndPlay (1,"The Course");
I think sorry not very good at Flash, don't know what i'm doing!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Spelling mistake thanks!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now