A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Flash / JavaScript Integration Kit doesn't work

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    199

    Flash / JavaScript Integration Kit doesn't work

    Hi,

    I don't seem to be able to call Javascript from Flash. In my .fla I have...

    Code:
    import com.macromedia.javascript.JavaScriptProxy;
    
    stop();
    
    var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId, this);
    
    
    proxy.call("MovieLoaded");
    In the Javascript I have...

    Code:
    <script type="text/javascript" src="FlashJavascriptGateway/source/javascript/Exception.js"></script>
    <script type="text/javascript" src="FlashJavascriptGateway/source/javascript/FlashTag.js"></script>
    <script type="text/javascript" src="FlashJavascriptGateway/source/javascript/FlashSerializer.js"></script>
    <script type="text/javascript" src="FlashJavascriptGateway/source/javascript/FlashProxy.js"></script>
     
    <script type="text/javascript">
    
    var uid = new Date().getTime();
    var flashProxy = new FlashProxy(uid, 'FlashJavascriptGateway/JavaScriptFlashGateway.swf');
    
    function MovieLoaded(txt)
    {
    alert('loaded');
    }
    </script>
    <script type="text/javascript">
    
        var tag = new FlashTag('user_admin_mf01.swf', 480, 145); // last two arguments are height and width
        tag.setFlashvars('lcId='+uid);
        tag.write(document);
    </script>
    The Flash movie winks upon the proxy call when run from Flash application so it appears ot be calling out to the container but the alert box is never raised in the html page.

    Any ideas? I can call Flash from Javascript.

    CN.
    Last edited by CaptainNeeder; 12-07-2006 at 07:22 AM.

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    199
    It was a scripting security issue.

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