flash - Actionscript ExternalInterface syntax error -
i have created simple container app purpose to:
play embedded flv clicking button onscreen
activate external interface call (this records fact person has watched video)
that's it.
i have working partially. have button on scene 1 "click , go next scene" code snippet attached it. click , happily moves on scene 2 flv video plays beautifully. problem happens when try insert code external developer told me use make connection between flash file , it's end work.
here recommended code:
externalinterface.call("recordscore()”);
unfortunately, enter code, there syntax error , movie no longer plays. added code on frame @ end of movie.
i no sure syntax developer sent correct, nor know insert code proper place.
it looks there closed double quotes (”) in pasted:
externalinterface.call("recordscore()”);
assure quotation marks, , not need ()
on javascript function you're calling:
externalinterface.call("recordscore");
when running flash projector (as in ctrl+enter), can test whether external interface available; otherwise, exception thrown @ runtime:
if (externalinterface.available) { externalinterface.call("recordscore"); }
Comments
Post a Comment