A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: javascript tracking code inside Flash?? help...

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    1

    javascript tracking code inside Flash?? help...

    Hi, all... I'm pretty new to Flash cs3 and i have this javascript tracking-code I need to place in our flash-banner in order for our third-party tracking company to track clicks and that sort of stuff, but I'm not sure how I need to place it in our flash-banner. I thought I coudl simply place this javascript into a top layer or the like, but seems I cannot directly include it like that inside Flash. Then I thought perhhaps I could simply save the javascript file as .js file and call it from within the Flash file, but not sure how to go about it...

    Well, appreciate any help...

    Here below is the javascript in question:


    Code:
    <!--  START::ib-ibi.com View Tag; DO NOT MODIFY TAG-->
    <script type="text/javascript">
    var _ibHost = "https://";
    var _ibgo = '${BUYER_LINE_ITEM_CODE}';
    document.write(unescape("%3Cscript src='" + _ibHost + "ev.ib-ibi.com/ibiview.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <noscript><iframe src="https://ev.trackingcompany.com/view.html?go=${BUYER_LINE_ITEM_CODE}" width="0" height="0" frameborder="0" scrolling="yes" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"></iframe></noscript>
    <!--  END::ib-ibi.com View Tag -->

  2. #2
    Senior Member vinayak.kadam's Avatar
    Join Date
    Oct 2006
    Location
    gotoAndPlay("Pune");
    Posts
    831
    you may write a user defined function in javascript and Flash may call that function using getURL(). Please look Help to know more!
    As ever,
    Vinayak Kadam

  3. #3
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    you would put your js code/function in the wrapper (ie: .html or .php page for example)..

    and then from Flash use ExternalInterface() to call that function from a Flash driven event.

    (on a side note.. this can also be done in reverse.. using an event from the wrapper to call a function registered inside Flash to make the flash movie do something as well.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center