Copy link to clipboard
Copied
Hi. I am really new to flash. I have created a simple container app whose purpose is to:
1) play an embedded flv by clicking a button onscreen
2) activate an external interface call (this records the fact that the person has watched the video)
That's it.
I have it working partially. I have a button on scene 1 with the "click and go to next scene" code snippet attached to it. I click it and it happily moves on to scene 2 where the flv video plays beautifully. The problem happens when I try to insert the code that the external developer told me to use to make the connection between my flash file and IT's back end work.
Here is the recommended code:
ExternalInterface.call("recordScore()”);
Unfortunately, as soon as I enter this code, there is a syntax error and the movie no longer plays. I added the code on a frame at the end of the movie.
I am no sure that the syntax the developer sent was correct, nor do I know where to insert this code into the proper place.
Any feedback would be helpful.
Regards,
Jarrett
ExternalInterface.call
(
"recordScore()"
);
This one worked. I'm not sure why...but the person that was here before me left it buried in a folder of notes. Hopefully it connects with the database.
Copy link to clipboard
Copied
above that call, use:
import flash.external.ExternalInterface;
Copy link to clipboard
Copied
import flash.external.ExternalInterface;
ExternalInterface.call("recordScore()”);
is now what i have, but it breaks the playback still.
Copy link to clipboard
Copied
it gives me a syntax error:1095 a string literal must be terminated before the line break
Copy link to clipboard
Copied
you have some errant code in your file, or it could be that you copied some weird mac quotes. replace both those quotes and retest.
if there's still a problem,
click file>publish settings>swf>tick 'permit debugging'.
retest and double click the error message to find the problem.
Copy link to clipboard
Copied
ExternalInterface.call
(
"recordScore()"
);
This one worked. I'm not sure why...but the person that was here before me left it buried in a folder of notes. Hopefully it connects with the database.
Copy link to clipboard
Copied
because you fixed one of those quotes.
Copy link to clipboard
Copied
oh i see...it was the smart quotes that did it? I didn't even notice that until you mentioned it! That's a huge help for the future.
Copy link to clipboard
Copied
you're welcome.
(p.s when using the adobe forums, please mark helpful/correct responses, if there are any.)
Find more inspiration, events, and resources on the new Adobe Community
Explore Now