In AS2, I would say just create a javascript function to set a cookie and call it from flash using the geturl request.
// Javascript Function function setCookie(c_name,value,expiredays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); } // AS2 Function myBtn_btn.onRelease = function(){ getURL("javascript:setCookie('my_cookie','my_value','30')"); };
Hope this helps. chews
ps is unverified code, but it should work :-)
source share