File streaming problem

Hi,
    I'm a beginner ot actionscript.
    I'm trying to read  bmp fille byte by byte and then redraw it. For that I made a .fla file for veiwing and .as file for coding.
    I just started coding and made import to the follwing files in this scenario and I get errors while debugging.
Code:-  package
                    import flash.filesystem.File;
                    import flash.filesystem.FileMode;
                    import flash.filesystem.FileStream;
                    public class FileStreamLive
Error Message:-
1172: Definition flash.filesystem:File could not be found.
1172: Definition flash.filesystem:FileMode could not be found.
1172: Definition flash.filesystem:FileStream could not be found.
5000: The class 'FileStreamLive' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
I've seen many samples on filestreaming but all were using the mxml scripting that I don't know
Please help
Thanx in Advance.

click file/publish settings/flash/player/adobe air 1.0 (or 1.5).
note:  air applications are intended to be installed on users computers, not be displayed/played in a web browser.

Similar Messages

  • File Stream Open Problem with g++ 3.3.3 and libstdc++.so.5

    Hi
    I am facing one problem when I complie and run my code
    with the following compiler and standard C++ library :
    OS Used : SunOS GUILIN 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2
    Compiler Used : g++ 3.3.3
    Standard Library Used : libstdc++.so.5
    Problem : I am supposed to create 1000 file streams,
    but when I run my program, it creates only 254 file streams,
    after that assertion occurs!!!!
    OUTPUT :
    ========
    $ echo $SHELL
    /usr/bin/sh
    $
    $ ulimit -n
    50000
    $
    $ ./a.out
    i : 253
    errno : 24
    Assertion failed: in, file main.cpp, line 28
    Abort - core dumped
    $
    ========
    MY CODE :
    ==================================================
    #include <sys/errno.h>
    #include <assert.h>
    #include <fstream>
    #include <iostream>
    #include <string>
    extern int errno;
    const int MAX_STREAM = 1000;
    using namespace std;
    int main(int argc, char* argv[])
    ifstream in[MAX_STREAM];
    string file("boo");
    for ( int i=0; i != MAX_STREAM; i++ )
    in[i].open(file.c_str());
    if ( errno > 0 ) {
    cout << "i : " << i << endl;
    cout << "errno : " << errno << endl;
    } // end of "if ( errno > 0 ) {"
    assert(in[i]);
    return 0;
    ===================================================
    But, if I compile the exactly same program with the
    following compiler and run the executable under the
    same environment as above, it is running without
    any problem and 1000 file streams are created
    smoothly without any assertion.
    OS Used : SunOS GUILIN 5.8 Generic_108528-13 sun4u sparc SUNW,UltraAX-i2
    Compiler Used : g++ 2.95.3
    Standard Library Used : libstdc++.so.2.10.0
    Anybody can help me to overcome this problem with
    g++ 3.3.3 compiler and libstdc++.so.5 library.
    With Very Best Regards
    Subrata Basak
    MediaRing Ltd., Singapore

    CVS differentiate text and binary files (they are marked as one or the other by using a CVS option when adding the file). If a file is marked as text, cvs will perform line-end conversion if needed.
    On Linux, line endings are coded as LF, whereas on Windows they're coded as CRLF. When you copied files from Windows to Linux, you probably did a binary copy, which left the CRLFs intact. When you checked those files into CVS on the Linux server, Linux CVS did not convert the CRLFs into LFs.
    The result of this is that if you check the files out on Linux, they will still contain CRLF (which is wrong for Linux). You may verify this by checking out a file on Linux, then opening it using vi -b. The CRs should show as extra ^M's at the end of each line.
    If, on the other hand, you check out the file on Windows, a conversion will take place, where all LFs are converted to CRLF. The result of this is that your file will contain CRCRLF at the end of each line.
    The best way to fix this is probably to check everything out on the Linux box, remove every CR from every file, then check everything back in again.

  • How can I read a binary file stream with many data type, as with AcqKnowledge physio binary data file?

    I would like to read in and write physiological data files which were saved by BioPac�s AcqKnowledge 3.8.1 software, in conjunction with their MP150 acquisition system. To start with, I�d like to write a converter from different physiodata file format into the AcqKnowledge binary file format for version 3.5 � 3.7 (including 3.7.3). It will allow us to read different file format into an analysis package which can only read in file written by AcqKnowledge version 3.5 � 3.7 (including 3.7.3).
    I attempted to write a reader following the Application Note AS156 entitled �AcqKnowledge File Format for PC with Windows� (see http://biopac.com/AppNotes/ app156Fi
    leFormat/FileFormat.htm ). Note the link for the Mac File format is very instructive too - it is presented in a different style and might make sense to some people with C library like look (http://biopac.com/AppNotes/ app155macffmt/macff.htm).
    I guess the problem I had was that I could not manage to read all the different byte data stream with File.vi. This is easy in C but I did not get very far in LabView 7.0. Also, I was a little unsure which LabView data types correspond to int, char , short, long, double, byte, RGB and Rect. And, since it is for PC I am also assuming the data to be written as �little endian� integer, and thus I also used byte swap vi.
    Two samples *.acq binary files are attach to this post to the list. Demo.acq is for version 3.7-3.7.2, while SCR_EKGtest1b.acq was recorded and saved with AcqKnowledge 3.8.1, which version number is 41.
    I would be grateful if you someone could explain how to handle such binary file stream with LabView and send an example to i
    llustrate it.
    Many thanks in advance for your help.
    Donat-Pierre
    Attachments:
    Demo.acq ‏248 KB
    SCR_EKG_test1b.acq ‏97 KB

    The reading of double is also straight forward : just use a dble float wired to the type cast node, after inverting the string (indian conversion).
    See the attached example.
    The measure of skin thickness is based on OCT (optical coherent tomography = interferometry) : an optical fiber system send and received light emitted to/back from the skin at a few centimeter distance. A profile of skin structure is then computed from the optical signal.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Read_AK_time_info.vi.zip ‏9 KB

  • How can I read a binary file stream with many data type, as with AcqKnowled​ge physio binary data file?

    I would like to read in and write physiological data which was saved by Biopac�s AcqKnowledge 3.8.1 software, in conjunction with their MP150 acquisition system. To start with, I�d like to write a converter from different physiodata file format into the AcqKnowledge binary file format for version 3.5 � 3.7 (including 3.7.3). It will allow us to read different file format into an analysis package which can only read in file written by AcqKnowledge version 3.5 � 3.7 (including 3.7.3).
    I attempted to write a reader following the Application Note AS156 entitled �AcqKnowledge File Format for PC with Windows� (see http://biopac.com/AppNotes/app156FileFormat/FileFo​rmat.h
    tm ). Note the link for the Mac File format is very instructive too - it is presented in a different style and might make sense to some people with C library like look (http://biopac.com/AppNotes/app155macffmt/macff.ht​m) .
    I guess the problem I had was that I could not manage to read all the different byte data stream with File.vi. This is easy in C but I did not get very far in LabView 7.0. Also, because it is for PC I am assuming the data to be written as �little endian� integer, and thus I also used byte swap vi.
    I would be grateful if you someone could explain how to handle such binary file stream with LabView and send an example to illustrate it.
    Many thanks in advance for your help.
    Donat-Pierre

    One more step...
    short are U16 integer
    double are double precision float
    bool seem to be 2 bytes (= U16)
    char are string (variable length)
    rgb are U16 integer, with high order byte = 0
    rect should be 4 x U16 (top, left, bottom, right)
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • File Streams *creating Files without those pesky line breaks

    Greetings Java Developers,
    Basicly I would like to write a large block of data out to a file without any line breaks and end of line characters that most JAVA Output Streams include with each call to WRITE(); First I am using BYTE Output Streams in JAVA and two end of line bytes are written also!!!
    It may be possible to use a Buffered File Stream with a Large Buffer about a Megabyte or so and FLUSH() the Stream all at once.
    Any ideas or suggestions will be greatly appreaciated!
    -chibi_neko

    I have not had a problem writing bytes to file. The getStream call returns a FileOutputStream. Also note that the curly braces around 'i' really are square braces but I used them because square braces around I get reformatted in his post.
          * Write bytes to a file.
          @param Data Data to write to a file.
          @param file Destination file.
         public static void write(byte [][] Data, File file)
              try
                   OutputStream out = getStream(file);
                   for(int i = 0 ; i < Data.length ; i++)
                        out.write(Data{i});
                   out.close();
              catch(IOException E)
                   throw new Error(E.getMessage());
              catch(Exception e)
                   throw new Error(e.getMessage());
         }the getStream method
    FileOutputStream fw = new FileOutputStream(file.getPath(),append);

  • New Radio Station & Streaming Problems

    I have added my favorite Public Radio station to my iTunes library, but I can not get it to connect. It shows up in the library as a radio station, but nothing happens when I click on the play button.
    In addition, I'm having trouble with all the radio stations I've tried that were already in the iTunes folder. I've tried changing the streaming buffer size in preferences, but the network keeps stalling and needing rebuffering, regardless of the streaming buffer size I choose.
    PowerBook PowerPC G4   Mac OS X (10.4.2)   Other computer is iMac, OS X v.10.3.9

    I single file in a playlist repeats constantly for me (just tried it - don't usually have playlists for single items), but I have never tried using repeat on an audio stream. I expect the repeat doesn't work with streams because iTunes never gets an end-of-file notification which would then tell iTunes to start again at the beginning - but that is just a guess.
    What happens if you open the stream in Quicktime? If the stream is in iTunes library, you can open it's Get Info box, click on Edit URL on the summary tab, and you can then copy the address to paste into Quicktime's Open URL. If the stream is one on the default iTunes Radio list, drag it into your Library and you can then click on the Edit URL button to copy the address. iTunes an Quicktime are not exactly the same, so you may get different results. You could also try VLC Player". Testing streams in another player may help you identify if it is really iTunes at fault.
    I usually don't have streaming problems, although I rarely have a stream on longer than 2 or 3 hours at a time and I think about 5 hours is the longest I've had a stream running.

  • N96 streaming problem remain after upgred to 11.10...

    after upgreding n96 to new firmwire still cant do any stream file same problem with last firmwire any boady hapen with him same thing????

    I tried one clip and it was WMV 448x336 resolution this clip WILL not play on N95 or N96. I checked others and they are .asx files these are not compatible with N95 OR N96.
    So, is there a specific video that plays on N95 but not on N96 can you send the link?
    640K Should be enough for everybody
    El_Loco Nokia Video Blog

  • Use Google's Public DNS Server To Fix Apple TV Streaming Problems

    Many people have been having a streaming problem with the Apple TV - especially with Netflix. In fact, it's often the most popular topic on this forum. After having the same problem off and on for two years, I finally figured out the following solution. It uses Google's public DNS service instead of your ISPs DNS.
    1. Navigate to Settings >> General >> Network and select Configure TCP/IP.
    2. Select “Manually” next to Configure IP.
    3. Dont change the IP address or the Subnet Mask and Router Address. Just click "Done".
    4. Set the DNS Address screen with the following: 008.008.008.008 and click “Done.”
    You should now be able to stream more smoothly on your Apple TV.
    This problem is probably caused by a bad streaming server somewhere on Netflix's CDN (Content Delivery Network). The DNS points your Apple TV based on location. By using Google's DNS, you get a different streaming server. That is, of course, a wild guess and is not verifiable by me. But, it makes sense so I'm going with that.
    If this works for you, please buy a cup of coffee for a complete stranger or some other selfless, random act of kindness.

    Welcome to the  tv Discussion Forums.
    Barring interference to the network (which is probably unlikely but not totally out of the question) I'd agree that your problem seems specific to one mac. IMHO reinstalling an OS is more often than not a lazy mans way of saying they can't be bothered to look for the problem and totally unnecessary so far as I am concerned. I don't believe any version of itunes has been a problem for the tv, although there have been the usual problems posted that usually accompany any upgrade (these are more than likely due to updating over damaged files).
    Reinstalling itunes will replace the application but not many of the associated preference files that are more likely to be a problem than the application itself. Rather than reinstalling itunes, I'd try creating a new user and try itunes in the new user account to see if the problem persists.
    You could also create a new library in the original user account and see if you have similar problems with that library.
    Check your network settings and compare them to the other macs that work OK, check for proxy servers and DNS addresses.

  • Transport Stream Problems

    My compressor keep locking up when I set it to export in "MPEG-2/Transport Stream" setting. I would like to export in this setting because I believe that this is how Toast encodes to BluRay.
    Any ideas/thoughts/solutions?
    Go Hornets!

    I'm not sure about your transport stream problem, but Toast doesn't need it; it will use its AVCHD encoder on a regular QT movie; I exported a self contained QT movie from an FCP timeline, dragged it into the Toast window, and let it encode; it worked well.
    If you send Toast a previously compressed file, it will encode it again in the AVCHD format, probably at a loss of quality.
    Toast can burn the Blu Ray format to a standard DVD, giving you about 30 minutes of HD footage, and using your standard DVD burner.

  • Socket + GZip Stream + Object Stream problem

    Hello,
    I've been having a problem with my threaded networked application. I want to send GZipped Objects over a socket, but the ObjectInputStream constructor blocks. I understand that it is waiting for header information from the corresponding ObjectOutputStream. I am sure that the socket connection has been established, and the ObjectOutputStream is constructed before the ObjectInputStream on the other end. The header information never seems to get to the other end.
    If I remove the Gzip filter stream, everything works great. I'm thinking that the Gzip stream is buffering the 4 bytes of header info, waiting for more data before actually compressing anything. I've tried flushing everything, to no help. I've tried finish()ing the Gzip stream, but that means I can't send my object payload. I've checked the buffers of all the stream objects and see the Object Stream's header in its buffer, but never seems to get into the GZIPOutputStream's buffer.
    Has anyone successfully used Object Stream > GZIP Stream > Socket Stream before?
    I'm not interested in examples that use file streams, since I get the impression that Gzip works fine with those (and maybe even designed only for those, not for sockets).
    Thanks for any help.
    Dave C

    Thanks. I see what I'm doing differently now. I was trying to send multiple objects over the gzip stream, not 1 at a time, finish(), and construct a new Gzip and Object output stream.
    Seems to work with a ByteArrayOutput/InputStream, now to try with a socket..

  • Help with add file name problem with Photoshop CS4

    Frustrating problem: Help with add file name problem with Photoshop CS4. What happens is this. When I am in PS CS4 or CS3 and run the following script it runs fine. When I am in Bridge and go to tools/photoshop/batch and run the same script it runs until it wants interaction with preference.rulerunits. How do I get it to quit doing this so I can run in batch mode? Any help is appreciated. HLower
    Script follows:
    // this script is another variation of the script addTimeStamp.js that is installed with PS7
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.INCHES;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "Lower© ";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = " ";
    // Set font size in Points
    myTextRef.size = 10;
    //Set font - use GetFontName.jsx to get exact name
    myTextRef.font = "Arial";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 0;
    newColor.rgb.green = 0;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 10, 99);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    you might want to try the scripting forum howard:
    http://www.adobeforums.com/webx?13@@.ef7f2cb

  • SOMEONE PLEASE HELP WITH MISSING FILES XP PROBLEM

    i recently purchased an ipod touch, and all i want to do is get some music on it, and update the firmware, but i cant use itunes, cuz im getting 'there are some files missing' problem.
    I swear to god, if i dont get this fixed by the end of the week, im gonna post the latest video on youtube... on how to smash up apple products.
    Ive been trying NOT to buy apple products since the first dawn of time, but i do actually like the ipod touch. But, low and behold... the very reason why i never buy apple products has been confirmed!
    can someone PLEASE tell me if there is a solid fix for this? i have literally tried EVERYTHING before you ask. im at my wits end.
    Using XP home, all updates installed... latest itunes,

    It will probably help if you'll post the exact error message and when it's occurring. Otherwise we'll just be guessing, not that someone here might not have a good guess. I'm going to guess that this thread might help:
    http://discussions.apple.com/thread.jspa?messageID=11161893&#11161893
    Regards.

  • File sharing problems and horror story (nearly)

    I use Leopard on a MacBook Pro, a MacBook and a iMac G4 800 MHz (unsupported model).
    I have on the iMac and the MacBook Pro many users (the same ont he two machines) and I always use Fast User Switching.
    I have had very few problems with Leopard until now; I like it even if there are some glitches or some new features which are not my cup of tea (hierarchical menus missing from the dock, stacks useless when there are many items, FireWall impossibilities (?) to open specific ports, Back to my Mac working on a Lan but not from outside until now, problems with a few apps (Parallels networking erratic), ...
    Now about File Sharing.
    Let say my main account is user1 (Administrator), and I have another user2 also administrator, plus user3, user4 standard users.
    On the iMac I activate File Sharing.
    On the MacBookPro, as user1, if I connect to the iMac Server (using afp://IPaddress_of_theiMac/) I do NOT get the dialog
    "Enter your user name and password to access file server YYY
    Connect to server as Guest or as Registered User"
    but I directly get the dialog
    "Select the volumes you want to mount on YYY"
    From this, if I select user1 it mounts with full read/write permissions which is normal. It appears that I am connected with my Apple account user1&mac.com (same as mentionned in the Account panel of System Preferences).
    On the other hand, if I try to connect to the user2 account, I only get limited access although in the File Sharing Preferences, user1/iMac is mentionned with full Read/Write preferences for the Home Folder of user2.
    What is very surprising is that if I log on the MacBook Pro as user2, or user 3 or user4, then connect to the iMac, I first get the dialog to enter a user name and a password. This gives me access with the correct full permissions on user1/iMac or user2/iMac using the corresponding user name/password pair; this is the usual behaviour which is missing when trying to connect from user1/MacBook Pro.
    Now for the Horror Story!
    Trying to understand what was going on with the permissions of the user2/iMac account, I logged in to the iMac as user1, went to the Users folder and from there had a look on the informations about user2 home folder. In the lower part of the pannel, Sharing & Permissions says "You have no access" (which is normal) and this is followed by a table where users and permissions are listed. It seems user1 has Read and Write access in contradiction with the preceding phrase...
    Anyway, I tried to modify these authorizations for user2 by clicking on the lock of the Information pannel and entering name and password of the administrator. Didn't go farther than that. By mistake, I hit Command-Delete and user2 was GONE from the list AND NOT ONLY from the list in the Information window! Using Fast User Switching and going to user2, nothing left on the Desktop and NO Home anymore.
    In the System Preferences/Accounts panel, user2 was still mentionned.
    In the Users folder, no user2 folder anymore.
    Using once again Fast User Switching, I logged as user2 and got by magic an all new Home. Nothing left in Documents, Library or other user1 folders. Standard settings for icons, dock, etc.
    My first move has been to use a very recent backup to restore everything (Thank you Mike Bombich from Copy Cloner!).
    Once everything was back to normal, I had a look at the Trash from user1 and guess what, the Home folder of user2 was there, complete.
    So now I am left with two questions
    why is it I do not have the same dialogs when connecting from all the accounts although as far as I can see, configurations are the same?
    why is it possible, from an Information pannel to delete the account of another user?
    Thank you all for comments!

    For the file sharing problems, answer is found in
    http://docs.info.apple.com/article.html?artnum=306723

  • File path problem

    I have looked an read through almost all the file path problem post possible and I am still having issues maybe one of you guys can help me, here are my files
    I am doing this as an example so that I can apply it to all of my file problems....
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Attachments:
    pathexample.zip ‏122 KB

    First of all, to troubleshoot the problem it would help to put some filepath indicators at each point so that you can see what is going on. Also, in your exe having an error dialog "Simple Error Handler.vi" to let you know what LabVIEW didn't like in the exe.
    Now, when you run a top level ("Main.vi") and use the "Current VI's Path " in the development mode it returns <Filepath>\"Current path"\Main.vi. So stripping once will get you to  <Filepath>\"Current path" .    Now if you make it into an exe the "Current VI's Path" returns <Filepath>\"Current path"\"Name.exe"\Main.vi so you are "nested" one deeper.
    I use the following construct to determine whether the vi is being used as in the development environment or as an exe, the parse the path accordingly, although in this instance it is used to supply different directory names to a little more complex file system.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Error when opening itunes : iTunes has stopped working ''A problem caused the program to stop working correctly''. When I repaired damaged files the problem still exists and also after uninstalling and redownloading and installing itunes. I have windows 8

    Error when opening iTunes : iTunes has stopped working '' A problem caused the program to stop working correctly''.
    When I repaired damaged files the problem still exists and also after uninstalling, redownloading and reinstalling iTunes.
    My pc is working with windos 8.
    Is there a solution?

    Hey there Rodney274,
    It sounds like you are getting an error from iTunes when you launch it. I would try the troubleshooting in this article named:
    iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
    http://support.apple.com/kb/ts1717
    Start with troubleshooting for 3rd party plug ins section, then the rest of the article if needed:
    Start iTunes in Safe Mode
    Open iTunes in Safe Mode to isolate any interference from plug-ins or scripts not manufactured by Apple.
    Hold down Shift–Control while opening iTunes. You should see a dialog that says "iTunes is running in safe mode" before iTunes finishes starting up.
    Click Continue.
    See if the issue you're experiencing persists in Safe Mode.
    If you have the same issue while iTunes is in Safe Mode, proceed to the "Create a new user account" section. If you don't experience the same issue, follow these steps to remove third-party plug-ins.
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

Maybe you are looking for