Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > AIR (Apollo)

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-22-2012, 02:49 PM   #1
Rhuno
Let's Go Blues!
 
Rhuno's Avatar
 
Join Date: Nov 2007
Location: Orlando, FL
Posts: 250
Send a message via AIM to Rhuno
Default Save file and open it

Hey all,

I've run into an issue with AIR. I'm trying to save out a file and then open that file once it has saved out successfully. The file is saved out to disk just fine, but when I then try to load it in, I get an error.

If I close the program and restart it, it can open the file just fine. Also, I am able to open the file outside of the program. It just seems to not allow the instance of the program that created the file to open it. I'm closing the filestream so that shouldn't be an issue. Here's some code for reference:

ActionScript Code:
var fs:FileStream = new FileStream(); var f:File = new File(File.applicationDirectory.nativePath + "\\myTest.flv"); fs.openAsync(f, FileMode.WRITE); fs.writeBytes(_baFlvEncoder.byteArray, 0, _baFlvEncoder.byteArray.length); fs.close();

Then later I try to play the file:

ActionScript Code:
_stream.play("myTest.flv");

The code above generates this error:

Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Play.StreamNotFound

Is there some kind of security restriction in AIR that won't allow you to open a newly created file? If so, is there some kind of work around available?

Thanks.
__________________
Check out my flashblog, yo.
Rhuno is offline   Reply With Quote
Old 08-22-2012, 03:23 PM   #2
Rhuno
Let's Go Blues!
 
Rhuno's Avatar
 
Join Date: Nov 2007
Location: Orlando, FL
Posts: 250
Send a message via AIM to Rhuno
Default

Resolved this; just had to clear a reference in the encoder.
__________________
Check out my flashblog, yo.
Rhuno is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:49 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.