Forum Topic: help with as3

(240 views • 8 replies)

This topic is 1 page long.

<< < > >>
None

sweetshinmusic

Reply To Post Reply & Quote

Posted at: 8/2/08 07:10 PM

sweetshinmusic LIGHT LEVEL 09

Sign-Up: 07/18/08

Posts: 294

stop();

{
play_btn.addEventListener(MouseEvent.CLI CK, gotoAndPlay (2));
}

this is my as3 for a play button on a short film but everytime i click test movie this comes up:

1067: Implicit coercion of a value of type void to an unrelated type Function.

there are no syntax errors because it says no script errors

help?


None

sweetshinmusic

Reply To Post Reply & Quote

Posted at: 8/2/08 07:21 PM

sweetshinmusic LIGHT LEVEL 09

Sign-Up: 07/18/08

Posts: 294

please....anybody


None

sweetshinmusic

Reply To Post Reply & Quote

Posted at: 8/2/08 07:32 PM

sweetshinmusic LIGHT LEVEL 09

Sign-Up: 07/18/08

Posts: 294


None

sweetshinmusic

Reply To Post Reply & Quote

Posted at: 8/2/08 07:40 PM

sweetshinmusic LIGHT LEVEL 09

Sign-Up: 07/18/08

Posts: 294


None

Vengeance

Reply To Post Reply & Quote

Posted at: 8/2/08 08:05 PM

Vengeance EVIL LEVEL 28

Sign-Up: 03/18/05

Posts: 5,033

STOP WAITING 10 FUCKING MINUTES BETWEEN BUMPS YOU MORON.

stop();
play_btn.addEventListener(MouseEvent.CLICK, playFunc);
function playFunc(e:Event){
	gotoAndPlay(2);
}

Not even going to bother to explain it. You're not patient enough to wait for help, so you'll never be patient enough to learn anything more advanced than that.

========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========

BBS Signature

None

Xeptic

Reply To Post Reply & Quote

Posted at: 8/2/08 08:07 PM

Xeptic LIGHT LEVEL 30

Sign-Up: 05/12/05

Posts: 2,188

Don't bump your topic every ten minutes, this isn't MSN, have a little patience. The problem here is the gotoandstop function.

BBS Signature

None

sweetshinmusic

Reply To Post Reply & Quote

Posted at: 8/2/08 08:08 PM

sweetshinmusic LIGHT LEVEL 09

Sign-Up: 07/18/08

Posts: 294

uh...thanks

sorry about the impatient part it's just that i have been stuck for days on this (im only 14 & beginner)


None

Amorpheous

Reply To Post Reply & Quote

Posted at: 8/2/08 10:35 PM

Amorpheous DARK LEVEL 07

Sign-Up: 07/21/08

Posts: 16

At 8/2/08 08:05 PM, Vengeance wrote: STOP WAITING 10 FUCKING MINUTES BETWEEN BUMPS YOU MORON.

stop();
play_btn.addEventListener(MouseEvent.CLI CK, playFunc);
function playFunc(e:Event){
gotoAndPlay(2);
}

Not even going to bother to explain it. You're not patient enough to wait for help, so you'll never be patient enough to learn anything more advanced than that.

To explain, the addEventListener function takes 2 parameters, the first being what type of event, and the secont what function to call.

A few things to know, when passing a function as a parameter, simply pass the function name without parenthesis at the end, and also the function being called needs to receive a single parameter of the event type, as that is the entire reason the function is called. This received event contains information about how it was triggered.

You can read more in various tutorials around the internet, or in the official livedocs.

Dreams, we have them that we may live, for without them we may fade away


None

K-Guare

Reply To Post Reply & Quote

Posted at: 8/2/08 11:33 PM

K-Guare FAB LEVEL 17

Sign-Up: 05/23/08

Posts: 2,429

For more information, check out AS3: Events.

I give at least 5 AS links a day, sheesh.

dr. seuss
"unless someone like you cares a whole awful lot, nothing is going to get better. it's not."

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 01:43 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!