Posts Tagged ‘URL’

URLParser: a parser to get value of host, protocol, port, parameters from an URL using regular expression

Filetype-URL Problem Summary´╝Ü Once I need to get the host, protocol, port, parameters from a given URL with Action-Script. I googled for a class named HTTPUtil developed by members of flexpasta.com, and got some tips about URLUtil of Flex SDK. However, HTTPUtil is used to resolve information from the URL of the page the SWF file embed in. URLUtil is useful, but a little complex. I need a simple method to resolve a given URL, and use the resolved information directly without extra processing.

Solution Summary: I decide to write a class named URLParser myself to satisfy my requirement using regular expression of action-script.

Search-256x256 Demo | DownloadDownload Full Project

(more…)

How to load an image into our Flex application from URL(with source)

Sometimes we need to load an image into our Flex application from URL,it’s very simple if the images are in a web-accessible directory.The below code is only a simple sample for it.You can modify it to suit your app.
PS.
While working on an AS 3 script I was getting an error like below(image):
Severity Description Resource In Folder Location Creation Time Id
2 Could not resolve <map:imgView> to a component implementation. imgView.mxml imgView 2008/02/10 1:17:08 26

I checked my action script file but there was no syntax error.Well was only because I forgot to create the “myLib” folder! imgView.as:
(more…)

Open a link using Flex 2.0

Red-48x48 Some times we need to open a URL in a new window from our Flex applications.At Flex 1.5 we can use getURL method,as opposed,Flex 2.0 can use navigateToURL to realize it. Here is a straight and easy solution, The code is below:

(more…)

5 ways to redirect URL with Javascript

Flight-Tracker-48x48

How to do a Redirect to an HTTP POST Request with Javascript?I summarized 5 ways to redirect URL.(The purpose of below script is to perform a local redirect using Javascript)

(more…)