Jquery or code for Image loading on Sp Gridview Pager(Next ,Prev) click functionality on sharepoint 2010

Jquery or dynamic code for Image loading on Sp Gridview Pager(Next ,Prev) click functionality on sharepoint 2010.
i have a dynamic SP gridview contains Previous and next
buttons for paging.
page doesn't contain Update panel.
grdXRPSUsers.PagerSettings.Mode = PagerButtons.NextPrevious;
grdXRPSUsers.PagerSettings.PreviousPageText = "< Previous Page";
grdXRPSUsers.PagerSettings.NextPageText = "Next Page >";
grdXRPSUsers.PagerSettings.FirstPageText = "First Page";
grdXRPSUsers.PagerSettings.LastPageText = "Last Page";
When i click on Next or Previous page in the gridview it will take more time and showing progress bar in th below.
As per my client request, i need to change the
progress bar to Loading image (Wheel at middle of the grid at fething time).
How its possible either through jquery or Programming(code behind).
Please help

Hi,
According to your description, my understanding is that  you want to add loading image when click the paging button to load the data.
I suggest you can use Jquery BlockUI Plugin to show a block image when loding data in paging click event.
Here is a similiar thread for your reference:
How to display a loading image until a gridview is fully loaded
More information:
Jquery BlockUI Plugin
Thanks
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • Jsp code for image compression

    Hai,sir this is surendra i am doing a project using jsp and mysql.
    In that each user can put his image and i am storing that image in mysql blob but that results to that database size.
    So i need jsp code for image compression or another way for storing images.

    There's no need to store images in db. You may store them in a dedicated folder.

  • This is my Jsp code for image upload in database:

    This is my Jsp code for image upload in database:
    -----------Upload.jsp----------------
    <html>
    <head>
    </head>
    <body bgproperties="fixed" bgcolor="#CCFFFF">
    <form method="POST" action="UploadPicture.jsp" enctype="multiform/form-data">
    <%! int update=0; %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.sql.Date" %>
    <%@ page import="java.io.*"%>
    <%@ page language = "java" %>
    <%
    try
    String ct="3";
    String path;
    File image=new File(request.getParameter("upload"));
    path=request.getParameter("upload");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:itPlusElectronics","","");
    PreparedStatement pstmt=con.prepareStatement("insert into graphics values(?,?,?)");
    pstmt.setString(2,path);
    pstmt.setString(3,ct);
    InputStream is=new FileInputStream(path);
    pstmt.setBinaryStream(1, is, (int)(image.length()));
    int s=pstmt.executeUpdate();
    if(s>0)
    out.println("Uploaded");
    else
    %>
    unsucessfull
    <%}
    is.close();
    pstmt.close();
    catch(Exception e)
    }%>
    </p>
    <p><br>
    <img src="UploadedPicture.jsp">image</img>
    <p></p>
    </form>
    </body>
    </html>
    My database name is itPlusElectronics and the table name is "graphics".
    I have seen as a result of the above code that the image is stored in database as "Long binary data". and database table is look like as follows-------
    picture path id
    Long binary data D:\AMRIT\1-1-Picture.jpg 3
    To retrive and display i use this JSP code as--
    ------------------------UploadedPicture.jsp------------------------------
    <html>
    <head>
    </head>
    <body bgproperties="fixed" bgcolor="#CCFFFF">
    <%! int update=0; %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.io.*"%>
    <%@ page language = "java" %>
    <%@page import="javax.servlet.ServletOutputStream"%>
    <%
    try
    String path;
    path=request.getParameter("upload1");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:itPlusElectronics","","");
    PreparedStatement pst = con.prepareStatement("SELECT * FROM graphics WHERE id ='3'");
    // pst.setString(3, id);
    ResultSet rs = pst.executeQuery();
    path=rs.getString("path");
    if(rs.next()) {
    byte[] bytearray = new byte[4096];
    int size=0;
    InputStream sImage;
    sImage = rs.getBinaryStream(1);
    response.reset();
    response.setContentType("image/jpeg");
    response.addHeader("Content-Disposition","filename=path");
    while((size=sImage.read(bytearray))!= -1 )
    response.getOutputStream().write(bytearray,0,size) ;
    response.flushBuffer();
    sImage.close();
    rs.close();
    catch(Exception e)
    %>
    </body>
    </html>
    Now after browsing a jpg image file from client side and pressing submit button ;
    I am unable display the image in the Upload.jsp file.Though I use
    <img src="UploadedPicture.jsp">image</img> HTML code in Upload.jsp
    file .
    Now I am unable to find out the mistakes which is needed for displaying the picture in the Upload.jsp page..
    If any one can help with the proper jsp code to retrive and display the image ,please please help me !!!!!!!!!!!!!!!!!!!!!!!!!!

    dketcham wrote:
    cotton.m wrote:
    >
    2) I'm looking at how you called stuff, and you're trying to call the jsp file as an image? That jsp isn't the source of the image, just a page linking to an image. I think if you really want to do things that way you're going to need to just include that jsp within the jsp you're calling it from (or you can do it the easy way, and if you have the information to get the path of the image you want, you could simply call the image from the first jsp you posted)This is incorrect.
    There are two JSPs. The second when called will (if it worked) return the source of an image as stored in the database.even when called with <img src=xx.jsp>??
    Yes.
    If any of what I say next seems obvious or otherwise negative I apologize, just trying to explain and I don't know what you know vs what you don't.
    The link in the src is just a URL not a filetype. So just because it ends with JSP does not mean it has to return HTML. The content type is determined by the browser using the Content-Type header returned by the server in the HTTP response. In this case the header is set to be a jpeg so that's what the browser will attempt to interpret the content part of the response as.
    So in fact one is not limited to just HTML or images but whatever content type you would like to return (that the browser can understand anyway). This could be HTML or it could be an image of some type or it could be a PDF or it could be an Excel spreadsheet. All you have to do in the JSP is set the header appropriately and then send content that is actually in that format.
    This does not just apply to JSP by the way but all other web programming languages. You can do similar things to produce the same results in PHP, Perl, ASP etc.
    The only JSP/Servlet complication is whether or not doing this in a JSP is a "good" idea but I am not an expert enough at that to make a definitive statement. Mostly though JDBC in a JSP is a no-no.

  • ABAP code for Hierarchy Loading from Flat File

    Hi,
    Can anyone give me some idea / ABAP code for generating parent - child relationships (NODEIDS) from a flat file and load into BW.
    Best regards
    Any insight into this development is highly appreciated

    Hi,
    also have a look at this how to to get informations about the file structure:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    /manfred

  • Help Needed with HTML code for Image Positioning

    Hi All,
    Need a little help with some code for positioning images.
    I initially used the following:
    This is fine, but the border automatically puts a black border around the photo - how do I change it to white? Is there a way to set margins too, to prevent the text butting up against the photo?
    I also used the following code with success:
    <style type="text/css"
    img
    float:right;
    border:2px solid white;
    margin: 0px 0px 15px 20px
    </style>
    This code works, however the problem with it is it is not individual to just one photo - it moved all my photos and on that page, I wanted one photo floated to left and another to the right.
    If I use this code, how can I make it photo specific, so that it only affects the placement, margins and borders of one photo?
    Any help would be great.
    Thanks

    CSS question, not iWeb question. Regardless, use inline CSS styling for the image. You can also wrap the image in its own tag and declare an id or simply declare an id for the img tag, then set the style for the id_name:
    <style type="text/css"
    img#id_name
    float:right;
    border:2px solid white;
    margin: 0px 0px 15px 20px
    </style>
    If you want to control the style of more than one image on a page but not all then use a class instead of an id.
    the border automatically puts a black border around the photo - how do I change it to white? Is there a way to set margins too, to prevent the text butting up against the photo?
    I believe you have discovered a solution for this according to your CSS code. You have set the border to white by looking at the code and adjusting it appropriately. Your margin is declared in the CSS also, adjust the pixels appropriately.
    Read up some more on CSS to educate yourself further. I suggest w3schools.com or a CSS forum instead of the iWeb forum if you have CSS questions. It's kind of like if you drive your auto to the supermarket so you decide to go to the supermarket and ask everyone in the produce section to help when you have car problems. All the supermarket does is provide a place to park your auto. If you have car problems then ask a mechanic. iWeb (and most of its users) doesn't specialize in code, it simply provides an area for you to place it. Granted you might get lucky and find a mechanic in the produce section of the supermarket, but you're more likely to find a specialist at an auto swap meet (or CSS coding forum)!

  • Code for image swap of sprite images that works on retina screens (@2x)

    Hello,
    I'm having difficulty finding code (javascript, jquery or css) that will successfully swap-out lower-res sprite images for higher-res sprite images "@2x" intended for retina screens. I'm using DWCC/HTML5/CSS3. Can anyone make a recommendation?
    Thanks for your help!

    Does this help you?
    http://css-tricks.com/snippets/css/retina-display-media-query/
    Nancy O.

  • Code for image shadow effect

    iWeb creates very nice shadows. Is it a separate image created on the fly or some javascript? Is there any way to get the code that generates that effect? I'd like to extend it to other pages that weren't made in iWeb.
    Thanks in advance.
    Mike

    OK. Here's the solution for anyone interested. A couple of warnings first though: Apple has a naming scheme with the shadows. If you rename "shadow_1" to "shadow_pocket", for example (even if you change it in the HTML file too, it won't work.
    If you saw the code I posted last time, you know how to use one type of shadow. The code below is a javascript file that allows 3 different shadows. Be careful to put braces and parenthesis in the right places. Javascript is a very sensitive language. You can use divs to enclose the images you want to add the shadow effect to. The divs need to have class="tinyText shadow_X", where X is the kind of shadow you want.
    On to the offset… This was actually very easy. It is found in the Javascript below "IWPoint(0.0000,1.0000)". In that example, it literally means that the shadow is offset 1 pixel downward and no horizontal offset. It's a simple (x,y) coordinate system where x and y are the pixel increments from the original image.
    The Javascript code:
    setTransparentGifURL('Media/transparent.gif');function applyEffects()
    {var registry=IWCreateEffectRegistry();registry.registerEffects({shadow_1:new IWShadow({blurRadius:2,offset:new IWPoint(0.0000,1.0000),color:'#000000',opacity:1.000000}),shadow_2:new IWShadow({blurRadius:5,offset:new IWPoint(0.0000,2.0000),color:'#000000',opacity:1.000000}),shadow_0:new IWShadow({blurRadius:5,offset:new IWPoint(0.0000,2.0000),color:'#000000',opacity:1.00000})});registry.applyEffect s();}
    function hostedOnDM()
    {return false;}
    function onPageLoad()
    {loadMozillaCSS('Blank_files/BlankMoz.css')
    fixAllIEPNGs('Media/transparent.gif');applyEffects()}
    Apple has done incredible work on these JavaScript libraries. So, anyone that wants to add beautiful shadows to their images will find these posts helpful.
    Thanks for your help too Old Toad.
    Mike

  • Inserting "if then" code for images

    Hi All,
    I am wanting to do some email marketing and customizing the email to particutlar individuals. ie a female would get a certain image and a male a different one, as well as I have multipule locations that I would like to put their particular store address on.
    I am using an Access Database.
    Feilds are set up with 1's, 2's depending on gender.
    What coding would I use?
    Thanks in advance
    David

    How are you getting the information from this database into ID?
    You probably want to do the logic on the database end. For exmple if you are saving a .csv file from the database, use the if statement to populate a field with the path to one or the other image. Data Merge can use that path info to place an image, and I would expect that xml or one of the catalog plugins could be setup to do the same.

  • Code for Embedding Quicktime Movies in Web Pages-Question

    I have been embedding QT movies in web pages for years. I used to use the embed and object tags, but due to the problems with the default settings of IE7, in regards to ActiveX, I recently changed to the javascript method.
    I will paste sample code below, of how I use it, with the movie title change to sample: (of course I change the dimensions, depending on the movie size.)
    <script language="JavaScript" type="text/javascript"><!--
    QT_WriteOBJECT('sample.mov', '644', '76','','controller','true','autoplay','true','showlogo','true','cache','false' ,'enablejavascript','true');
    // --></script>
    and I put at the top of the page, right before </head>
    <script src="AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>
    I forgot where I got this code. Perhaps from someone on this forum, or elsewhere. It seems to work with the default settings on most browsers.
    I have a couple questions, however, regarding fine-tuning it a little more.
    1) If it takes a while for the movie to load, users who open my pages see a static Q QT icon. How would one make the icon flash, with flashing text that says "Loading", so that the user knows that the video is loading? (I have seen that on other sites, and don't know how to do that.)
    2)As said the javascript works with most browser default settings, as most have javascript enabled by default. But what if a user does not have javascript enabled? Could the code sense that, and if non-existent, tell the user to enable javascript? Or, if javascript is disabled, could the embed and/or object tags be activated?
    3) The code above, that I got from someone, says "cache=false". That means that each time someone sees the movie, it has to be reloaded from the net, and not from the browser cache, correct? If so, why would one want it to be set that way? If it's a large movie, a user with a slower computer and/or internet connection would certainly prefer if it could play from the cache the next time, loading much faster. Is there any reason to prefer "cache=false"?
    4)Is there any code that could be put in, to allow the user, if they prefer, to download the file,(perhaps with a right-click or CTRL-Click), instead of playing it in the browser?
    Thank you very much in advance, to whomever can help with these code questions.

    Thank you for your reply, Kirk,
    1)Yes, I do have "fast start" enabled in my files, and they were made with QT Pro, newest version. So no, there is no "trouble with my files".
    However, I would still like to have that flashing "Loading" icon when the file is loading, as I see on other sites. (And yes, even with "Fast Start" enabled, depending on the size of the file, the speed of the computer and internet connection, it can take a little time beforeit starts.) Anyone know how to create that flashing "Loading" icon, rather than just the static Q?
    2)I just wondered if there was a way for the javascript to recognize if the user does not have javascript, and bring up a message if that is the case, telling the user they need to enable it to see the content. (As would happen if the user does not have the QT plugin installed.) Yes, I realize it would not work to include in the normal way the embed and object tags as well, I wondered if there was a way to invoke them only if the user doesn't have javascript. Perhaps impossible, but I thought I'd ask, in case someone knows of a way to do that.
    4)Yes, I guess I could just put a separate direct text link to the movie file for downloading. I just wondered if there was a way to put that in the javascript, so that if someone right-clicks on the QT icon, they can download rather than view it, rather than use a separate link. That may also be impossible, but I thought I'd ask, and see if there is a way to do that.
    Your question to me regarding dimensions--I forget which was the QT movie, that I took that sample from. Yes, I have some in unusual sizes. They are not normal movies. I don't have time to explain more now though, and that has no bearing on the questions I asked.
    Once again, thanks for replying, and if you or someone else could help further with my questions, I would appreciate it very much.
    Have a nice day!

  • Please give the complete code for the below problems with action page and Form.

    Create an array, which is holding ‘n’ strings (words), , and implement the functionality to search given string  is present in the array. Give an option to the user to enter the word  to be searched
    Create a static array of ‘n’ numbers , and implement the functionality to search given number is present in the array. Give an option to the user to enter the number to be searched
    Implement the functionality to search given word is present with in the predefined sentence. Give an option to the user to enter the word  to be searched

    As haxtbh has pointed out, these forums are for HELPING you fix code you've already tried and are having issues with.  We aren't here to write your code, whether for a project or homework, from scratch.  We can only help you if you help us by making an attempt.
    V/r,
    ^_^

  • Code for tabkey???  to enter  next input(jTextPane)

    hi,
    In my application i have 4 JTextpanes
    if i entering some text to one of the 4 JTextPane then if i have to go to next JTextPane by pressing tab key ...
    How this could be done???
    Any Idea??
    Help me out
    Thanx in advance
    Shanthy

    JTextPane is a 'Styled Text Area' so tab is assumed as a part of text.
    Use [Ctrl + Tab] to move from one JTextPane to another.

  • Export to Excel is not working for List View Web Part after filtering using Query String parameters in SharePoint 2010

    Hi, 
    I am filtering SharePoint list view web part based on Query string parameter and I am doing Export to Excel by using following code.
    <a href="#" onclick="javascript:window.location='../_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=0DC67399-BE11-48F3-ADFC-E911FB8B5845&View=54671412-3EFE-4281-835A-9EF747AE774E&CacheControl=1'"><img
    alt="Excel" src="/_layouts/images/icxlsx.gif" border="0"/>&nbsp;Export to Excel</a>
    Issue: Able to do Export to Excel when there are no filters applied on list view web part but if applied filters on web part and do export to excel , only header fields are displaying in the excel sheet.
    I don't know why owssvr.dll is behaving like that .
    Please share your ideas.
    Thanks in Advance.

    Hi,
    According to your post, my understanding is that you wanted to create hyperlink to export to excel.
    The URL to execute the export is as follows:
    {Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1
    After getting the GUID, you  need to “decode” the list GUID.
    Replace %7B with {
    Replace %2D with –
    Replace %7D with }
    More information:
    Create Link to Export Library Contents to Excel
    SharePoint - Create a link to export to Excel
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • On file open: "This document contains JavaScript code for a widget that no longer exists."

    I had an existing, functional datepicker in a web page.
    Recently I downloaded the UI Datepicker in the Widget Browser and installed it in DW CS5. Now every time I load the file that calls the datepicker that I added myself, a warning opens with the following text:
    This document contains JavaScript code for a widget that no longer exists. If you don't remove the code, the browser might display JavaScript errors when loading the page. Would you like Dreamweaver to find all instances of this code for you?
    Widget: $("#reservDateBegin").datepicker();
    Widget: $("#reservDateEnd").datepicker();
    Clicking "Yes" opens the file and shows the search box at the bottom of the window with [current document] in File and $("#reservDateEnd").datepicker(); in Matched Text. Clicking "No" just opens the file.
    The error is wrong, since installing the widget is what caused the error in the first place!
    How can I get DW to stop showing this message?
    Thanks for any help.

    I do understand you're trying to be helpful. I was just hoping providing the relevant code snippets would be sufficient so I didn't have to take the time to provide a "cleaned" version of the files and upload those to a public-safe location.
    Zabeth69 wrote: If you don't understand what 'code at the bottom of the page' means, you have not used one of those systems. I don't know what causes the error code to come up (besides removing a Spry widget, I mean). So if it doesn't apply to you, ignore it.
    This is exactly my point: I haven't used any of the DW "systems". I've always manually coded in DW, so I can't have removed a Spry widget in the first place. It wasn't until I installed the Widget using the Widget Browser that I started getting the error (I don't mean adding the datepicker widget to the code using the DW Insert menu - I mean installing the Widget into DW itself). Ignoring such an erroneous/incorrect error seems kind of silly, since every time I open the file I get the error message.
    Anyway, as requested, the following are links to the contactUsCleaned.php page, and the php included headerCleaned.php file. Since these use php includes to complete the rendered HTML, they won't look right in the browser, but as you know viewing the source will show the relevant html, javascript, and jquery code. I didn't see any way to upload the files in this forum, which, due to the php code, would be preferable to see exactly what my code looks like...
    http://www.eventidewebdesign.com/public/contactUsCleaned.php
    http://www.eventidewebdesign.com/public/headerCleaned.php
    The footer.php file the contactUs page includes is simply a set of HTML links to the pages on the site, copyright info, and the Google Analytics script. There is no other code in the footer.php file.

  • No Action Until Image Loads, Please

    Hi;
    For some reason the squares of color that are supposed to load behind the image that acts as a mask load first, momentarily showing while the image loads, which looks bad. Hre is the code:
    package
        import flash.display.Sprite;
        import flash.text.TextLineMetrics;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFormatAlign;
        import flash.text.TextFieldAutoSize;
        import flash.net.navigateToURL;
        import flash.display.Bitmap;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.display.MovieClip;
        import com.greensock.*;
        import com.greensock.easing.*;
        import flash.display.Loader;
        import flash.events.ProgressEvent;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFieldAutoSize;
        import flash.net.URLRequest;
        import Images;
        import flash.display.SpreadMethod;
        [SWF(backgroundColor="0x505050")]
        public class BillsBBQPreloader extends MovieClip
            var loader:Loader = new Loader();
            var loader2:Loader = new Loader();
            var loader3:Loader = new Loader();
            var loader4:Loader = new Loader();
            var loader5:Loader = new Loader();
            private var myTextField:TextField = new TextField();
            var imgFlag1:Boolean = new Boolean(false);
            var imgFlag2:Boolean = new Boolean(false);
            var imgFlag3:Boolean = new Boolean(false);
            var imgFlag4:Boolean = new Boolean(false);
            var imgFlag5:Boolean = new Boolean(false);
            var thermometer:Images = new Images();
            var thermometerMask:Images = new Images();
            var mask_container:Sprite = new Sprite();
            var square:Sprite = new Sprite();
            public function BillsBBQPreloader()
                addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
            private function init(e:Event)
    //            addChild(mask_container);
    //            mask_container.addChild(thermometerMask);
                addChild(square);
                AddThermometer();
            private function AddText():void
                var clientName:TextField = new TextField();
                var format:TextFormat = new TextFormat();
                format.font = 'Arial';
                format.size = 35;
                clientName.textColor = 0x023048;
                clientName.text = "Bill's Texas Pit BBQ";
                clientName.autoSize = TextFieldAutoSize.LEFT;
                clientName.setTextFormat(format);
                var nameSprite:Sprite = new Sprite();
                nameSprite.x = stage.stageWidth/2 - 150;
                nameSprite.y = 10;
                nameSprite.alpha = 0;
                TweenLite.to(nameSprite, 2, {alpha:1});
                addChild(nameSprite);
                nameSprite.addChild(clientName);
                AddWhite();
            private function AddThermometerMask():void
                thermometerMask.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, 23];
                AddRed();
            private function AddWhite():void
                square.graphics.beginFill(0xffffff);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(100,0);
                square.graphics.lineTo(100,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-100)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddRed();
            private function AddRed():void
    //            square.mask = mask_container;
                square.graphics.beginFill(0xff0000);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(75,0);
                square.graphics.lineTo(75,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-74)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddLoaders();
            private function AddThermometer():void
                thermometer.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, (stage.stageHeight-458)/2];
                addChild(thermometer);
    //            AddThermometerMask();
                AddText();
            private function AddLoaders():void
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
                loader.load(new URLRequest("images/logo_w_fire.png"));
                loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
                loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2);
                loader2.load(new URLRequest("images/tpwebbaseline.jpg"));
                loader3.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded3);
                loader3.load(new URLRequest("images/tpdplatebgwflame.jpg"));
                removeEventListener(Event.ADDED_TO_STAGE, init);
                addChild(myTextField);
                myTextField.width = 250;
                myTextField.x = (stage.stageWidth-50)/2;
                myTextField.y = 470;
                myTextField.selectable = false;
                myTextField.border = false;
                myTextField.borderColor = 0xAA0000;
                myTextField.autoSize = TextFieldAutoSize.LEFT;
                var myFormat:TextFormat = new TextFormat();
                myFormat.color = 0x023048;
                myFormat.size = 24;
                myFormat.italic = true;
                myTextField.defaultTextFormat = myFormat;
            private function imageLoaded(event:Event):void
                imgFlag1 = true;
                if (imgFlag2 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded2(event:Event):void
                imgFlag2 = true;
                if (imgFlag1 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded3(event:Event):void
                imgFlag3 = true;
                if (imgFlag1 == true && imgFlag2 == true)
                    completePreloader();
            function completePreloader()
                var req:URLRequest = new URLRequest('index.py');
                navigateToURL(req, '_self');
            function loop(e:ProgressEvent):void
                var perc:Number = e.bytesLoaded/e.bytesTotal;
                myTextField.text = Math.ceil(perc*100).toString() + "%";
                var myY:Number = ((stage.stageHeight+458)/2)-83-(3.75*perc*100)
                square.y = myY;
    Here's the code for Images()
    package  {
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.display.Bitmap;
        import flash.display.BitmapData;
        import flash.filters.*;
        import flash.filters.BitmapFilterQuality;
        import flash.net.URLRequest;
        import flash.net.URLLoader;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.DisplayObject;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        public class Images extends MovieClip
            private var parent_container:Sprite = new Sprite();
            private var _path:String = new String("path");
            private var _myWidth:Number = new Number(20);
            private var _myHeight:Number = new Number(20);
            private var _myX:Number = new Number(20);
            private var _myY:Number = new Number(20);
            private var _myURL:String = new String("url");
            public function Images():void
            public function set ImagesArray(_imagesArray:Array):void
                _path = _imagesArray[0];
                _myURL = _imagesArray[1];
                _myWidth = _imagesArray[2];
                _myHeight = _imagesArray[3];
                _myX = _imagesArray[4];
                _myY = _imagesArray[5];
                LoadImage();
            function LoadImage():void
                parent_container = new Sprite();
                addChild(parent_container)
                var req:URLRequest = new URLRequest(_path);
                var loader:Loader = new Loader();
                loader.load(req);
                loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);         
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadedImage);
            function LoadedImage(e:Event):void
                var loaderInfo:LoaderInfo = e.target as LoaderInfo;
                var displayObject:DisplayObject = loaderInfo.content;
                displayObject.width = _myWidth;
                displayObject.height = _myHeight;
                parent_container.addChild(displayObject);
                parent_container.x = _myX;
                parent_container.y = _myY;
            function ioErrorHandler(event:IOErrorEvent):void {
                trace("ioErrorHandler: " + event);
    I have experimented with adding the square child elsewhere (such as in the code where it is created twice), but that proves even more disastrous. Please advise.
    TIA,
    Beno

    Oops. I realize now you guys showed me how to do this; namely dispatchEvent(). (This was a problem I set aside while we solved the one that addressed this issue.) Here is the revised code which accomplishes what I wanted:
    package
        import flash.display.Sprite;
        import flash.text.TextLineMetrics;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFormatAlign;
        import flash.text.TextFieldAutoSize;
        import flash.net.navigateToURL;
        import flash.display.Bitmap;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.display.MovieClip;
        import com.greensock.*;
        import com.greensock.easing.*;
        import flash.display.Loader;
        import flash.events.ProgressEvent;
        import flash.text.TextField;
        import flash.text.TextFormat;
        import flash.text.TextFieldAutoSize;
        import flash.net.URLRequest;
        import Images;
        import flash.display.SpreadMethod;
        [SWF(backgroundColor="0x505050")]
        public class BillsBBQPreloader extends MovieClip
            var loader:Loader = new Loader();
            var loader2:Loader = new Loader();
            var loader3:Loader = new Loader();
            var loader4:Loader = new Loader();
            var loader5:Loader = new Loader();
            private var myTextField:TextField = new TextField();
            var imgFlag1:Boolean = new Boolean(false);
            var imgFlag2:Boolean = new Boolean(false);
            var imgFlag3:Boolean = new Boolean(false);
            var imgFlag4:Boolean = new Boolean(false);
            var imgFlag5:Boolean = new Boolean(false);
            var thermometer:Images = new Images();
            var thermometerMask:Images = new Images();
            var mask_container:Sprite = new Sprite();
            var square:Sprite = new Sprite();
            public function BillsBBQPreloader()
                addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true);
            private function init(e:Event)
    //            addChild(mask_container);
    //            mask_container.addChild(thermometerMask);
                AddThermometer();
            private function AddText():void
                var clientName:TextField = new TextField();
                var format:TextFormat = new TextFormat();
                format.font = 'Arial';
                format.size = 35;
                clientName.textColor = 0x023048;
                clientName.text = "Bill's Texas Pit BBQ";
                clientName.autoSize = TextFieldAutoSize.LEFT;
                clientName.setTextFormat(format);
                var nameSprite:Sprite = new Sprite();
                nameSprite.x = stage.stageWidth/2 - 150;
                nameSprite.y = 10;
                nameSprite.alpha = 0;
                TweenLite.to(nameSprite, 2, {alpha:1});
                addChild(nameSprite);
                nameSprite.addChild(clientName);
                AddWhite();
            private function AddThermometerMask():void
                thermometerMask.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, 23];
                AddRed();
            private function AddWhite():void
                square.graphics.beginFill(0xffffff);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(100,0);
                square.graphics.lineTo(100,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-100)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddRed();
            private function AddRed():void
    //            square.mask = mask_container;
                square.graphics.beginFill(0xff0000);
                square.graphics.moveTo(0,0);
                square.graphics.lineTo(75,0);
                square.graphics.lineTo(75,504);
                square.graphics.lineTo(0,504);
                square.graphics.endFill();
                square.x = (stage.stageWidth-74)/2;
                square.y = ((stage.stageHeight+458)/2)-83;
                AddLoaders();
            private function AddThermometer():void
                thermometer.ImagesArray = ["images/thermometer-mask.png", "index.py", 144, 1152, (stage.stageWidth-144)/2, (stage.stageHeight-458)/2];
                thermometer.addEventListener("loadcomplete", AddToStage);
            private function AddToStage(e:Event):void
                addChild(square);
                addChild(thermometer);
                AddText();
            private function AddLoaders():void
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
                loader.load(new URLRequest("images/logo_w_fire.png"));
                loader2.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
                loader2.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded2);
                loader2.load(new URLRequest("images/tpwebbaseline.jpg"));
                loader3.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded3);
                loader3.load(new URLRequest("images/tpdplatebgwflame.jpg"));
                removeEventListener(Event.ADDED_TO_STAGE, init);
                addChild(myTextField);
                myTextField.width = 250;
                myTextField.x = (stage.stageWidth-50)/2;
                myTextField.y = 470;
                myTextField.selectable = false;
                myTextField.border = false;
                myTextField.borderColor = 0xAA0000;
                myTextField.autoSize = TextFieldAutoSize.LEFT;
                var myFormat:TextFormat = new TextFormat();
                myFormat.color = 0x023048;
                myFormat.size = 24;
                myFormat.italic = true;
                myTextField.defaultTextFormat = myFormat;
            private function imageLoaded(event:Event):void
                imgFlag1 = true;
                if (imgFlag2 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded2(event:Event):void
                imgFlag2 = true;
                if (imgFlag1 == true && imgFlag3 == true)
                    completePreloader();
            private function imageLoaded3(event:Event):void
                imgFlag3 = true;
                if (imgFlag1 == true && imgFlag2 == true)
                    completePreloader();
            function completePreloader()
                var req:URLRequest = new URLRequest('index.py');
                navigateToURL(req, '_self');
            function loop(e:ProgressEvent):void
                var perc:Number = e.bytesLoaded/e.bytesTotal;
                myTextField.text = Math.ceil(perc*100).toString() + "%";
                var myY:Number = ((stage.stageHeight+458)/2)-83-(3.75*perc*100)
                square.y = myY;
    package  {
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import flash.display.Bitmap;
        import flash.display.BitmapData;
        import flash.filters.*;
        import flash.filters.BitmapFilterQuality;
        import flash.net.URLRequest;
        import flash.net.URLLoader;
        import flash.display.Loader;
        import flash.display.LoaderInfo;
        import flash.display.DisplayObject;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        public class Images extends MovieClip
            private var parent_container:Sprite = new Sprite();
            private var _path:String = new String("path");
            private var _myWidth:Number = new Number(20);
            private var _myHeight:Number = new Number(20);
            private var _myX:Number = new Number(20);
            private var _myY:Number = new Number(20);
            private var _myURL:String = new String("url");
            public function Images():void
            public function set ImagesArray(_imagesArray:Array):void
                _path = _imagesArray[0];
                _myURL = _imagesArray[1];
                _myWidth = _imagesArray[2];
                _myHeight = _imagesArray[3];
                _myX = _imagesArray[4];
                _myY = _imagesArray[5];
                LoadImage();
            function LoadImage():void
                parent_container = new Sprite();
                addChild(parent_container)
                var req:URLRequest = new URLRequest(_path);
                var loader:Loader = new Loader();
                loader.load(req);
                loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);         
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadedImage);
            function LoadedImage(e:Event):void
                var loaderInfo:LoaderInfo = e.target as LoaderInfo;
                var displayObject:DisplayObject = loaderInfo.content;
                displayObject.width = _myWidth;
                displayObject.height = _myHeight;
                parent_container.addChild(displayObject);
                parent_container.x = _myX;
                parent_container.y = _myY;
                dispatchEvent(new Event("loadcomplete"));
            function ioErrorHandler(event:IOErrorEvent):void {
                trace("ioErrorHandler: " + event);
    Thanks,
    Beno

  • Create T-code for LSMW

    Hello Experts,
    How can we create t-code for LSMW load?
    We load IT0170 with different amounts for bunch of employees every year. During implementation we have created a initial load. Our client is asking if there is any way we can create Z t-code for LSMW and use the sample spreadsheet and load it in subsequent years.
    Please help.
    Mayuresh

    Thank you both for your reply.
    Actually our security person is not ready to give LSMW access to end users since it is a technical tcode. They are recommending to create Z tcode for our recording and LSMW load.
    Let me know how can we achieve this?
    Mayuresh

Maybe you are looking for

  • Set up fixed vendor for PO help required -URGENT

    Hi , can somebody walk me through the steps to step UP  a fixed vendor. I need to create a po with fixed vendor throgh transaction me59. PLS HELP

  • Get position of xml-tag in clob

    Hi, Is it possible to get the offset in a clob, representing an xml, by using xml functionality? (function or xmltable) For example, with a clob:   v_clob := '<a><b  type="1">val1</b><b type="2">val2</b></a>';I would like a function like:   v_offset

  • Shopping Cart Item deletable after approval

    Hello all, I have an issue regarding Shopping Carts: When a Shopping Cart is approved, gives a Purchase Order which is sent to Vendor, Requester can still delete Item of Shopping Cart, which has effect to delete Item in Purchase Order. I opened a mes

  • DW8.02 bugs - found the problem, it's safari

    Ok, I have to appologize for my rant about Dreamweaver 8.02 killing my apps. It actually does all work fine just not using the Safari Browser on Mac. Firefox works perfectly. Safari cannot deal with Dreamweaver's new code.

  • Change Internal Order

    Hi, I have created a statistical Order without giving "actual Posted cost center" field in control tab. now i can't make changes in that field as it is showing as non editable field. how can i make changes to insert cost center so that at the time of