It is possible to open a web site from Flash, using HTML but if you are looking for more resources, there is no other way other than using ActionScript.
We will open the site http://www.say-web.com, send date, time, user name on a single mouse click event. Note that I can choose any event, mouse over, a timer, a counter, a motion tween finish.
ADOBE REFERENCE ON NAVIAGETOURL FUNCTION, CLICK HERE
DOWNLOAD THE SOURCE FLA FILE
Part-2-Navigate-toURL
HERE IS THE SOURCE CODE!
// Avraham Saltoun
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE
my_btn.addEventListener(MouseEvent.CLICK, navigate);
// This will set the compiler waiting for a click
// on the button we created
// then it will execute the navigate function
function navigate (event:MouseEvent) {
var url:String = “http://www.say-web.com”;
//This is a string that eventually will feed
// a URLRequest variable
var variables:URLVariables = new URLVariables();
// We will insert these variables into the URL Request
variables.exampleSessionId = new Date().getTime();
//This will get the time and insert the result
// as a session id to the URL
variables.exampleUserLabel = “Say-Web-User”;
//This also will be inserted on the URL
var request:URLRequest = new URLRequest(url);
request.data = variables;
//This will insert the variables into the URL
navigateToURL(request);
}






2 Responses to “Advanced ActionScript 3.0: Navigate to URL, Open Web Sites Sending Over Variables.”
Trackbacks/Pingbacks
trackbackbe…
Nice post, thank you!!!!!…
trackback…
here…