spirit posteets tagged flash  [ Profile ]

Sort by: Date / Title /

  1. 10 years ago
    1. // Track 404 pages. Replace your GA tracking code (http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=86927):
    2.  
    3. <script type="text/javascript">
    4. var gaJsHost = (("https:" == document.location.protocol) ? " https://ssl ." : "http://www.");
    5. document.write(unescape("%3Cscript src='" + gaJsHost + " google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    6. </script>
    7.  
    8. <script type="text/javascript">
    9. var pageTracker = _gat._getTracker("UA-xxxxx-x");
    10. pageTracker._trackPageview("/404.html?page=" + document.location.pathname + document.location.search + "&from=" + document.referrer);
    11. </script>
    12.  
    13. //-------------------------------------------------------------------------
    14. // Classify your site visitors (http://www.google.com/support/analytics/bin/answer.py?answer=57045&ctx=sibling)
    15.  
    16. <script type="text/javascript">pageTracker._setVar('Marketing');</script>
    17.  
    18. //-------------------------------------------------------------------------
    19. // Track your (outgoing) links/ads banner or downloads (http://www.google.com/support/analytics/bin/answer.py?answer=55526)
    20.  
    21. <a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');">
    22.  
    23. // For flash ads for example:
    24. on(release) {
    25. getURL("javascript: pageTracker._trackPageview
    26. ('/bannerads/advertisername/bannername');");
    27. getURL("http://www.advertisersite.com");
    28. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1414"></script>
  2. 10 years ago
    This little trick allows a Flash movie (swf) to find out the URL of the page in which it's embedded. Javascript must be enabled for this to work. if the window.location.href.toString method doesn't return a value then ExternalInterface.call will return null. Same thing happens when Javascript is disabled.
    1. // This little trick allows a Flash movie (swf) to find out the URL of the page in which it's embedded.
    2.  
    3. import flash.external.ExternalInterface;
    4.  
    5. var pageURL:String =
    6.         ExternalInterface.call('window.location.href.toString');
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1411"></script>
  3. 11 years ago
    1. function replace(str:String,find:String,replace:String):String
    2. {
    3.         var index:Number;
    4.         while(str.indexOf(find)!=-1)
    5.         {
    6.                 index= str.indexOf(find);
    7.                 str = str.substr(0,index) + replace + str.substr(index + find.length);
    8.         }
    9.         return str;
    10. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/685"></script>
  4. sponsorised links

First / Previous / Next / Last / Page 1 of 1 (3 posteets)