Topic: Flash lite SEND sms VIA python without EDITOR !

As I'm new to python scripts and integration between flash lite and PyS60, I'd apprciate if someone can upload a simple sms application that uses flash lite 1.1 to send sms via PyS60. so that the Device won't show the SMS Editor please !
Can we achieve this integration in swf2go ?

Re: Flash lite SEND sms VIA python without EDITOR !

Hello Talal,

Sending a SMS from PyS60 is quite simple. You only need two lines of code.

# messaging library
import messaging

# send SMS
messaging.sms_send(u'+112312345678', u'Hi, this is testing SMS from PyS60')

This is it!

There's a fully working PyS60 application on SWF2Go wiki. Get it here

The application is made to let you extend / customize it with your needs. The basic HTTP communication framework is already setup in the application, you just need to add your SMS sending logic into it.

BTW, you can develop and test your Flash Lite + PyS60 application without SWF2Go. Just use the PyS60 Shell to run .py script manually. Once the application is ready for distribution, you can package everything in one SIS using SWF2Go, ready to distribute!

Do let me know if you need any additional help with it.

// chall3ng3r //

Re: Flash lite SEND sms VIA python without EDITOR !

thank you, but I'm aware of this simple Pys60 script. and I downloaded the mylips example long time ago, but I still need a simple flash lite + py sample to know how I can pass variables to and from flashlite and python s60! so that flash can tell python to send sms !
would appreciate your help.

Re: Flash lite SEND sms VIA python without EDITOR !

Hello Talal,

Sure, no big deal. As I described before, the basic HTTP communication framework is already in place. You can just make a copy of from the "Be My Lips" application, and add the following code.

# top of the
import messaging

# scroll to the bottom of the file and replace code after "# Make changes below" to following:

# ======================
# Make changes below
# ======================
def get_policy():
    print ">> sending: crossdomain.xml"
    return '<?xml version="1.0"?><cross-domain-policy><allow-access-from domain="*" to-ports="*" /></cross-domain-policy>'

def close_server(self):

def send_sms(attributes):
    print ">> SMS: " + attributes["msg"]
    messaging.sms_send(attributes["phone"], attributes["msg"])

server = MyServer('',2190)
server.addCallBack("crossdomain.xml", get_policy)
server.addCallBack("close_server", close_server)
server.addCallBack("send_sms", send_sms)


Now, in your Flash Lite application, you can call this function via loadVariables call, something like:

loadVariables("http://localhost:2190/send_sms?phone=00112312345678&msg=This+is+testing+message", "GET");

Notice that current version of HTTP framework only supports HTTP GET requests. So, you have to pass the data in URL. I am working on an update which also supports POST. I will post it on wiki soon.

I hope this helps,

// chall3ng3r //

Re: Flash lite SEND sms VIA python without EDITOR !

Thank you so much for this satisfying clarification! really wonderful.
I emailed the sales ppl there to upgrade to the new 2.0 version of swf2go; and they requested from me to wait for one more day as they are uploading another enhanced new version!
what features will the newest version include and this is the 3rd day I'm waiting for their response to upgrade to the newest version and still no news yet ! I need to upgrade to take advantage of this python and net60 integration with flash lite; however it seems it will take you some more time to upload the new version.

and I still have some questions concerning the newest upcoming swf2go version:
1> will the new version support s60 5th Edition and N97 SDK?
2> will it also support s40 series (so that it can compile it as .jar rather than .sis it would be really additional advantage)?
3> What features will it include?
4> when will it be available?

Thank you again for your sufficient helpful information regarding flash lite sms via python

Last edited by talalmanaa (29-03-2010 08:17:04)

Re: Flash lite SEND sms VIA python without EDITOR !

Hello Talal,

You are most welcome.

You should have received an email by now smile

Regarding your questions,

1) Yes, SWF2Go 2.5 supports Symbian S60 5th Edition. Since v2.0 SWF2Go does not require any SDK to be installed. It's completely a standalone product.

2) No, on Nokia S40 devices, resources are limited. SWF2Go is geared towards smartphones which offer better memory and extensibility.

3) Visit the following link

4) Registered users have already been notified. Public announcement will follow soon.

Best regards,

// chall3ng3r //