Pushing Loader.content into DisplayObject Freezes Animation

I am working on a slideshow app which involves a bunch of images with mask effects cycling one after the other. I created a buffer to preload images in the background while the animation plays. I am using Tweener for all my tweens, and this has nothing to do with garbage collection or declaring vars inside function scope. The problem is the following lines of code in my complete handler of the flash.display.Loader class cause the animation to freese for a split second:
_preloadingSlide.source = _preLoader.content;
_preloadingSlide.loading = false;
_preloadingSlide.loaded = true;
_preloadingSlide is an insctance of a custom class that extends Sprite. The source attribute is a setter/getter whos code is as follows:
public function set source( value:DisplayObject ):void{
            _source = value; //_source is of type DisplayObject
            if( _source!= null ){
                addChild( _source );
I have isolated the error to these lines of code. When I halt execution while buffering and wait until all images are loaded there is no issue. Whenever these line execute it freezes the animation for a half second or so. I thought maybe it had to do with the internal copying the bytearray that FLASH is doing. Anyone have any ideas?

Is the profiler available as a set of AS classes? I use the SDK and I thought it was only for FLEX Builder. I use the underlying classes in flash.sampler to monitor memory consumption, etc as well. I am working on some tests using getTimer to see exactly how long it is takes for the Loader class to assign its content to my class, and as an alternative, exactly how long it takes to convert the bytearray of the bitmap data loaded with URLStream using Loader.loadBytes. I am sure the problem is that these bytearrays are very large due to the image size (900x800 avrg), and whatever internal code goes on in the loader class to convert them to a DisplayObject hangs up the player. Just out of curiosity is the source code of the Loader class available? Once again thanks for the help.

Similar Messages

  • Load Content into a javascript Variable

    Hello guys. I very new to spry and I need some help.
    How can I load content (text) from a html page(actually I
    want to get a result from a dynamic php script) into a javascript
    variable?
    I saw the fragments example in wich spry loads some html
    fragment into a div, etc... but I need the result text to be stored
    in a variable so I can test the result before update the div.
    Thanks in advance...

    I think this function updateContent shoud have a parameter to
    tell if we want the content to be loaded inside a container or a
    variable. It would be very helpful to integrate php/mysql
    validation scripts to forms. I wanted to test if a username was
    already in the database when the user choose the username in the
    form, so I made a custom function and aplied it to the textbox
    validation widget. Its working great, but it would be better if I
    didnt have to create invisible divs to receive the response from
    the php script I made.
    Thanks anyway. Spry is a great product.

  • Loading content into project/timeline from http listener

    Hi
    I have an application which helps producers/researchers browse and search for video assets. Once they have located one or more assets, I would like to be able to "push" them over to Premiere Pro.
    The browser is written in Silverlight, so the only mechanism it has to communicate with Premiere Pro would be via http. I think what I need is a plug in which has an HttpListener listening on a specific port, so that the silverilght application can post information (in edl/xml format) to the port the plugin is listening on. The plugin will then load the assets (mms video streams or files from uris) into the project and/or timeline.
    I would like to write this either using Flex or the Premiere Pro SDK. I need it to run on both Windows and the Mac.
    If anyone can provide any pointers, I would be very grateful.
    Thanks
    Nigel

    Hi Zac
    Thanks for the information.
    Can you clarify this a little for me? If I understand what you have written, I have to create an XML file using FCP format which I save to local storage, then use something like SendMessage in another application to programatically initiate a drop sequence of the file onto the Premiere Pro window. I would have to write two applications, one for the Mac, and one for the PC, using Visual Studio and Objective C rather than use the SDK.
    Is that correct?
    Can you also tell me if a plugin written in Flash/Flex can communicate in any way with the application, such as to automate a file/open sequence. I ask this because I believe Flash can listen on an http port, and avoid the need for separate apps on the Mac and PC.
    What you suggest appears possible, but tying it together in a way invisible to the user might be a bit tricky.
    Thanks
    Nigel

  • Dynamically load content into a "template" swf from text file

    I have a dream....
    Well, I have a concept. I have not actively pursued Flash in
    several years, though I've continued to have it in my arsenal. I've
    not done much in the action scripting realm for a while though.
    I am trying to create a template that will be used for about
    100 different product pages.
    It would have two tabs, basically, 2 different graphical
    button sets. One will have up to 4 links to similar products, each
    tab will be on the side of a square, and I need the ability to not
    display a tab if there is no actual link.
    As for the other tab, Its a menu that consists of a series of
    lines. This can be an external menu, I just need a way to have
    flash load the right menu. This menu, when you mouse over a line,
    the name of the product appears, as well as a product image that
    gets loaded with the menu. The product images would be external,
    allowing me to simply replace an image if a new higher end version
    of the product comes out.
    So, I am totally not an actionscripter. Looks like I need to
    load variables from an external file. Can I set a property in the
    flash code on the html that tells the movie what dataset to grab
    from?
    Here's basically what I am looking for
    property: value
    (load variables for:)
    item: 44
    (menu1)
    faster: 54b.html
    slower: 34d.html
    left: 43d.html
    right: 45c.html
    (menu2)
    menu:graph5.swf
    (menu loads images from external source)
    link51: 51d.html
    link52: 52c.html
    link53: 53c.html
    link54: 54d.html
    link55: 55b.html
    link56: 56d.html
    A possible third menu would be text driven, and would use
    html to link to various items.
    This is a static site, so urls will be fixed.
    Is it best to build a php page that serves up data for a
    single item, or do one big text file with all 100 or so items? Is
    that even possible?
    My Flash since MX is very rusty. I am using Flash Pro8. I
    would love to create a single file so modifications are to the text
    files, unless a new item is released, then it's updating a single
    flash menu and updating the text file.
    Been spending way too much time in InDesign lately! I used to
    be pretty good at Flash!

    well sorry there fanmap - but I don't think you're going to
    be able to get this to work. here's why: the link points to a php
    file - which gathers dynamic info from a DB - the return from the
    php is generating a string that is based on the DOM and
    'constructs' a javascript method that in turn writes to the html
    document. although we can embed html into a textField in Flash
    there are a limited number of supported html tags - and JS methods
    will not operate internally. in addition, (i'm not certain someone
    correct this if i'm off) there's no way to 'change' the output of
    the php call, therefore you will not be able to read the return
    because it is designed to use the DOM and write solely to the
    current document. Even if you were to access the JS method from the
    swf file (which one can) it will still only write the content of
    the php return to the html document - and the output is not
    compatible with the textField class.

  • .swf being able to load contents into it issue.  Please help?

    Hi there,
    I have strange situation regarding flash that I can't figure out.  I have a flash .swf file that is intended to load .flv video files into them at the local root level.
    I have been able to do this on my own server, but the .swf and the .flv videos are now located on the media streaming server, and the .swf is able to show up on it's own when embedded onto my page (on MY server), but it's not being able to load the video files.  I am perplexed because the videos are structured in the same EXACT way that it was being done on my server, but they will not load onto my .swf as they were doing when they were on my server.
    For example, one of the videos is loaded by using this convention in my actionscript:
    var file = "videos/Bob_Peebler.flv";
    So, on my media hosting service, I've loaded the .swf file on the local root, and the videos are placed in the same exact directory structure as they were done on my server.  In the example above, the  "bob_peebler.flv" is located inside the videos folder, and the videos folder is on the same level as the .swf
    In my flash file, I've thought that the var needs to point to the actual URL of the flash file, so I've then typed out the URL of the flash video, but I still can't seem to get it to work.
    var file = "http://iongeo.fileburst.com/videos/Bob_Peebler.flv";
    Here is where the .swf can be located to get a better sense of what I am trying to accomplish.
    http://iongeo.fileburst.com/ChannelGuide_Features.swf
    Please let me know if I can clarify on something better.
    I would really appreciate any kind of assistance that could be provided.
    Thank you

    Hello
    On my flash, I already have those parameters in place.
    I don't think there would be any security issues however, since I have used a player .swf which loads from the media site and plays the videos without a problem.
    http://www.iongeo.com/channelguide_test_dev/
    click on the four images at the bottom of the screen to see how it works.
    Now, I am pretty much doing the same thing, but this time embedding the other swf to load the videos.  As I mentioned, I was able to do this when everything was on our server, but now there is an issue for some reason when I try to load the .flv into the .swf from the other media server.

  • Is it possible to load content into a loaded swf?

    I'd like to access a loaded SWF and load images/videos into it and trigger functions inside the loaded *.swf.
    Is this possible ??

    Yes, see the "Chromeless..." examples in the Example Player sample app.  The basic idea is that you subclass SWFElement and map the SWF's API into the MediaElement API, so that your SWFElement subclass can be handed to a MediaPlayer, integrate with compositions, etc.

  • Load contents into one "netui:select" on click of another.

    Hi! I am a fresher to Weblogic Workshop and Portal. I want to know how to capture the onSelect or onChange event in a <netui:select> tag and call a pageflow action on the occurence of this event.

    I remember this keyboard menu. Didn't I give you the CSS for this?  I'm pretty sure I did.  Because I still have it in my notes.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>CSS Horizontal Menu</title>
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <style>
    /* BEGIN Horizontal Navbar */
    nav {
    margin: 0 auto;
    padding: 0;
    width: 900px;  /**adjust width as required**/
    font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
    overflow: hidden; /**float containment**/
    border: 1px dotted red; /**for demo purposes, you may delete this border**/
    nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: auto;
    /**list styles**/
    nav li {
    display: block;
    float: left;
    width: auto;
    line-height: 1em;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 15px;
    text-shadow: 1px 1px 1px #000;
    /**link styles**/
    nav li a {
    display: block;
    padding: 0.5em;
    border: 2px outset #999;
    color: #FFF;
    font-weight: bold;
    text-decoration: none;
    background: #CCC;
    /**mouseover styles**/
    nav li a:hover,
    nav li a:active,
    nav li a:focus {
    border: 2px inset;
    background: #00CCCC; }
    /* END Horizontal Navbar */
    </style>
    </head>
    <body>
    <nav>
    nav container
    <ul>
    <li><a href="#">Menu Item 1</a></li>
    <li><a href="#">Menu Item 2</a></li>
    <li><a href="#">Menu Item 3</a></li>
    <li><a href="#">Menu Item 4</a></li>
    </ul>
    <!--end nav--></nav>
    </body>
    </html>
    Nancy O.

  • Inserting HTML content into an animated DIV

    Can you, and if so how, insert HTLM content into an EGDE animated Div box? Specificaly an HTML table?  I can get the html code in the box but it won't read/render it as html code. In flash you can tell the program that the contents of the box is html code and it will read it as such but I don't see any way to do that here. I've tried several ways and I can get the code to display in the box but it won't render the code instruction in the boxCan it be done ??
    Thanks
    joel

    Hi,
    1) Your json file is not valid.
    You can copy and paste your datas here: http://jsonlint.com/
    Red commas must be deleted.
          "player": [
                "image": "images/player1.jpg",  //this is the URL I want to retrive
               "name": "player1",
                "image": "images/player2.jpg",
                "name": "player2", 
                "image": "images/player3.jpg",
                "name": "player3", 
                "image": "images/player4.jpg",
                "name": "player4",
    2)An example from http://docs.jquery.com/Ajax/jQuery.getJSON:
    3) compositionReady Tests.
    On compositionReady, i write:
    var profiles = {
                   "player": [
                        "image": "images/player1.jpg",
                        "name": "player1",
                         "image": "images/player2.jpg",
                         "name": "player2", 
                         "image": "images/player3.jpg",
                         "name": "player3", 
                         "image": "images/player4.jpg",
                         "name": "player4",
    console.log(profiles.player[1].image); // this line returns: "images/player2.jpg"
    Note: i deleted the first "[" and the last "]".

  • Loading File name and file contents into two separate tables using Sqlloadr

    Hi All,
    I have situtation like to load File contents into One table and File name into one table . File comes with .txt extension
    Example :
    File name : product_09_abc.txt
    File contents :
    Productcode
    ABC
    CDE
    EFT
    Can you please help me out this how can we acheive this using SQLLOADER.

    SQL*Loader will not pass through the filename for you to be able to insert into a table.
    You will need to have a controlling o/s script that picks up the file name, calls sql*loader and then also call's an SQL script (using sql*plus?) to insert the filename into a.n.other table.

  • Load XML content into HTML enabled TextField

    I'm trying to figure out how to use html such as <br />
    loaded from an XML element into a TextField.. if I use something
    like
    <desc>my description<br />line 2</desc> I
    get 3 nodes instead of one when loading the XML file. If I use
    something like <desc>my description&lt;br /&gt;line
    2</desc> then I get <br /> in the actual text.
    Can anyone clue me in as to how to store HTML in an XML
    element so I can load the content into a Dynamic TextField with
    HTML enabled?
    Thanks much!

    use the latter in your xml and use the htmlText property of
    your html-enabled textfield to display your text.

  • How to load content of my text file into a Vector?

    Hi!
    Two questions.
    Let say I have used BufferedReader(new FileReader(c:/java/MyText.txt)) to read from MyText.txt file. I want to know how to load content of this file (every line describe each photo in my photo-set) into a Vector? And how to associate lines of MyText.txt as an elements of the Vector?
    I am trying to do something, but no results.
    try{
    BufferedReader reader = new BufferedReader(new FileReader("c:/java/Applications/MyText.txt"));
    String str=reader.readLine();
    JList myList = new JList();
    StringTokenizer st = new StringTokenizer(str,"\n");
    Vector vr = new Vector(25);
    while(st.hasMoreTokens()){
    String nextToken = st.nextToken();
    vr.addElement(nextToken);
    myList.setListData(vr);
    TA1.setText(TA1.getText()+
    (String)myList.getSelectedValue());
    }catch(IOException evt) {};

    BufferedReader reader = new BufferedReader(new FileReader("c:/java/Applications/MyText.txt"));
    Vector photos = new Vector(0,0);
    while(reader.ready())
       photos.addElement(reader.readLine());
    }good luck,
    Felipe

  • I'cant load SPRY content into a Frame

    HOw can i load spry content into a frame.. i wrote a code..
    and in the preview version works.. but when i upload to server..
    it's not working.. this my code.. thk
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- Copyright (c) 2006. Adobe Systems Incorporated. All
    rights reserved. -->
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Collapsible Panel Group Sample</title>
    <script language="JavaScript" type="text/javascript"
    src="widgets/collapsiblepanel/SpryCollapsiblePanel.js"></script>
    <script language="JavaScript" type="text/javascript">
    function load_content ()
    if (parent.document.getElementById('main_div')) {
    parent.document.getElementById('main_div').innerHTML=document.getElementById('inner_frame ').innerHTML;
    if (!parent.document.getElementById('main_div')) {
    window.location=('index.html') ;
    </script>
    <link
    href="widgets/collapsiblepanel/SpryCollapsiblePanel.css"
    rel="stylesheet" type="text/css" />
    <link href="css/samples.css" rel="stylesheet"
    type="text/css" />
    <style type="text/css">
    #cp1 .CollapsiblePanelContent {
    overflow: scroll;
    height: 300px;
    .CollapsiblePanel {
    width: 300px;
    .CollapsiblePanelTab {
    font-size: 1em;
    </style>
    </head>
    <body onload="load_content()">
    <h3>Collapsible Panel Group Sample</h3>
    <p>By default the panels in a collapsible panel group
    are open.</p>
    <div id="inner_frame">
    <div id="CollapsiblePanelGroup1"
    class="CollapsiblePanelGroup">
    <div class="CollapsiblePanel">
    <div class="CollapsiblePanelTab" tabindex="0">Panel
    23</div>
    <div class="CollapsiblePanelContent">
    <p>Test 1.</p>
    </div>
    </div>
    <div class="CollapsiblePanel">
    <div class="CollapsiblePanelTab" tabindex="0">Panel
    2</div>
    <div class="CollapsiblePanelContent">
    <p>test 2</p>
    </div>
    </div>
    <div class="CollapsiblePanel">
    <div class="CollapsiblePanelTab" tabindex="0">Panel
    3</div>
    <div class="CollapsiblePanelContent">
    <p>test 3</p>
    </div>
    </div>
    </div>
    </div>
    <script language="JavaScript" type="text/javascript">
    var cpg1 = new
    Spry.Widget.CollapsiblePanelGroup("CollapsiblePanelGroup1", {
    contentIsOpen: false });
    </script>
    </body>
    </html>

    Im not sure if i'm doing it right, but it wont work for me
    var scriptEle= document.createElement("script");
    scriptEle.text = s;
    ele.appendChild(scriptEle);
    is this the exact code witch i have to replace the old one
    with?
    i also added the
    Spry.Data.initRegions(ele);
    on the end of the Spry.Utils.setInnerHTML function
    i havent included the spry related javascripts in the main
    page could tha be a problem?
    actually i've tried to but it did'nt help
    really thanx tha you willing to help

  • Please help on the Loader.content to movieclip

    Hello there,
    I have been search around and got some mixed solutions,
    summarized as follow:
    If I need to load external swf into the main swf file, I need
    to Loader with appropriate URLRequest for this purpose.
    After loaded, you can listen to the complete event and
    addChild the loader.content to the main swf.
    Because I have a stop on the loaded swf first frame, I need
    to start the swf with a button. Some solutions on the net pointed
    that to make this happened, you need to cast the loader.content to
    MovieClip and have to through a tricky way to accomplish it like
    var movie:*=loader.content ;
    var clip:MovieClip=movie;
    clip.gotoAndPlay(4);
    I tried this method and still got Type Coercion failed
    ::cannot convert flash.display to MovieClip
    Please help, don't know why some experts said it is working
    while I can not get it to work. Thanks in advance

    Thanks WL, you are very close. I have a flash8 movie (purely
    animation)
    and I actually opened it in CS3 and saved as CS3. after
    publishing that's the movie I am tring to load.
    I recreate the whole animation in CS3 and everything start to
    run as supposed to. By trace the loader.content I find out one is
    [object AVM1Movie] for sudo as2 movie and [object MainTimeline] for
    the pure as3 movie. Thanks again.

  • Load swf into RAM via an asset manager

    Hi.
    I have an AS3 virtual world and we are continually loading external resources such as swfs and sounds.
    A few of my menu screens that take a damn long time to load. Read a tut that said we should load them into RAM using an asset manager.
    I'm assuning the asset manager is simply a Class used specifically for loading and unloading graphics, swfs and sounds. So the important part to ask is:
    What do they mean by loading into RAM.
    I thought all swfs were automatically loaded into RAM ie: cached or in the flash player cache or the browser cache. Or do I have to do it specifically myself with some code. We are importing external files so we thought that was a great idea as they are shared by many games.
    btw: RSLs I have read about but I don't understand. I thought my externally loaded files were RSLs (runtime shared libraries) or would I have to do some physical coding do convert them into RSLs.
    This is so important because I am not very experienced but I am getting a lot better due to help receied in this forum and my current programmer is leaving me. I have been studying up on As3 and design patterns and I understand basic coding a lot better now.
    CHEERS
    EDIT: Just read that I am using a http call. - I use urlloader - well that's what you use isn't it or how would you load an external swf. Just read that you can hold the swf as a variable which loads it in RAM and therefore will be available immediately. Know I don't understand anything as I have never read that anywhere.

    Hi Andrei, nice to see you around here.
    Well, somebody helping me says that normally we make a http request with urlLoader to the server and that is what was happening each time. We weren't getting the cached swf. (that bit I don't understand and doesn't sound right - anyway...)
    So he says if we create a dictionary class to hold that swf then the next time we make a request we will get the movie from there and not from the server.
    I have highlighted the main parts of code below.
    What I don't understand about all this is that I have never seen anything like this in my life. I have read extensively and read all about loading external files and using this type of asset manager with the dictionary class does not ring a bell and goole comes up with nothing.
    I hunch is that as you say, we are doing something wrong somewhere because the only way to get an external file is via urlLoader to the server the first time and then the second time it should look for it cached on our computer is that right? Or when we make the urlLoader request how does it know to look on our computer first before going to the server or are these innner workings of the flash player I know nothing about. This is so important as when I get 10 kids on the computers they wait for as long as 5 minutes for movies that have already been downloaded many times before.
    Cheers in advance.
    package com.Gerry.managers.assetManager
        import flash.display.Loader;
        public class AssetLoader extends Loader
            private var _assetName:String;
            public function AssetLoader()
                super();
            public function get assetName():String
                return _assetName;
            public function set assetName(value:String):void
                _assetName = value;
    The asset manager loading class
    package com.Gerry.managers.assetManager
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.net.URLRequest;
        import flash.utils.Dictionary;
        public class AssetManager extends Sprite
            public static const ASSET_LOADED:String = "assetLoaded";
            private static var _instance:AssetManager;
            private var _assetsLoaded:Dictionary = new Dictionary();
            private var _assetsBeingLoaded:Dictionary = new Dictionary();
            public function AssetManager(pvt:SingletonEnforcer)
             * loads and asset and keeps a reference to the loaded content
             * @param name
             * @return null if the asset is not loaded yet
           public function loadAsset(name:String):MovieClip
                var asset:MovieClip;
                if (_assetsLoaded[name])
                    asset = _assetsLoaded[name];
                else if (_assetsBeingLoaded[name] == null)
                    var skinloader:AssetLoader = new AssetLoader();
                    skinloader.assetName = name;
                    skinloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
                    skinloader.load(new URLRequest(name));
                    _assetsBeingLoaded[name] = true;
                return asset;
            protected function loadCompleteF(e:Event):void
                var skin:MovieClip = e.target.content as MovieClip;
                var name:String = ((e.target as LoaderInfo).loader as AssetLoader).assetName;
                _assetsLoaded[name] = skin;
                delete _assetsBeingLoaded[name];
                dispatchEvent(new Event(ASSET_LOADED));
             * gets an instance of the class
             * @return
            public static function get instance():AssetManager
                if (_instance == null)
                    _instance = new AssetManager(new SingletonEnforcer());
                return _instance;
    internal class SingletonEnforcer
    The function inside a class called Screen which is used by menus classes to load their swf menus.
    protected function loadSkin(path:String = null):void
                trace("skin to load: " + path);
                Home.instance.addPreloaderF();
                _path = path + Home.instance.cacheString;
                if (_usingAssetManager)
                    loadSkinFromAssetManager();
                else
                    if (_skinloader.content)
                        _skinloader.unloadAndStop(true);
                    _skinloader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteF);
                    _skinloader.load(new URLRequest(_path));
            protected function loadSkinFromAssetManager(e:Event = null):void
                _skin = AssetManager.instance.loadAsset(_path);
                //if no skin we have to wait to be loaded it
                if (_skin == null)
                    AssetManager.instance.addEventListener(AssetManager.ASSET_LOADED, loadSkinFromAssetManager);
                else
                    AssetManager.instance.removeEventListener(AssetManager.ASSET_LOADED, loadSkinFromAssetManager);
                    loadCompleteF(null);

  • How can i load file into database from client-side to server-side

    i want to upload file from client-side to server-side, i use the following code to load blob into database.
    if the file is in the server-side, it can work, but if it in the client-side, it said that the system cannot find the file. i think it only will search the file is in the server-side or not, it will not search the client-side.
    how can i solve it without upload the file to the server first, then load it into database??
    try
    ResultSet rset = null;
    PreparedStatement pstmt =
    conn.prepareStatement ("insert into docs values (? , EMPTY_BLOB())");
    pstmt.setInt (1, docId);
    pstmt.execute ();
    // Open the destination blob:
    pstmt.setInt (1, docId);
    rset = pstmt.executeQuery (
    "SELECT content FROM docs WHERE id = ? FOR UPDATE");
    BLOB dest_lob = null;
    if (rset.next()) {
    dest_lob = ((OracleResultSet)rset).getBLOB (1);
    // Declare a file handler for the input file
    File binaryFile = new File (fileName);
    FileInputStream istream = new FileInputStream (binaryFile);
    // Create an OutputStram object to write the BLOB as a stream
    OutputStream ostream = dest_lob.getBinaryOutputStream();
    // Create a tempory buffer
    byte[] buffer = new byte[1024];
    int length = 0;
    // Use the read() method to read the file to the byte
    // array buffer, then use the write() method to write it to
    // the BLOB.
    while ((length = istream.read(buffer)) != -1)
    ostream.write(buffer, 0, length);
    pstmt.close();
    // Close all streams and file handles:
    istream.close();
    ostream.flush();
    ostream.close();
    //dest_lob.close();
    // Commit the transaction:
    conn.commit();
    conn.close();
    } catch (SQLException e) {

    Hi,
    Without some more details of the configuration, its difficult to know
    what's happening here. For example, what do you mean by client side
    and server side, and where are you running the upload Java application?
    If you always run the application on the database server system, but can't
    open the file on a different machine, then it sounds like a file protection
    problem that isn't really connected with the database at all. That is to
    say, if the new FileInputStream (binaryFile) statement fails, then its not
    really a database problem, but a file protection issue. On the other hand,
    I can't explain what's happening if you run the program on the same machine
    as the document file (client machine), but you can't write the data to the
    server, assuming the JDBC connection string is set correctly to connect to
    the appropriate database server.
    If you can provide some more information, we'll try to help.
    Simon
    null

Maybe you are looking for