Loading external assets from Server

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

flash2070
Posts: 16
Joined: 28 Sep 2010, 19:42

Loading external assets from Server

Postby flash2070 » 28 Dec 2010, 17:05

Hello,
I'm creating an MMO Game using SmartFox Server + MySQL + memcached
in the game world there is planty of objects and clothes for the characters.
ofcourse all those objects should be on the server, and the client load them dynamically (the assets = swf files) with URLLoader class

there is no doubt about the above-mentioned thought, but my question is about the implementation. I guess it should be an HTTP server (Apache/Jetty etc..)
and the clients gets a list of URLs. is it right?
what security issues should I pay attention to? for example, I don't want that everyone will have the ability to download my assets and steal my graphics.

I will appricate your help
thanks alot (and in advanced)

flash2070
Democre
Posts: 77
Joined: 16 Sep 2010, 17:58

Postby Democre » 28 Dec 2010, 17:34

In the SFSObject/SFSArray docs there is a section called Byte Arrays, which mentions briefly that these could be used for external swf files.

Hope this helps...
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 28 Dec 2010, 17:38

Well, this is a little bit complicated. It is very difficult, if not impossible, to fully protect your art data.

The problem is that anyone with a bit of experience can use the advanced features of moder browsers and see exactly each and every file being downloaded. This means that all your gif/jpg/png/swf requests can be sniffed.

With SFS2X you could hide some of the most important assets in the socket data. This way the browser won't know and it will be very difficult to find, but if you have Megabytes of data I wouldn't recommend that.

What you need to do is put the binary data of an image or SWF file in an SFSObject (as byte array) and send it to the client. On the client you can use a Loader object to transform the bytes back into a readable Flash asset. ( loadBytes() is the name of the method? I am going by memory... )
Lapo
--
gotoAndPlay()
...addicted to flash games
flash2070
Posts: 16
Joined: 28 Sep 2010, 19:42

Postby flash2070 » 28 Dec 2010, 19:34

cool. thank you Lapo for the great answer ! :wink: :wink:

Lapo wrote:Well, this is a little bit complicated. It is very difficult, if not impossible, to fully protect your art data.

The problem is that anyone with a bit of experience can use the advanced features of moder browsers and see exactly each and every file being downloaded. This means that all your gif/jpg/png/swf requests can be sniffed.

With SFS2X you could hide some of the most important assets in the socket data. This way the browser won't know and it will be very difficult to find, but if you have Megabytes of data I wouldn't recommend that.

What you need to do is put the binary data of an image or SWF file in an SFSObject (as byte array) and send it to the client. On the client you can use a Loader object to transform the bytes back into a readable Flash asset. ( loadBytes() is the name of the method? I am going by memory... )

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 41 guests