[WiiFlash] Argument Count Mismatch on WiFlash API
Merrill, Jason
jason.merrill at bankofamerica.com
Wed Nov 14 08:58:09 PST 2007
So now that I seem to have WiiFlash server detecting the remote (thanks
again for your ideas), I am now trying to run my first Hello World
WiiFlash script, and I am seeing an error. The error seems to be that
the WiiFlash server is getting an extra argument that the Wiimote.as
class is dispatching. Here is my AS3 code I wrote in Flexbuilder 2 and
the error:
============================================
import mx.events.*
import org.wiiflash.*;
private var _wiimote:Wiimote;
private function loadWii():void
{
trace("loadWii run")//traces fine - (triggered from Flex
applicationComplete event)
_wiimote = new Wiimote();
_wiimote.addEventListener(Event.CONNECT,
onWiimoteConnect);
_wiimote.connect();
}
private function onWiimoteConnect():void
{
trace("_wiimote.connected: "+_wiimote.connected)//does
not trace
}
============================================
The error the Flex2 compiler gives me is:
ArgumentError: Error #1063: Argument count mismatch on
WiiFlash2/onWiimoteConnect(). Expected 0, got 1.
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.wiiflash::Wiimote/onConnect()[C:\Documents and
Settings\My Unencrypted
Documents\wiiFlash\sourcecode\WiiFlash2\org\wiiflash\Wiimote.as:791]
============================================
Lines 789 through 792 in Wiimote.as are:
private function onConnect( event: Event ): void
{
eventDispatcher.dispatchEvent( event );
}
============================================
Any ideas? I got the latest Wiiflash server from the http link at the
WiiFlash Web site, as well as the AS3 libraries. It seems perhaps I am
guessing they are incompatible since the WiiFlash server is not looking
for an argument but the Wiimote class is dispatching one? I can't get
the latest APIs and server using SVN because my IE is corporate flavor
and semi-locked down and won't support apps like Tortoise SVN, so I had
to download it from wiiflash_api.zip at Googlecode instead.
Can someone send me the latest WiiFlash server and API class files from
the SVN site? Thanks!
Jason Merrill
Bank of America - GT&O L&LD
eTools/Multimedia Research & Development
More information about the WiiFlash
mailing list