Is it possible to load a URL on stage?

Hi,
I'm using Flash CC-Action Script 3, is it possible to load a URL onto the stage?

Thanks. I think our IT department will handle it since they do html/java/and
all that stuff except for action script/flash. I am a little desperate
though. I need to have this at least display a working clock for know and
the phone list, which will display fine once I get to it. Can you be so kind
and look at my horrible action script and help me get the clock to work
continuously and show minutes under 10 with a "0"?  I just need to have
something to show for our Annual Management meeting.
Thank you sincerely for your time.
Code:
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.Font;
import flash.text.TextFormat;
import flash.display.Sprite;
import flash.text.*;
import flash.filters.BitmapFilter;
import flash.filters.BitmapFilterQuality;
import flash.filters.BlurFilter;
import flash.display.Bitmap;
import flash.display.Loader;
import flash.net.URLRequest;
var link:URLRequest = new URLRequest("http://simplegreen.com/");
//ADD CONTAINERS
var containerStage:Sprite = new Sprite();
containerStage.tabChildren = false;
stage.addChild (containerStage);
//DATE TIMER
var my_date:Date = new Date();
var my_timer:Timer = new Timer(1000);//create a new timer that ticks every
second
my_timer.addEventListener(TimerEvent.TIMER, onTimer);
my_timer.start();
//MONTH AND DATE
var months:Array = ["Jan", "Feb", "Mar", "Apr", "May", "June", "Jul", "Aug",
"Sept", "Oct", "Nov", "Dec"];
var days:Array = ["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri"];
var todayIs = (days[my_date.day] + "," + " " + months[my_date.month]  +" " +
my_date.date + " " + my_date.fullYear);
trace(days[my_date.day] + "," + " " + months[my_date.month]  +" " +
my_date.date + " " + my_date.fullYear);
//Text Loader
var textLoader:URLLoader = new URLLoader();
textLoader.addEventListener(Event.COMPLETE, textLoaded);
textLoader.load(new URLRequest("assets/phoneList.txt"));
var ampm:String = new String();
var zero:String = new String();
if (my_date.hours<12) {ampm = "AM";
else{
ampm = "PM";
while(my_date.hours > 12){my_date.hours = my_date.hours - 12;
if(my_date.minutes < 10){zero = "0" + my_date.minutes;
else{
my_date.minutes;
function onTimer(e:TimerEvent):void {
//my_date = new Date();
trace(my_date.hours + ":" + my_date.minutes);
var myDateTextBox:TextField = new TextField;
myDateTextBox = new TextField();
// myDateTextBox = todayIs;
var dateStyle:TextFormat = new TextFormat;
dateStyle.color = 0xFFFFFF;
dateStyle.size = 48;
dateStyle.font = "myriadMm";
dateStyle.align = "left";
var myTimeTextBox:TextField = new TextField;
myTimeTextBox = new TextField();
myDateTextBox.text = String(days[my_date.day] + "," + " " +
months[my_date.month]  +" " +  my_date.date + " " + my_date.fullYear);
myDateTextBox.width = 600;
myDateTextBox.x = 70;
myDateTextBox.y = 70;
myDateTextBox.setTextFormat(dateStyle);
//Add it to the stage;
containerStage.addChild(myDateTextBox);
myTimeTextBox.text = String(my_date.hours + ":" + my_date.minutes + " " +
ampm);
myTimeTextBox.width = 600;
myTimeTextBox.x = 70;
myTimeTextBox.y = 117;
myTimeTextBox.setTextFormat(dateStyle);
//Add it to the stage;
containerStage.addChild(myTimeTextBox);
//Event Listeners
phone.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame);
function fl_ClickToGoToAndPlayFromFrame(event:MouseEvent):void
trace("directory ready");
simpleGreen.addEventListener(MouseEvent.CLICK,
fl_ClickToGoToAndPlayFromFrame_2);
function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void
navigateToURL(link, "_self");
videoDirectory.addEventListener(MouseEvent.CLICK,
fl_ClickToGoToAndPlayFromFrame_3);
function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void
trace("Video Player is Ready");
function textLoaded(evt:Event):void
info_txt.htmlText = textLoader.data;
With warmest regards,
Mary Crotteau
Graphic Design Specialist
Sunshine Makers, Inc./Simple Green

Similar Messages

  • Hi! I need to load a GET url that si very long. On other browsers, I can load the url. In firefox 3.6, no. There is an addons or a plugin so I can extend this limit? If yes, is possible to load automatically this addons when loading a certain page? thanks

    Hi!
    I need to load a GET url that si very long. On other browsers, I can load the url. In firefox 3.6, no.
    There is an addons or a plugin so I can extend this limit? If yes, is possible to load automatically this addons when loading a certain page? thanks
    The url is sometingh like this (this is correctly loaded, but it could be longer)

    Firefox should have problems with long GET data appended to an URL (long would be over 64k).<br />
    If there are problems then it is possible that an extension is the cause of that.
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • FireFox images not loading in local folders (firebug error-Failed to load given URL)

    I am having difficulty when developing websites in local folders (Windows7 computer). The webpages I make are showing images in IE9 & Chrome but not FireFox (nor Safari nor Opera).
    In FireFox I get Firebug "Failed to load given URL" prompt.
    I am using html5 & external linked css stylesheet & the html/html5 & css code validates.
    I have tried using rel path ie images/image.gif & absolute path references ie C:/RPD_Programming/RPD WEB/amwcsnew/index.html
    and have tried using % to eliminate whitespace in references but I cannot get FireFox to display images!!
    This has been a problem for me for around 2 weeks now & is very frustrating. Some website code/templates I have downloaded from the internet display the websites properly (ie load images fine) when I open them locally in FireFox. Why does my code not allow the images to load in FireFox (paths/permissions/other issue??). How can I fix this?
    Here is example css & html5 not displaying images from local directory in FireFox (fine in IE9 & Chrome):
    style.css
    /* CSS Document */
    /*Basic Reset*/
    margin:0;
    padding:0;
    html{
    /* HTML5 display-role reset for older browsers */
    article, aside, details, figcaption, figure,
    footer, header, hgroup, menu, nav, section {
    display: block;
    body{
    width:1200px;
    margin:0 auto;
    header{
    height:450px;
    background:url("C:/RPD_Programming/RPD WEB/amwcsnew/images/header.gif");
    background-repeat:no-repeat;
    #mid{height:750px;
    background:url('C:/RPD_Programming/RPD_WEB/amwcsnew/images/mid.gif')no-repeat;
    footer{height:286px;
    background:url('C:/RPD_Programming/RPD WEB/amwcsnew/images/footer.gif')no-repeat;
    index.html
    <!doctype html><!-- simplified doctype works for all previous versions of HTML as well -->
    <!--html5 template from www.impressivewebs.com_modified by RPD-->
    <!-- Paul Irish's technique for targeting IE, modified to only target IE6, applied to the html element instead of body -->
    <!--[if lt IE 7 ]><html lang="en" class="no-js ie6"><![endif]-->
    <!--[if (gt IE 6)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]-->
    <head>
    <!-- simplified character encoding -->
    <meta charset="utf-8">
    <title>amwcs-new</title>
    <meta name="description" content="amwcs">
    <meta name="author" content="rpd">
    <!-- Delete these two icon references once you've placed them in the root directory with these file names -->
    <!-- favicon 16x16 -->
    <link rel="shortcut icon" href="/favicon.ico">
    <!-- apple touch icon 57x57 -->
    <link rel="apple-touch-icon" href="/apple-touch-icon.png">
    <!-- Main style sheet. Change version number in query string to force styles refresh -->
    <!-- Link element no longer needs type attribute -->
    <!-- <link rel="stylesheet" type="text/css" media="all" href="css/style.css" />-->
    <link rel="stylesheet" href="css/style.css?v=2">
    <!-- Modernizr for feature detection of CSS3 and HTML5; must be placed in the "head" -->
    <!-- Script tag no longer needs type attribute -->
    <script src="js/modernizr-1.6.min.js"></script>
    <!-- Remove the script reference below if you're using Modernizr -->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    </head>
    <!-- If possible, use the body as the container -->
    <!-- The "home" class is an example of a dynamic class created on the server for page-specific targeting
    <body class="home">-->
    <body>
    <!-- ******************************************************************** -->
    <!-- The content below is for demonstration of some common HTML5 elements -->
    <!-- More than likely you'll rip out everything except header/section/footer and start fresh -->
    <!-- First header has an ID so you can give it individual styles, and target stuff inside it
    <header id="hd1"> No way Hosay-not by default! Default is <header> tag (RPD edit) -->
    <header>
    <!-- "hgroup" is used to make two headings into one, to prevent a new document node from forming -->
    <hgroup>
    <h1>amwcs</h1>
    <h2>tagline</h2>
    </hgroup>
    <!-- Main nav, styled by targeting "#hd1 nav"; you can have more than one nav element per page -->
    <nav>
    <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Services</a></li>
    <li><a href="#">Contact</a></li>
    </ul>
    </nav>
    </header><!--End header & or #hd1 header div id if used-->
    <!-- This is the main "div" that wraps the content generically; don't use "section" for this -->
    <div id="mid">
    <!-- The first of two "section" elements for demo purposes; optional class added for styling (hs1 = "home section 1") -->
    <section class="hs1">
    <!-- Each section should begin with a new h1 (not h2), and optionally a header -->
    <!-- You can have more than one header/footer pair on a page
    <header>
    <h1>This is a Page Sub Title</h1>
    </header> -->
    <p>Some content...</p>
    <!-- The h2 below is a sub heading relative to the h1 in this section, not for the whole document -->
    <h2>Demonstrating EM and STRONG</h2>
    <!-- "strong" is used for SEO and contextual hierarchy -->
    <p><strong>This text will have more importance (SEO-wise and contextually)</strong></p>
    <!-- "b" is used for stylistic offset of text that's NOT important contextually -->
    <p><b>This text has visual importance but has no contextual or SEO importance</b></p>
    <!-- "em" is used for colloquial-style emphasis -->
    <p>This is a <em>very</em> colloquial expression.</p>
    <!-- There can be multiple footers on each page -->
    <!-- Secondary headers and footers don't necesarily need ids; they can be targeted via context (i.e. ".hs1 footer")
    <footer>
    <!-- incite a riot: http://24ways.org/2009/incite-a-riot
    <p>Author: <cite>Louis Lazaris</cite></p>
    </footer> -->
    </section><!-- .hs1 -->
    <!-- This is another section; doesn't have header/footer because it's not required -->
    <section class="hs2">
    <h1>This is another section</h1>
    <p>This is some dummy content</p>
    </section><!-- .hs2 -->
    </div><!-- #mid -->
    <!-- The "aside" element could be a sidebar (outside an article or section) -->
    <!-- Or it could reference other tangentially-related content within an article or section
    <aside id="sidebar">
    <p>Sidebar content</p>
    </aside>-->
    <!-- The main footer has an ID for targeting, similar to the main header -->
    <footer >
    <p>copyright &copy; year</p>
    </footer>
    <!-- Remote jQuery with local fallback; taken from HTML5 Boilerplate http://html5boilerplate.com -->
    <!-- jQuery version might not be the latest; check jquery.com -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script>
    <!-- Below is your script file, which has a basic JavaScript design pattern that you can optionally use -->
    <!-- Keep this and plugin scripts at the bottom for faster page load; combining and minifying scripts is recommended -->
    <script src="js/general.js"></script>
    <!-- asynchronous analytics code by Mathias Bynens; change UA-XXXXX-X to your own code; http://mathiasbynens.be/notes/async-analytics-snippet -->
    <!-- this can also be placed in the <head> if you want page views to be tracked quicker -->
    <script>
    var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
    (function(d, t) {
    var g = d.createElement(t),
    s = d.getElementsByTagName(t)[0];
    g.async = true;
    g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    s.parentNode.insertBefore(g, s);
    })(document, 'script');
    </script>
    </body>
    </html>
    I am most grateful for help & look forward to replies & fixing this-thanks
    NB
    Is there a FireFox guide/manual in pdf format available anywhere? I have not found one yet & a FireFox reference might be useful!

    You need to use file:// as the protocol instead of C:/. The latter may never work (C:\ might).
    Where is the main HTML located ?
    Easiest if to store the images in a sub folder of the location because you can't go back via ../ beyond that root location for security reasons.
    See:
    *http://kb.mozillazine.org/Links_to_local_pages_do_not_work

  • Could not load file/URL (file not found) error for JNLP file

    I am completely baffled in trying to figure out why I am getting the following error for some JNLP files but not others:
    Error: could not load file/URL specified: C:\Users\tom\AppData\Local\Temp\javaws2
    java.io.FileNotFoundException: C:\Users\tom\AppData\Local\Temp\javaws2 (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)I have Googled around this forum and elsewhere, and have seen reports that this error is IE-specific, and seems to have something to do with no-cache headers being sent, or with the client browser's cache being full or turned off (which is not my case). I saw the information in the JavaWS FAQ, which recommended turning off security constraints for the JNLP's URI. I tried that, and it didn't help. One of the very baffling things is that I have created several variations of the JNLP file, with varying combinations of jars and property resources, and some combinations always work while other combinations never work. Here's an example:
    <jnlp spec="1.0+" codebase="$$codebase">
       <information>
          <title>demo app</title>
          <description>illustrates weird bug</description>
       </information>
       <resources>
          <j2se version="1.5+"/>
          <jar href="randomFile.jar"/>
          <property name="xxx" value="xxxx"/>
          <property name="swing.metalTheme" value="steel"/>
       </resources>
    </jnlp>The above file always fails with the error shown at the top of this message. However, if I remove either of the two properties, it works fine. And I have created other variations with lots of properties, some of which work. All of these variations are in the same directory in the war file, served by the exact same servlet (a slightly modified version of the jnlp.sample.servlet.JnlpDownloadServlet provided with JDK 1.6.0_3). Assuming that a no-cache header is the problem, what on earth could be causing some JNLP files to always be served with a no-cache header, while others are never served with a no-cache header?
    On a related note, any recommended debugging techniques for seeing what headers are being transmitted? I tried adding a simple check for a "debug=true" parameter in the servlet that causes it to set the content type to "text/plain" instead of JNLP, and that allows me to see (rather than execute) the JNLP XML that's being returned, but it doesn't show me the HTTP headers that are being sent back. If any caching headers are being set, I think it must be being set by the servlet container itself, as it's nothing being set in the servlet code that I can see. So I don't see any way on the server side Java code to output or log the actual HTTP response (or is there?). Any tips in that regard much appreciated.
    Edited by: TomC125468 on Aug 19, 2009 1:35 PM

    Hi Luca-Sanna,
    Thanks for the response. Re browsers, yes, it fails in IE but it succeeds in Firefox. The info on the JavaWS FAQ and other places all seem to indicate that it's an IE issue concerning handling of the cache-control headers.
    I should check in my webserver forum (Sun WebServer 7) to see about logging options. Sniffing on the client side is not possible, as my app is required to use HTTPS exclusively, and unfortunately that also precludes a telnet GET request.

  • Is it possible to load a non-standard image using some Java API?

    Hi,
    My "problem" is:
    1. I have an image called "mediterranean_sea.IMG" (non-standard image format)
    2. I need to process it (histogram, palette, etc).
    3. I'm wondering if it is possible to load this image an process it using some Java API.
    4. I've tried to do this using JAI but I think that this API only works with TIFF, PNG, JPEG, etc.
    Any idea?
    Thanks in advance,
    Roger

    [url http://forum.java.sun.com/thread.jsp?thread=468188&forum=31]Cross-post

  • Is it possible to load web content?

    Hello,
    I'd like to know if its possible to load a file (an xml file) from a web resource with a given address like: http://server.com/file.xml.
    I tried to do this with
    myDocument.importXML(File(file));
    but this does not seem to work.
    Thanks in advance and kind regards,
    mannyk

    Here is an example -- works for me: imports an XML file from a web site into the active document.
    if (app.documents.length == 0) {
         alert("Please open a document and try again");
         exit();
    var doc = app.activeDocument;
    if (! doc.saved) {
         alert("Please save document somewhere first");
         exit();
    var url = "http://kasyan.ho.com.ua/downloads/temp/xmlfile.xml";
    var fileName = url.split("/");
    fileName = fileName[fileName.length - 1];
    var xmlFilePath = File(doc.filePath + "/" + fileName);
    var xmlData = GetURL(url, false);
    if (xmlData != null && xmlData.body != null) {
      xmlFilePath.open("w");
      xmlFilePath.write(xmlData.body);
      xmlFilePath.close();
    if (xmlFilePath.exists) doc.importXML(xmlFilePath);
    function GetURL(url,isBinary)
      // This function consists of up to three 'nested' state machines.
      // At the lowest level, there is a state machine that interprets UTF-8 and
      // converts it to Unicode - i.e. the bytes that are received are looked at
      // one by one, and the Unicode is calculated from the one to four bytes UTF-8
      // code characters that compose it.
      // The next level of state machine interprets line-based data - this is
      // needed to interpret the HTTP headers as they are received.
      // The third level state machine interprets the HTTP reply - based on the
      // info gleaned from the headers it will process the HTTP data in the HTTP
      // reply
      // If things go wrong, GetURL() will return a null
      var reply = null;
      // Below some symbolic constants to name the different states - these
      // make the code more readable.
      const kUTF8CharState_Complete = 0; 
      const kUTF8CharState_PendingMultiByte = 1;
      const kUTF8CharState_Binary = 2;
      const kLineState_InProgress = 0;
      const kLineState_SeenCR = 1;
      const kProtocolState_Status = 1;
      const kProtocolState_Headers = 2;
      const kProtocolState_Body = 3;
      const kProtocolState_Complete = 4;
      const kProtocolState_TimeOut = 5;
      do
        // Chop the URL into pieces
        var parsedURL = ParseURL(url);
        // We only know how to handle HTTP - bail out if it is something else
        if (parsedURL.protocol != "HTTP")
          break;
        // Open up a socket, and set the time out to 2 minutes. The timeout
        // could be parametrized - I leave that as an exercise.
        var socket = new Socket;   
        socket.timeout = 120;
        // Open the socket in binary mode. Sockets could also be opened in UTF-8 mode
        // That might seem a good idea to interpret UTF-8 data, but it does not work out
        // well: the HTTP protocol gives us a body length in bytes. If we let the socket
        // interpret UTF-8 then the body length we get from the header, and the number of
        // characters we receive won't match - which makes things quite awkward.
        // So we need to use BINARY mode, and we must convert the UTF-8 ourselves.
        if (! socket.open(parsedURL.address + ":" + parsedURL.port,"BINARY"))
          break;
        // Dynamically build an HTTP 1.1 request.
        if (isBinary)
          var request =
            "GET /" + parsedURL.path + " HTTP/1.1\n" +
            "Host: " + parsedURL.address + "\n" +
            "User-Agent: InDesign ExtendScript\n" +
            "Accept: */*\n" +
            "Connection: keep-alive\n\n";
        else
          var request =
            "GET /" + parsedURL.path + " HTTP/1.1\n" +
            "Host: " + parsedURL.address + "\n" +
            "User-Agent: InDesign ExtendScript\n" +
            "Accept: text/xml,text/*,*/*\n" +
            "Accept-Encoding:\n" +
            "Connection: keep-alive\n" +
            "Accept-Language: *\n" +
            "Accept-Charset: utf-8\n\n";
        // Send the request out
        socket.write(request);
        // readState keeps track of our three state machines
        var readState =
          buffer: "",
          bufPos: 0,
          // Lowest level state machine: UTF-8 conversion. If we're handling binary data
          // the state is set to kUTF8CharState_Binary which is a 'stuck' state - it
          // remains in that state all the time. If the data really is UTF-8 the state
          // flicks between kUTF8CharState_PendingMultiByte and kUTF8CharState_Complete
          curCharState: isBinary ? kUTF8CharState_Binary : kUTF8CharState_Complete,
          curCharCode: 0,
          pendingUTF8Bytes: 0,     
          // Second level state machine: allows us to handle lines and line endings
          // This state machine can process CR, LF, or CR+LF line endings properly
          // The state flicks between kLineState_InProgress and kLineState_SeenCR
          lineState: kLineState_InProgress,
          curLine: "",
          line: "",
          isLineReadyToProcess: false,
          // Third level state machine: handle HTTP reply. This state gradually
          // progresses through kProtocolState_Status, kProtocolState_Headers,
          // kProtocolState_Body, kProtocolState_Complete.
          // contentBytesPending is part of this state - it keeps track of how many
          // bytes of the body still need to be fetched.
          protocolState: kProtocolState_Status,
          contentBytesPending: null,
          dataAvailable: true,
          // The HTTP packet data, chopped up in convenient pieces.
          status: "",
          headers: {},
          body: ""
        // Main loop: we loop until we hit kProtocolState_Complete as well as an empty data buffer
        // (meaning all data has been processed) or until something timed out.
        while
          ! (readState.protocolState == kProtocolState_Complete && readState.buffer.length <= readState.bufPos)
          readState.protocolState != kProtocolState_TimeOut
          // If all data in the buffer has been processed, clear the old stuff
          // away - this makes things more efficient
          if (readState.bufPos > 0 && readState.buffer.length == readState.bufPos)
            readState.buffer = "";
            readState.bufPos = 0;
          // If there is no data in the buffer, try to get some from the socket
          if (readState.buffer == "")
            // If we're handling the body of the HTTP reply, we can try to optimize
            // things by reading big blobs of data. Also, we need to look out for
            // completion of the transaction.
            if (readState.protocolState == kProtocolState_Body)
              // readState.contentBytesPending==null means that the headers did not
              // contain a length value for the body - in which case we need to process
              // data until the socket is closed by the server
              if (readState.contentBytesPending == null)
                if (! readState.dataAvailable && ! socket.connected)
                  // The server is finished with us - we're done
                  socket = null;
                  readState.protocolState = kProtocolState_Complete;
                else
                  // Attempt to read a byte
                  readState.buffer += socket.read(1);
                  readState.dataAvailable = readState.buffer.length > 0;
              else
                // If the socket is suddenly disconnected, the server pulled the
                // rug from underneath us. Register this as a time out problem and
                // bail out.
                if (! readState.dataAvailable && ! socket.connected)
                  socket = null;
                  readState.protocolState = kProtocolState_TimeOut;
                else
                  // Try to get as much data as needed from the socket. We might
                  // receive less than we've asked for.
                  readState.buffer = socket.read(readState.contentBytesPending);
                  readState.dataAvailable = readState.buffer.length > 0;
                  readState.contentBytesPending -= readState.buffer.length;
                  // Check if we've received as much as we were promised in the headers
                  // If so, we're done with the socket.
                  if (readState.contentBytesPending == 0)
                    readState.protocolState = kProtocolState_Complete;
                    socket.close();
                    socket = null;
                  // If we're downloading binary data, we can immediately shove the
                  // whole buffer into the body data - there's no UTF-8 to worry about            
                  if (isBinary)
                    readState.body += readState.buffer;
                    readState.buffer = "";
                    readState.bufPos = 0;
            else if (readState.protocolState != kProtocolState_Complete)
              // We're reading headers or status right now - look out
              // for server disconnects
              if (! readState.dataAvailable && ! socket.connected)
                socket = null;
                readState.protocolState = kProtocolState_TimeOut;
              else
                readState.buffer += socket.read(1);
                readState.dataAvailable = readState.buffer.length > 0;
          // The previous stretch of code got us as much data as possible into
          // the buffer (but that might be nothing, zilch). If there is data,
          // we process a single byte here.
          if (readState.buffer.length > readState.bufPos)
            // Fetch a byte
            var cCode = readState.buffer.charCodeAt(readState.bufPos++);
            switch (readState.curCharState)
              case kUTF8CharState_Binary:
                // Don't use the UTF-8 state machine on binary data
                readState.curCharCode = cCode;
                readState.multiByteRemaining = 0;
                break;
              case kUTF8CharState_Complete:
                // Interpret the various UTF-8 encodings - 1, 2, 3, or 4
                // consecutive bytes encode a single Unicode character. It's all
                // bit-fiddling here: depending on the masks used, the bytes contain
                // 3, 4, 5, 6 bits of the whole character.
                // Check
                // http://en.wikipedia.org/wiki/UTF-8
                if (cCode <= 127)
                  readState.curCharCode = cCode;
                  readState.multiByteRemaining = 0;
                else if ((cCode & 0xE0) == 0xC0)
                  readState.curCharCode = cCode & 0x1F;
                  readState.curCharState = kUTF8CharState_PendingMultiByte;
                  readState.pendingUTF8Bytes = 1;
                else if ((cCode & 0xF0) == 0xE0)
                  readState.curCharCode = cCode & 0x0F;
                  readState.curCharState = kUTF8CharState_PendingMultiByte;
                  readState.pendingUTF8Bytes = 2;
                else if ((cCode & 0xF8) == 0xF0)
                  readState.curCharCode = cCode & 0x07;
                  readState.curCharState = kUTF8CharState_PendingMultiByte;
                  readState.pendingUTF8Bytes = 3;
                else
                  // bad UTF-8 char
                  readState.curCharCode = cCode;
                  readState.pendingUTF8Bytes = 0;
                break;
              case kUTF8CharState_PendingMultiByte:
                if ((cCode & 0xC0) == 0x80)
                  readState.curCharCode = (readState.curCharCode << 6) | (cCode & 0x3F);
                  readState.pendingUTF8Bytes--;
                  if (readState.pendingUTF8Bytes == 0)
                    readState.curCharState = kUTF8CharState_Complete;
                else
                  // bad UTF-8 char
                  readState.curCharCode = cCode;
                  readState.multiByteRemaining = 0;
                  readState.curCharState = kUTF8CharState_Complete;
                break;
            // If we've got a complete byte or Unicode char available, we process it
            if (readState.curCharState == kUTF8CharState_Complete || readState.curCharState == kUTF8CharState_Binary)
              cCode = readState.curCharCode;
              var c = String.fromCharCode(readState.curCharCode);
              if (readState.protocolState == kProtocolState_Body || readState.protocolState == kProtocolState_Complete)
                // Once past the headers, we simply append new bytes to the body of the HTTP reply
                readState.body += c;     
              else
                // While reading the headers, we look out for CR, LF or CRLF sequences           
                if (readState.lineState == kLineState_SeenCR)
                  // We saw a CR in the previous round - so whatever follows,
                  // the line is now ready to be processed.
                  readState.line = readState.curLine;
                  readState.isLineReadyToProcess = true;
                  readState.curLine = "";
                  readState.lineState = kLineState_InProgress;
                  // The CR might be followed by another one, or
                  // it might be followed by a LF (which we ignore)
                  // or any other character (which we process).
                  if (cCode == 13) // CR
                    readState.lineState = kLineState_SeenCR;
                  else if (cCode != 10) // no LF
                    readState.curLine += c;
                else if (readState.lineState == kLineState_InProgress)
                  // If we're in the midsts of reading characters and we encounter
                  // a CR, we switch to the 'SeenCR' state - a LF might or might not
                  // follow.
                  // If we hit a straight LF, we can process the line, and get ready
                  // for the next one
                  if (cCode == 13) // CR
                    readState.lineState = kLineState_SeenCR;
                  else if (cCode == 10) // LF
                    readState.line = readState.curLine;
                    readState.isLineReadyToProcess = true;
                    readState.curLine = "";
                  else
                    // Any other character is appended to the current line
                    readState.curLine += c;
                if (readState.isLineReadyToProcess)
                  // We've got a complete line to process
                  readState.isLineReadyToProcess = false;
                  if (readState.protocolState == kProtocolState_Status)
                    // The very first line is a status line. After that switch to
                    // 'Headers' state
                    readState.status = readState.line;
                    readState.protocolState = kProtocolState_Headers;
                  else if (readState.protocolState == kProtocolState_Headers)
                    // An empty line signifies the end of the headers - get ready
                    // for the body.
                    if (readState.line == "")
                      readState.protocolState = kProtocolState_Body;
                    else
                      // Tear the header line apart, and interpret it if it is
                      // useful (currently, the only header we process is 'Content-Length'
                      // so we know exactly how many bytes of body data will follow.
                      var headerLine = readState.line.split(":");
                      var headerTag = headerLine[0].replace(/^\s*(.*\S)\s*$/,"$1");
                      headerLine = headerLine.slice(1).join(":");
                      headerLine = headerLine.replace(/^\s*(.*\S)\s*$/,"$1");
                      readState.headers[headerTag] = headerLine;
                      if (headerTag == "Content-Length")
                        readState.contentBytesPending = parseInt(headerLine);
                        if (isNaN(readState.contentBytesPending) || readState.contentBytesPending <= 0)
                          readState.contentBytesPending = null;
                        else
                          readState.contentBytesPending -= (readState.buffer.length - readState.bufPos);
        // If we have not yet cleaned up the socket we do it here
        if (socket != null)
          socket.close();
          socket = null;
        reply =
          status: readState.status,
          headers: readState.headers,
          body: readState.body
      while (false);
      return reply;
    function ParseURL(url)
      url=url.replace(/([a-z]*):\/\/([-\._a-z0-9A-Z]*)(:[0-9]*)?\/?(.*)/,"$1/$2/$3/$4");
      url=url.split("/");
      if (url[2] == "undefined") url[2] = "80";
      var parsedURL =
        protocol: url[0].toUpperCase(),
        address: url[1],
        port: url[2],
        path: ""
      url = url.slice(3);
      parsedURL.path = url.join("/");
      if (parsedURL.port.charAt(0) == ':')
        parsedURL.port = parsedURL.port.slice(1);
      if (parsedURL.port != "")
        parsedURL.port = parseInt(parsedURL.port);
      if (parsedURL.port == "" || parsedURL.port < 0 || parsedURL.port > 65535)
        parsedURL.port = 80;
      parsedURL.path = parsedURL.path;
      return parsedURL;
    Kasyan

  • Is it possible to load classes from a jar file

    Using ClassLoader is it possible to load the classes from a jar file?

    URL[] u = new URL[1] ;
    u[0] = new URL( "file://" + jarLocation + jarFileName + "/" );
    URLClassLoader jLoader = new URLClassLoader( u );
    Object clsName = jLoader.loadClass( clsList.elementAt(i).toString() ).newInstance();
    I get this error message.
    java.lang.ClassNotFoundException: ExceptionTestCase
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    // "file://" + fileLocation + fileName + "/" This works fine from a browser.
    Is there anything I am missing? Thanks for the reply.

  • Is it possible to insert a url into a design I have created in Photoshop?

    Is it possible to create an image with multiply links in it or how can I separate my design in Photoshop so that I can assign the links to each element in our email marketing system?

    It is possible to assign multiple URL to the same image using the slice tool.
    After loading your image, use the slice tool to mark out the areas and then use the slice selection tool to assign URL to the sliced up image.
    Below: After selecting Slice Selection Tool, double click on the pix icon at the corner of the slices you want to assign URLs to.
    Below: Go to File/Save for Web to choose the output format. After selecting Save, you need to output the images with the html as the markup for the URL is in the html file and not in the sliced up images.

  • Possible to have a URL link to an Opportunity list?

    Is it possible to have a URL (that I can send to people) to link directly to an Opportuniy List in Siebel? I assume this is much the same method as linking a record or a report. I right click on the headings pane of the list and go to properties for the URL, open a new browser, paste it in, and I'm taken to the log in screen. From here, when I log in I want to be taken directly to the list, but it just loads my homepage. Now, if I post that same link into a browser where I am ALREADY logged in to Siebel, the link works fine, takes me right to the list, and does what I want. I have made this work with specific record links that I throw into an email, but I can't get it to work with lists. Is this possible?
    Edited by: user10885599 on Aug 6, 2009 7:18 AM

    Using the URL from the address bar doesn't work if you aren't in a browser that is already logged in to Siebel. If you are in the same browser and already logged in to Siebel, it will load the list. But if you are in a fresh browser where it hasn't regeistered you as logged in to Siebel, it will take you to the log in page and then direct you to your home page, not the list. I am wanting people to receive this link in an email and click it, be taken to the log in screen, then to the list after they sign on (whether logged in to Siebel or not, just like how a specific record link URL works). Thanks for the response, though!
    Edited by: user10885599 on Aug 6, 2009 7:20 AM

  • Urgent - Is it possible to Load a DLL in ABAP ?

    Hi All,
       Is it possible to Load a DLL from ABAP ? If so how ?
    Thanks
    Sunil.M

    Hi sunil,
    1. Its not possible for DLL,
      but if its Activex EXE,
      (ie. OLE concept is there),
    2. then it can be done.
    regards,
    amit m.

  • Site not found using Sharepoint Designer 2013, Load balance URL and the Front end servers.

    Dears,
    My SharePoint farm is with the below configuration in our office :
    Batch processing server the with Central Administration
    Web Front End Sever 1 (http://wfe01)
    Web Front End Sever 2 (http://wfe02)
    I do have the load balance URL as http://finance.mycompany.com and as per the system administrator it seems configured properly.
    In AAM i have mapped the URLs as below for the web application in Central Administration portal:
    http://finance.mycompany.com - Default Zone
    http://wfe01 - Intranet Zone
    http://wfe02 - Internet Zone
    I was able to browse the site via the load balance URL : http://finance.mycompany.com, but couldn't open the site using the Share Point Designer 2013. It always says the site not found.
    please advise,
    thanks,
    Ammar

    What do the wfe01 and wfe02 aams do?
    Are you browsing to the SharePoint site and using SPD on the same computer, is it part of the farm or a seperate client computer?
    thanks Alex a lot for your response and appreciate the same.
    WFE01, WFE01 is connected to the one central admin on Batch Processing Server (central admin URL is http://SharepointCA:5555 and the SharePoint Web Application is hosted under port 80 on the same server). So the AAM configured on the batch processing server
    central admin.
    I can connect to the site using the SPD inside the Batch Processing server if i mention the site urs as http://localhost. But not from other client computers by putting the load balance URL - http://finance.mycompany.com.
    I can browse the sites directly putting http://wfe01, http://wfe02 and as well as the load balance URL (http://finance.mycompany.com). The custom webparts are getting crashed when i put the web application URL as http://finance.mycompany.com.
    thanks,
    Ammar

  • Is it possible to change the URL of an application?

    Hi All,
              I was working with the oracle apex and created few applications almost a year back, due to my higher studies there is a gap with the tool..and finally I am in.
    Am planning to create an application which will be similar like a personal website.My doubt here is ..whether it's possible to change the URL by keeping a simple one which includes my name also
    instead of having this big..
    http://apex.oracle.com/pls/apex/f?p=10221:1:116416608594529
    I can understand that the whole URL describes the appln no,page no and session ID but its my doubt possible or not..If possible then how to proceed?
    Thanks
    with Regards,
    Ramya.

    My doubt here is ..whether it's possible to change the URL by keeping a simple one which includes my name also
    instead of having this big..
    http://apex.oracle.com/pls/apex/f?p=10221:1:116416608594529
    I can understand that the whole URL describes the appln no,page no and session ID but its my doubt possible or not..If possible then how to proceed?
    If you are just looking for a nice and short URL to start your application, why not just use a URL shortener service like goo.gl ?
    Just put in your long URL and it will create a nice and short URL for you... for example, the above URL is now http://goo.gl/FijYxn
    - Morten
    http://ora-00001.blogspot.com

  • "Message from Webpage (error) There was an error in the browser while setting properties into the page HTML, possibly due to invalid URLs or other values. Please try again or use different property values."

    I created a site column at the root of my site and I have publishing turned on.  I selected the Hyperlink with formatting and constraints for publishing.
    I went to my subsite and added the column.  The request was to have "Open in new tab" for their hyperlinks.  I was able to get the column to be added and yesterday we added items without a problem. 
    The problem arose when, today, a user told me that he could not edit the hyperlink.  He has modify / delete permissions on this list.
    He would edit the item, in a custom list, and click on the address "click to add a new hyperlink" and then he would get the error below after succesfully putting in the Selected URL (http://www.xxxxxx.com), Open
    Link in New Window checkbox, the Display Text, and Tooltip:
    "Message from Webpage  There was an error in the browser while setting properties into the page HTML, possibly due to invalid URLs or other values. Please try again or use different property values."
    We are on IE 9.0.8.1112 x86, Windows 7 SP1 Enterprise Edition x64
    The farm is running SharePoint 2010 SP2 Enterprise Edition August 2013 CU Mark 2, 14.0.7106.5002
    and I saw in another post, below with someone who had a similar problem and the IISreset fixed it, as did this problem.  I wonder if this is resolved in the latest updated CU of SharePoint, the April 2014 CU?
    Summary from this link below: Comment out, below, in AssetPickers.js
    //callbackThis.VerifyAnchorElement(HtmlElement, Config);
    perform IISReset
    This is referenced in the item below:
    http://social.technet.microsoft.com/Forums/en-US/d51a3899-e8ea-475e-89e9-770db550c06e/message-from-webpage-error-there-was-an-error-in-the-browser-while-setting?forum=sharepointgeneralprevious
    TThThis is possibly the same information that I saw, possibly from the above link as reference.
    http://seanshares.com/post/69022029652/having-problems-with-sharepoint-publishing-links-after
    Again, if I update my SharePoint 2010 farm to April 2014 CU is this going to resolve the issue I have?
    I don't mind changing the JS file, however I'd like to know / see if there is anything official regarding this instead of my having to change files.
    Thank you!
    Matt

    We had the same issue after applying the SP2 & August CU. we open the case with MSFT and get the same resolution as you mentioned.
    I blog about this issue and having the office reference.
    Later MSFT release the Hotfix for this on December 10, 2013 which i am 100% positive should be part of future CUs.
    So if you apply the April CU then you will be fine.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Is it possible to call  a URL from a table entry

    Hi Abap Experts,
    Is it possible to call a URL when we double click on the record of a table
    for  example I have a table zmanifest in which if i double click on the tracking number(table field)
    it should go to UPS website
    Thanks & Regards,
    Tharun.P

    Hi
    It depends on what you mean to do a doubleclick, i.e. where you want to do it?
    If you mean a program created ad hoc, yes you can else I don't think
    Max

  • Is it possible to load same vi in several subpanel ??

    Hi,
    Is-it possible to load same vi in several sub-panel on a vi ????
    Eddy DUCHENE
    12 F Chemin de Boutary
    69300 CALUIRE ET CUIRE
    [email protected]

    Well - as far as I know, that is not possible.
    If you try it with just two subpanels and the same vi to place in the subpanel, you once get error 1145 (LabVIEW: Cannot open VI because it is already in a subpanel control.).
    One way you could code a similar functionality was the usage of a tab-control. You could place your "views" on 5 tabs, make the tab-registers invisible and access the single tabs using a drop-down.
    Using LV8.0
    Don't be afraid to rate a good answer...

Maybe you are looking for

  • How Do I Stop Time Machine From Filling Up My External Hard Drive?

    Hi all - I have a 750GB OWC external hard drive on which I back up about 100GB of data from my MacBook using Time Machine, and also store a bunch of media files for work. Currently about 650GB of that is full, and that is mostly because of two Time M

  • Please do not use TDSKiller in order to read/open PDF files.  It is a fraud; launches a virus.

    I had a problem for a week with not being able to open/read PDF files.  I tried a few remedies that were suggested on the Adobe forum, but none of them worked.  Yesterday, there appeared to be a legitimate remedy, TDSKiller fix for a possible rootkit

  • [SOLVED]tint2-svn out-of-date

    Not compiling and build is flagged as out-of-date. No contact info of the maintainer. What to do now? Last edited by Paingiver (2015-03-07 23:11:52)

  • Compiling PBP on linux

    Hi all, I wanted to use PBP in Linux, unfortunately I could not find the binaries. So, I am trying to get a linux build for PBP. I downloaded the source from the sun website but I get compile errors that look very weird. <snip> ../../src/share/classe

  • NVIDIA QUADRO 4000 for MAC---Issues with Adobe Premeire

    Hello, Mac Pro (Tower) *OS 10.7.5 *2.8 GHx Quad-Core Intel Xeon *16 GB RAM I've had a multitude of issues with Adobe Premiere on this system and I'm not sure what to attribute it to.  First of all: I have two MAC Book Pro's that run APremiere, with s