|
-
AS2 to AS3 also - small amount of code
Anyone feel generous enough to convert this code from AS2 to AS3?
it is for some old tracking software. It is not much,
--------------------
import com.stuffedguys.tracker.*
var stSiteHost:String = 'http://http://www.mywebsite.com';
var stDefURL:String = 'http://www.mywebsite.com/st/index.php?sc=track&action=default&';
var stActURL:String = 'http://www.mywebsite.com/st/index.php?sc=track&action=event&';
var stSaleURL:String = 'http://www.mywebsite.com/st/index.php?sc=track&action=sale&';
var stSiteID:Number = 1;
var stSiteTextID:String = '';
var nsTracker:Tracker = new Tracker(stSiteHost,stDefURL,stActURL,stSaleURL,stS iteID,stSiteTextID);
/* Use the following code in the objects or functions to call the tracking method. */
var actionId:Number = 2;
var actionItem:String = '';
nsTracker.trackAction('/action_page', actionId, actionItem);
/* How to call the tracking functions: */
nsTracker.track('/some_address'); // track a page view (visitor step)
nsTracker.trackAction('/action_page', actionId, actionItem); // track an action
nsTracker.trackSale('/sale_page', products, orderId, orderInfo, orderCost, tags); // track a sale
--------------------------------------
I get the error "Line 3 var - expecting a variable name"
thanks so much
cheers
Dave
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|