Parker Software Ltd Homepage
Forum Home Forum Home > WhosOn Live Chat > FAQ's > Advanced FAQ's
  New Posts New Posts RSS Feed - WhosOn and Flash
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WhosOn and Flash

 Post Reply Post Reply
Author
Message
Daniel View Drop Down
Admin Group
Admin Group
Avatar
Technical Director

Joined: 19 Dec 2006
Location: Stoke-on-Trent
Points: 881
Post Options Post Options   Thanks (0) Thanks(0)   Quote Daniel Quote  Post ReplyReply Direct Link To This Post Topic: WhosOn and Flash
    Posted: 28 Feb 2011 at 10:21am




<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">We get some questions about WhosOn can work well with flash.
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">There are three issues to consider:
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">1. Chat links
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">2. Invites
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">3. Tracking Events
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">Additional Code - this should be your WhosOn code:
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><script type='text/javascript' src='http://tracking.whoson.com/include.js?domain=www.test.com'>
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"></script>
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><script type='text/javascript' >
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">function sWOTrackEvent(sWOTextToWrite) {
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>var sWOUrl2;
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>var iWO=new Image(1,1);
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>if(sWOTextToWrite=="")sWOTextToWrite=escape(window.location);
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>if(sWOProtocol=="file:")sWOProtocol="http:";
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>sWOUrl=sWOProtocol+"//"+sWOGateway+"/stat.gif?u="+sWOSession+"&d="+sWODomain;
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>sWOUrl+="&p='"+sWOTextToWrite+"'&r='"+escape(document.referrer)+"'";
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>iWO.src=sWOUrl;
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>return;
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">}
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">function sWOOverrideLoad() {
<span ="apple-tab-span"="" style="white-space:pre"><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">     if (sWOImage.width == 1)
<span ="apple-tab-span"="" style="white-space:pre">     </span>{</span>
<span ="apple-tab-span"="" style="white-space:pre"><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">          </span>window.document.movie.SetVariable("chatstatus", "N");</span>
<span ="apple-tab-span"="" style="white-space:pre"><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>}</span>
<span ="apple-tab-span"="" style="white-space:pre"><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>else</span>
<span ="apple-tab-span"="" style="white-space:pre"><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>{</span>
<span ="apple-tab-span"="" style="white-space:pre"><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">          </span>window.document.movie.SetVariable("chatstatus", "Y");</span>
<span ="apple-tab-span"="" style="white-space:pre"><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"><span ="apple-tab-span"="" style="white-space:pre">     </span>}</span>
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">}
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">if(typeof sWOTrackPage=='function')sWOTrackPage();
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"></script>
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">Setting you must set in WhosOn:
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">Site Properties -> Visitor Chat-> "Display Nothing When Offline"
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">You must also set up a text field inside your flash document - this should be checked after loading to see if you should show your chat images etc.
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">Chat Links
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">You should check the value of the above chatstatus field, and show your link if the chat is online.  This lets you use flash elements for the click, but you must launch the window via the standard new page methods from inside flash.
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">You can also call out to the startChat function of the WhosOn script by executing:
<span ="apple-style-span"="" style="font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">
ExternalInterface.call("sWOStartChat()");
</span>
<span ="apple-style-span"="" style="font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"></span>
<span ="apple-style-span"="" style="font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif">Invites</span>
<span ="apple-style-span"="" style="font-size: 13px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: normal; "><font ="apple-style-span"="" face="Arial, Helvetica, sans-serif"></span>
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif"><span ="apple-style-span"="" style="line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">To make sure that your invites are working, you have to make sure you embed the flash movie in such a way as to allow HTML elements to overlap it.</span>
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif"><span ="apple-style-span"="" style="line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"></span>
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif"><span ="apple-style-span"="" style="line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">The methods for doing this are at:</span>
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif"><span ="apple-style-span"="" style="line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">http://kb2.adobe.com/cps/142/tn_14201.html</span>
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">Tracking Events
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">To track events you must make calls from the Flash into the javascript using the getURL function.
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">The code should be like:
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">
ExternalInterface.call("sWOTrackEvent('myEventName')");
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">
<font ="apple-style-span"="" size="2" face="Arial, Helvetica, sans-serif">This goes in your event handler for which ever element you want to track. 




Edited by Daniel - 07 Feb 2014 at 5:29pm
Daniel Tallentire
Support
Parker Software
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.078 seconds.