Topic: exiting flashplayer


I'm trying to build a small flash-application for my chumby classic using Actionscript and Flashdevelop. I want to call my movie within a little shell script using

chumbyflashplayer.x -i mymovie.swf

When a button is pressed in the movie, I want to exit the flashplayer and continue the shell script, but I don't know how to exit the player. I tried the method "unloadMovie()", which stops my movie, but the flashplayer keeps running. Can anyone give me a hint?

In best case, I would like to return a value to the calling script to tell it which button is pressed.

thanks in advance!

Re: exiting flashplayer

In your Flash movie, add the code:


... and add the switch "-Q" to the command:

chumbyflashplayer.x -i mymovie.swf -Q

Re: exiting flashplayer

Thanks Duane, that works perfect! Any chance to pass a return value from the movie to the script?

Re: exiting flashplayer

Um, not directly.  The exit code comes from the Flash Player, not the movie, so it should pretty much always be 0 unless the player was terminated abnormally.

However, you can write to a file in /tmp using one of the ChumbyNative extensions and check that from your script.

Note that all of these things work only from a standalone movie, not a widget.

Re: exiting flashplayer

ok - writing to /tmp was my "plan B" smile

Thanks again for your fast and helpful answers!