Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving movieclips from database for offline use

Status
Not open for further replies.

mikemardon

Programmer
May 23, 2005
71
GB
Hi There

I have created a .net web service which returns swf files in binary format when called from actionscript (2.0), is it possible to somehow stream the binary back to a movieclip in actionscript so I can save it and use loadmovie to add it to the stage?

The reason for doing it this way rather than just returning the URL is I need the swf files to be available offline if the movie is unable to connect to the internet.

I noticed there is a FileStream object in flash - could I maybe use this?

Thanks!
 
thanks but I need to use AS2 - if I create a new AIR application it changes to AS3 :(
 
hmm, well I did a hunt on google as your request was something that interested me and all I can find is Flex/Air solutions.

is this possible with AS2 and standard Flash?

if the FileStream object exists in normal flash, wouldn't the concept be the same just the syntax slightly different as it wouldn't be in XML formal as the example shows?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
that's what I thought, but although the intellisense indicates that this is valid :

import flash.filesystem.FileStream;

I still get the compiler error :

The class or interface 'flash.filesystem.FileStream' could not be loaded

:(

Looks like the filesystem library is not available in flash - only in AIR..
 
I did a quick search and found this thread that seems to indicate it's only available in AIR.


that's a bummer, sounded like a cool function if it was available!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Google Rank Extractor -> Perl beta with FusionCharts
 
yeah definitely would have been a handy inclusion!

I managed to find a way around it though - I am wrapping my main flash movie in a .net windows app which downloads the external swf binary via the web service and saves as a file for flash to then load in, seems to work but shame it couldn't be done in flash!

Thanks for your help anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top