Insert a .SWF file into a Index.html

Im making a website which is all in flash and now I have to
insert the Master.swf file in dreamweaver Index.html so i can
upload it on the web. Ive done all that but when I try and run the
Preview in Safari it just shows up blank.
In Dreamweaver i can play the master.swf file and it works
but not in Preview mode.
I looked all over the net for answers but nothing yet. Can
anyone help me.......................Please!

> Im making a website which is all in flash
Too bad. You know what the downsides of this are, right?
> In Dreamweaver i can play the master.swf file and it
works but not in
> Preview
> mode.
Upload your page so we can see the code, please.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"ParadoxSwitch" <[email protected]> wrote in
message
news:gan9kr$7tt$[email protected]..
> Im making a website which is all in flash and now I have
to insert the
> Master.swf file in dreamweaver Index.html so i can
upload it on the web.
> Ive
> done all that but when I try and run the Preview in
Safari it just shows
> up
> blank.
> In Dreamweaver i can play the master.swf file and it
works but not in
> Preview
> mode.
>
> I looked all over the net for answers but nothing yet.
Can anyone help
> me.......................Please!
>

Similar Messages

  • Insert an swf file into another Flash file

    Hi,
    I'm a newbie to flash trying to insert an SWF flash file (a game) into another Flash file. However, when I import the swf file into the library and drag it onto the frame (and insert the stop(); command onto the frame action to stop it playing the whole movie), the SWF file plays constantly, ignoring all the actionscript and button commands in the game SWF file.
    When I try inserting it using the Window component, the game SWF refuses to play at all - it just stops (clicking buttons in the game work, but it goes-to-and-stops instead of go-to-and-play like it's supposed to do). The only other component I could find was called "Loader". Using this doesn't work either, it won't play any of the animation, just like using the "Window" component
    When the game SWF is played by itself (by just double-clicking to open it from Windows Explorer or embedding it in a web page), it works fine.
    Any help how to do this would be appreciated.
    Thanks.

    Hi,
    I'm posting in this thread because my problem seems similar but may be not...
    In my first swf, I'm loading a second swf via loadClip().
    My second swf works well alone but when I try to integrate itself in my first swf I'm losing my events. My events only works on my first swf.
    I'v tried your trick with _lockroot but he doesn't work for me too.
    Is someone have an idea to help me ?
    Thx
    My code is really basic
    First swf:
            var mcloader:MovieClipLoader = new MovieClipLoader();
            var listener:Object = new Object();
            listener.onLoadInit = function (mc:MovieClip){
                main_obj.__preloader.die();
                obj[funct](target_mc, param);
            mcloader.addListener(listener);
            mcloader.loadClip(file_name, __loader);
    Second swf:
        var box:MovieClip = this.createEmptyMovieClip("box"+depth, this.getNextHighestDepth());
        //Draw box
        drawBox(...);
        // Event on Box, Change Alpha and show arrow or not
        box.onRollOver = function() {
            drawBox(...);

  • Inserting flash .swf file into template

    I want to insert a flash file into the right sidebar to appear on all pages of the website.  I know I need to do this via the template.  I think I need to click in the insertion point, then copy the code (make sure the files are in the correct location).   I've done this before with galleries ect..  but not in DW and not from a template.  What's a little confusing is there are 3 templates.  The first is in it's own folder (design template), the other two (theme 01 design & theme 01 design from template) are in the root folder, but the theme 01 design one doesn't seem to be changeale.  Which template should I be working with?
    www.wranglergirl.net
    Thanks from a newbie!  Amy

    Are each of these 'templates' actually DW templates (i.e., are they named with a *.dwt extension)?  If so, then they must all be located within the Templates folder at the root level of the site - it doesn't sound like that is the case.  Also, why do you need three templates?  Finally, which version of DW are you using?  It's likely that you will have to make any links to your Flash element with ROOT relative links to be successful.

  • Inserting swf file into dw vs. creating full site in flash

    I'm updating a website, and am pretty familiar w/html and DreamWeaver, but would like to add some elements of Flash into the site.  I am using Flash CS4.
    What is the advantage and/disadvantage of inserting various swf files into my DW site versus just creating the entire site in Flash; what's the difference in either approach? 
    If I do the latter, do I eventually bring it into DW anyways so that it is an html file?
    Thanks for your help!

    There can be potential issues with Flash content in a web site since the evolution of iStuff led to disallowing Flash content to be displayed.  If you are looking to attract a mobile user base, then going with Flash can be a gamble, especially as you go further on into the future where there will no longer be Flash Player development to parallel the mobile market.
    I have heard that Flash content does not support handicapable design elements that html/css provide for.
    You can always have the web page code check for the availability of the Flash Player, and if not found have alternative content presented instead.
    An issue with having a full Flash site is that it can be less SEO friendly than going with straight html-based designed, although since the Flash content would still reside in an html page there are some measures that can be taken to support SEO concerns.
    For a full Flash site design you would probably not need DW since Flash can generate an html page of its own.
    I recommend you post your questions in the Dreamweaver forum as well.  The reaction there to using Flash content is likely to be harsh, so don't take it personally, but some helpful information might still be gleamed from trying.

  • Insert Photoshop Web Gallery swf file into Dreamweaver

    So i tried to take a shortcut, and created a flash photoshop
    web gallery and placed the "gallery.swf" file into my html file in
    Dreamweaver. However, it is showing a blank white screen (i'm
    guessing it can't find the images?) but when I view it on my hard
    drive, it is working fine, just not in dreamweaver or any browser,
    even after I upload to my server. Any help would be GREATLY
    appreciated!! I've also tried pasting the body html code from
    "index.htm" that photoshop creates, as well as move my image files
    to the root folder where the swf is, but that doesn't work either.
    I have my scripts in the same directory, and not in
    subfolders.

    Kizat727 posted in macromedia.dreamweaver:
    > and the link is
    >
    > www.micromediapubs2.com/dyers/portfolio.html
    That page is very different from the code you posted and I
    know nothing
    about Geoff Stearns' FlashObject code.
    For the above link, I see nothing in the source code that
    attempts to
    load a .swf file. However, it is linking to
    AC_RunActiveCon.js file in
    the wrong place:
    GET /dyers/assets/flash/pages/AC_RunActiveContent.js HTTP/1.1
    Referer:
    http://www.micromediapubs2.com/dyers/portfolio.html
    HTTP/1.x 404 Not Found
    The file is actually here:
    /dyers/Scripts/AC_RunActiveContent.js
    So if you actually do have a page in the dyers/ folder that
    links to a
    .swf file, just make sure the link to the .js file is
    correct.
    Most likely, change this:
    <script src="assets/flash/pages/AC_RunActiveContent.js"
    type="text/javascript"></script>
    to this:
    <script src="Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    Mark A. Boyd
    Keep-On-Learnin' :)

  • Dynamic swf file into dreamweaver cs4

    Good evening to all,
    Can a basic slide show created in Flash cs4 using as2 to load the images dynamically be inserted into a Dreamweaver cs4 page ?
    The swf file shows up but I can't figure out where to put the linking images so the 2 basic "next" and "previous" buttons work ?  
    Thank as always,
    Fred...

    When you load the swf file into the html page, that becomes the swf's reference for loading files.  So if your structure has a folder containing the html file and another folder for the flash file and another folder for the images, as in...
    main_folder...
         - html file
         - flash folder
              - - flash file
         - images folder
              - - image files
    then you need to change where the swf file is looking for the images because when it is in the html page, that is essentially the folder it is trying to get the images to load thru.
    For instance, if you originally tested using Flash with the swf file targeting the images using...
    "../images/imagefile.jpg"
    (or something like that... those dots confuse me at times)
    and the structure is as I described, then when testing in the html file the targeting would need to be changed to...
    "images/imagefile.jpg"
    Just think of the swf file as living in the html file's folder as far as targeting any files it needs to load, because once it is loaded into that page, it has basically moved to that new location.

  • I need to combine 2 swf files into 1 file

    I have a flash template that is controled by basicly 3 files website.swf, text.xml and index.html (there are a lot of supporting files)  When i put a video.swf in the xml file it runs with the website.swf as long as I don't turn on the sound on the video.swf because it will not stop.  So I needed some controls on the video.swf which is the skinunderall.swf, but the file comes in 2 pieces and will not intergrate on the website.swf.  I have about 18 video.swf files and they all need to be controlled by the user on the site.  Is there anyway to combine video.swf and the skinunderall.swf to ONE file with the controls?  I will settle for a start stop button, however once the file starts I can't touch it--it seems.  But I have turn the video.swf into a link and it was clickable.
    I read the captive thing but it seems to be out of date.  Oh yeah and I am a page one (begining) coder.
    Any help?

    Hi,
    "combine 2 swf files into 1 file" is a pretty abstract question. The short answer is - yes, you can, but you need an appropriate  software tool for that. But really it's not clear (for me) how all your files work together exactly. The only what I can derive from your explanation, is that you need to add an interactive control to some SWF files with embedded video, loadable into the main "envelope".
    In general all what you need are:
    - you must have some named mc within your "main" SWF, which will load your video SWF's into itself by loadMovie() function.
    - you need to have some controls (buttons, etc.) in your "main" movie. which will control this mc playback - mc.play(), mc.stop(), etc.
    I'm almost sure it's resolvable problem, but can you upload this template to let us see how it all works now? If you don't wish to disclose it all publically, then you may write to me personally. You can find email address at the bottom of the webpage in my signature.
    FlashDigger
    www.flashdig.com

  • Embedding SWF file into an Indesign document and later export as PDF

    Hi to everybody,
    I am searching now since 3 days for good solution of my problem. First I wanna tell you that the problem is not just to convert a swf-file into a pdf.  I did this many times with all animations, page flip and stuff.My situation is the following:
    I have varios catalogues with  more or less 12 pages each in an indesign format. Now I created an animated scroll down menu, which appears on an "index-page". On the menu I created buttons. One button for each catalogue. So the idea of the whole thing is to open a document and an index page appears where you have the animated menu and you choose the catalogue you wanna see. Until here it is quite easy. I created a swf file of each catalogue with my animations (as the special page turnover e.g.). So that I just need von Object in with I can load the different swf-files of these catalogues. I already did the process. I linked the buttons to the different swf files and so. So the problem is now when it comes to convert the whole thing into a PDF. Of course I convert it first to swf and then to PDF. After converting it to swf it works 100% fine, but in PDF not, suddenly the swf-files of the catalogues disappear.
    So the summary is, that I don't know how to embed swf files into an indesign document, creat buttons and interactions next to swf file, then save it to another swf, and then to a pdf without losing the first swf files within the pdf.
    Hope I made my self clear would be too nice if someone could help me or if someone may have a better idea of realizing the whole project.

    Jeffrey,
    Thank you for the answer. As you have written:
    I will also add that the ID's play mode contol [plays once] [repeat play] does not always control the file once in Acrobat.
    I presume you mean version of ID older than CS4 or version of Acrobat Reader older than 9.1
    It that is the case I will strongly recommend my visitors to upgrade to this version.
    I hope that would work.
    Thanks again.
    Peter

  • Getting .CP or .Swf files into .FLV

    Hello:
    I used Captivate to create 3 e-learning modules. My hope is
    to deliver them via web. When enclosing the SWF files into a web
    page, the application takes **FOREVER** to load (3 minutes). So,
    after looking into retaining a streaming web host, I discovered
    that I need an .FLV file to stream adequately.
    Exporting my .CP files to Flash 8 results in drastically
    degraded quality and un-synched audio and animation. Exporting the
    .FLA file to .AVI is even worse. I can't seem to de-compile my .CP
    file to any other Flash application in a way that maintains the
    qualtiy. The SWF files are beautiful, but they can't be used to
    stream.
    Does anybody have any answers?

    Hi, TriSys G!
    If I'm understanding "lightning speed" playback of embedded
    .swfs, it sounds like a frames per second (fps) mismatch. By
    default Adobe Captivate records and plays back at 30 fps. However,
    if the .swf you are inserting as animation was created at a
    different fps rate, you can end up with the scenario you outline.
    The best solution would be to go back to the original
    developer of the .swf and have them re-compile at 30 fps. Of course
    the developer may not be available.
    The alternative is to go the other way. If you know the fps
    of the swf you are embedding, you can adjust your movie's frame
    rate to match the .swf. Here's the command path for that:
    Project>>Preferences>>Preferences>>Frames Per
    Second.
    BTW, since this thread was created to answer a different
    question, next time I'd suggest create a new topic so we can see
    more quickly
    john

  • Can I insert the image file into PDF file  in Adobe X Standard ?

    can I insert the image file into PDF file in Adobe X Standard ?

    http://matt.coneybeare.me/how-to-make-an-html-signature-in-apple-mail-for-maveri cks-os-x-10-dot-9/

  • How to insert a swf file in to flex..

                   hi all
    i'm trying to insert a swf file in my flex. I'm trying to insert a help manual e-book to my flex application,
    i dont have any idea in flex... i have some 1 month experiance in flex...
    so plzzz help me...

    Are you just looking to load an external swf into your flex application? Are there any requirements where the external swf has to be stored like on a different domain or can it be packaged with your Flex app?

  • Unable to convert swf files into fla files

    Hi,
      I tried using Dreamweaver to convert a SWF file into a FLA file so I can edit it in CS 5.  But when I right clicked the placeholder for the file, it doesn't have an "Edit in Flash"  option. What am I doing wrong?
    Thanks very much,
    Rosemary    

    According to http://help.adobe.com/en_US/flash/cs/using/WSd60f23110762d6b883b18f10cb1fe1af6-7f12a.html# WSc78c5058ca073340dcda9110b1f693f21-7acf
    asset is reflected in Flash immediately. 
    Edit a SWF file from Dreamweaver in Flash
    If you have both Flash and Dreamweaver installed, you can select a SWF file in a Dreamweaver document and use Flash to edit it. Flash does not edit the SWF file directly; it edits the source document (FLA file) and re‑exports the SWF file.
    In Dreamweaver, open the Property inspector (Window > Properties).
    In the Dreamweaver document, do one of the following: 
      Click the SWF file placeholder to select it; then in the Property inspector click Edit.
      Right-click (Windows) or Control-click (Macintosh) the placeholder for the SWF file, and select Edit With Flash from the context menu. 
    Dreamweaver switches the focus to Flash, and Flash attempts to locate the Flash authoring file (FLA) for the selected SWF file. If Flash cannot locate the Flash authoring file, you are prompted to locate it."
    But I don't see "Edit with Flash" option.  Maybe because I have a trial version of Dreamweaver?

  • When I try to open iweb I get the following message: Can't open file "~/Sites/NAVIGATOR/index.html." How do I fix this? Using 10.6.3 soon to be 10.6.6 and then Lion.

    When I try to open iweb I get the following message: Can’t open file “~/Sites/NAVIGATOR/index.html.” How do I fix this? Using 10.6.3 soon to be 10.6.6 and then Lion. I have never opened the product before and have had it on the computer since new.

    Go into your Users/Home/Library/Application Support/iWeb folder and see if there's a file titled Domain.sites.  If there is double click on it and see if iWeb opens.
    If there is no Domain file there do the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    OT

  • Can I combine two methods of code to load various SWF files into the same location

    I presently have a set up where a large SWF file brought on the stage by clicking small icons from the scrollable thumbnail menu on the bottom of the stage. All of it happens at the same frame with .xml loading file.
    Here is the code for constructing the ImageLoader(for thumbnails) and SWFLoader for (bigger SWF files)
    [CODE]
       function _xmlCompleteHandler(event:LoaderEvent):void {
       _slides = [];
       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
       var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
       //loop through each <image /> node and create a Slide object for each.
       for each (var image:XML in imageList) {
        _slides.push( new Slide(image.@name,
              image.@description,
              new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
                   name:image.@name + "Thumb",
                   width:_THUMB_WIDTH,
                   height:_THUMB_HEIGHT,
                   //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                   //x:260, y:320,//doesn't work here but works in line 69
                   scaleMode:"proportionalInside",
                   bgColor:0x000000,
                   estimatedBytes:13000,
                   onFail:_imageFailHandler}),
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
                    name:image.@name + "Image",
                    width:_IMAGE_WIDTH,
                    height:_IMAGE_HEIGHT,
                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                    x:0, y:144,
                    scaleMode:"proportionalInside",
                    bgColor:0x000000,
                    estimatedBytes:820000,
                    onFail:_imageFailHandler})
    [/CODE]
    Here is what I would like to resolve. I have another section on the site with an image collage. Every image is a button. I want to script this each image on click to go to the label with ImageLoader and SWFLoader AND TO OPEN A UNIQUE SWF (ASSOCIATED WITH AN IMAGE CLICKED) ON THAT PAGE
    Previously this is what I did to achieve it. I would specify a String:
    [CODE]
    var sourceVar_ProductsPopUps:String;
    [/CODE]
    and then all my buttons will have their unique SWF assigned for them which opens at another labeled section ("prdctsPopUps" in this example):
    [CODE]
    function onClickSumix1PopUp(event:MouseEvent):void {
      sourceVar_ProductsPopUps="prdcts_popups/sumix1-popup_tl.swf";
      gotoAndPlay("prdctsPopUps");
    [/CODE]
    Then in the "prdctsPopUps" section I would specify that var string to bring up SWF files. The value of sourceVar_ProductsPopUps allows to load mulitple SWFs from the previous page.
    [CODE]
    loaderProductPopUps = new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]
    But I need both of them to be working at the same time. First there is a sectionA from where a user can navigate to specifically targeted SWF to section B's SWFLoader. Then in the section B a user has an option to bring up other SWF files into SWFLoader from the scrollable thumbs menu. Is there a way to combine these two lines into one:
    [CODE]
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
    [/CODE]
    and
    [CODE]
    new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]

    Thanks for looking into my issue.
    Unfortunatelly I am not so advanced in AS and do not complitely understand the logic of the problem. I will try to decribe my set up more precise.
    So, my main flash file is broken into labeled sections on the main time line.
    One of the sections is "Applications" It has an animated collage of images. Each image acts as a button and once clicked brings a user to a section called "ApplicationsPopUps".
    "ApplicationsPopUps" section has small image thumbnails scroll menu at the bottom of the screen and a large SWFLoader in the middle of the screen. User can click on an image in the thumbnails scroll menu and a corresponding SWF file will load in the middle of the screen in SWFLoader. User can click on left/right navigation buttons and preceeding/following SWF file will load in SWFLoader.
    Everything works fine (with your previous help)
    Here is the working code for the ImageLoader and SWFLoader (please let me know if you need additional code on the page):
    function _xmlCompleteHandler(event:LoaderEvent):void {        _slides = [];       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.        var imageList:XMLList = xml.image; //In the XML, we have  nodes with all the info we need.        //loop through each  node and create a Slide object for each.       for each (var image:XML in imageList) {         _slides.push( new Slide(image.@name,               image.@description,               new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",               {                    name:image.@name + "Thumb",                    width:_THUMB_WIDTH,                    height:_THUMB_HEIGHT,                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                    //x:260, y:320,//doesn't work here but works in line 69                   scaleMode:"proportionalInside",                    bgColor:0x000000,                    estimatedBytes:13000,                    onFail:_imageFailHandler}),                 new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",                   {                     name:image.@name + "Image",                     width:_IMAGE_WIDTH,                     height:_IMAGE_HEIGHT,                     //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                   x:0, y:144,                     scaleMode:"proportionalInside",                     bgColor:0x000000,                     estimatedBytes:820000,                     onFail:_imageFailHandler}) 
    Thumbnails in the section "ApplicationsPopUps" and images in the image collage in the section "Applications" represent the same photographs. So when a user clicks on one of the images in "Applications" section it would be natural that that image will load in the "ApplicationsPopUps" section. However "ApplicationsPopUps" section presently has a working code (as sampled above) It looks too complex for me and I do not know hot to implement this feature. I do want to keep the functionality of the thumbs image scroller in section "ApplicationsPopUps" as it is now. But I want to add that when a user click on an image from section"Applications" then that particular SWF file will load in SWFLoader in section "ApplicationsPopUps" and then the present functionality can as well be exectuted. Presently it just opens on a first image in xml order.
    P.S. I see that you had a download link in your answer. How did you do it? I could also upload a small sample file with my problem. This way you could see all the set up right away.

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

Maybe you are looking for

  • Animated Gif Image does not render correctly on screen

    I have added animated gif image to the scene it does not render correctely.it shakes on the screen. plz give me any suggestion i use following code Image logo= new Image(getClass().getResourceAsStream("images/image.gif")); logoLabel.setGraphic(new Im

  • Error while doing GR against PO

    Hi I am doing a third party scenario. I created a sales order with item category as TAS. I created PO against the PR. When I am doing GR against PO, I am getting a error " Purchase order 4500018781 has no items" . What could be the reason ? Is this p

  • Servlet executes only once, the first time???

    Hello evrybody, I'll try to be specific regarding the problem. I have an HTML file called Login.html. When I click on this file, a page opens allowing the user to enter his/her username and password. So, I compiled my servlet and I clicked on the Log

  • Qosmio G40: No sound on Windows Media player under Vista

    Hi, the last week or so the sound has gone on my Windows Media player, but only on my Tv Tuner and DVD, the files from the hard drive are not affected. Everything was ok at the start but now it does even make the startup sound. I have tried configuri

  • Help Nokia 7610 will not ring

    Hi hope some one can help me, my phone wont ring the only way I know someone is phoning me is when the phone vibrates, I think it has something to do with real player because my music wont work and the videos I have on the phone have no sound either.