Advanced ActionScript 3.0: Navigate to URL, Open Web Sites Sending Over Variables.

Fri, Dec 18, 2009

ActionScript

Advanced ActionScript 3.0: Navigate to URL, Open Web Sites Sending Over Variables.

This movie requires Flash Player 9



Download Navigate to URL Actionscript function video tutorial complete without advertisement FLV format – $1

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!

//The ActionScript 3.0 Navigate to URL Sending Variables
// 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);

}

Related Articles:

, , , , , , , , , , , , , , ,

2 Responses to “Advanced ActionScript 3.0: Navigate to URL, Open Web Sites Sending Over Variables.”


Trackbacks/Pingbacks

  1. trackbackbe…

    Nice post, thank you!!!!!…

Leave a Reply

You must be logged in to post a comment.

My name is Avraham Saltoun, and I live in Jerusalem, Middle East. I am currently on my mid  40's and I am a computer programming technician. Here you will find over one hundred quality video tutorials on Actionscript, and yes, I give online support for aspiring programmers, and pros as well, sharing screen on skype and delivering source code by email, click the button for live flash actionscript support now!

 
oDesk Certified Action Script Programmer
oDesk Certified Adobe Flash CS3 Designer
oDesk Certified Adobe Photoshop 6.0 Designer
Skype Me™!

$7.49 .Com! Score Savings Cartoon Smart Tutorials


839
Unique Visitors
Previous 30 Days
Powered By Google Analytics