List Info

Thread: failing in basics!?




failing in basics!?
user name
2006-12-01 02:18:31
After reading the mailing list emails and the new tutorials
at osflash.org I 
updated my js to include the setId() like so:

<script type="text/javascript" 
src="javascript/JavaScriptFlashGateway.js"><
/script>
          <script type="text/javascript">
var lcId = new Date().getTime();
var flashProxy = new FlashProxy(lcId, "core1", 
"JavaScriptFlashGateway.swf");
          </script>
          <script type="text/javascript">
	var sample = new FlashTag("core1.swf", 600, 500);
      sample.setFlashvars("lcId=" + lcId);
	  sample.setId("core1");
      sample.write(document);
	  flashProxy.call('testflash', null)
          </script>
  <script type="text/javascript">

Still no luck!  If I use the older way of using the gateway
like:

var sm = document.getElementById("core1");
sm.testflash();

Then it only works, interestingly, if I call those two above
lines after the 
document loads and if flash exposes the testflash with:

ExternalInterface.addCallback("testflash", this,
testflash);

But only in IE and not in firefox!

Please, oh mailing list generous gurus, help!!!





From: "Schwan Ray" <filaminionhotmail.com>
Reply-To: Flashjsosflash.org
To: Flashjsosflash.org
Subject: [Flashjs] failing in basics!?
Date: Thu, 30 Nov 2006 18:41:39 -0600
MIME-Version: 1.0
X-Originating-IP: [67.10.12.47]
X-Originating-Email: [filaminionhotmail.com]
X-Sender: filaminionhotmail.com
Received: from host.osflash.org ([69.16.205.20]) by 
bay0-mc4-f9.bay0.hotmail.com with Microsoft
SMTPSVC(6.0.3790.2444); Thu, 30 
Nov 2006 16:42:20 -0800
Received: from localhost ([127.0.0.1]:51096
helo=host.osflash.org)by 
host.osflash.org with esmtp (Exim 4.52)id 1GpwTG-0004Ek-SG;
Thu, 30 Nov 2006 
19:41:42 -0500
Received: from [65.54.246.100] (port=25200 
helo=bay0-omc1-s28.bay0.hotmail.com)by host.osflash.org with
esmtp (Exim 
4.52) id 1GpwTE-0004Cm-Hlfor Flashjsosflash.org; Thu, 30 Nov
2006 19:41:40 
-0500
Received: from hotmail.com ([64.4.61.25]) by 
bay0-omc1-s28.bay0.hotmail.comwith Microsoft
SMTPSVC(6.0.3790.1830); Thu, 30 
Nov 2006 16:41:42 -0800
Received: from mail pickup service by hotmail.com with
Microsoft 
SMTPSVC;Thu, 30 Nov 2006 16:41:42 -0800
Received: from 64.4.61.200 by by102fd.bay102.hotmail.msn.com
with HTTP;Fri, 
01 Dec 2006 00:41:39 GMT


Dear List Members,

I have spent a lot of time with flash to js gateway but have
been hitting 
stone walls.  Please help!

This is my flash file:
import mx.controls.*;
import flash.external.ExternalInterface;
import com.macromedia.javascript.JavaScriptProxy;
var proxy:JavaScriptProxy = new JavaScriptProxy(_root.lcId,
this);

**-> this works! //proxy.call("testjs");
//testflash();

function testflash():Void{
Alert.show("yess!");
}

This is my js:
<script type="text/javascript" 
src="javascript/JavaScriptFlashGateway.js"><
/script>
<script type="text/javascript">
   var lcId = new Date().getTime();
   var flashProxy = new FlashProxy(lcId,
"JavaScriptFlashGateway.swf");
</script>
<script type="text/javascript">
      var sample = new FlashTag("core1.swf", 600,
500);
      sample.setFlashvars("lcId=" + lcId);
      sample.write(document);
      this.flashProxy.call('testflash', null);  // this
doesn't work.  I've 
tried with sample.call which worked once - but doesn't any
more.  Can't get 
it work no matter what I do.  Also, tried with the way it
says in the 
flashtojsgateway site with setting id and retrieving object
with 
getElementById --> that doesn't work either!
  <script>
  <script type="text/javascript">
   function testjs(){
       alert("helo");
   }
  </script>

I get in IE 6 saying "cannot open the site:"! 
Nothing happens in firefox.

Please, help!  What am I doing wrong?


_______________________________________________
Flashjs mailing list
Flashjsosflash.org
http://osflash.org/mailman/listinfo/flashjs_osflash.org



_______________________________________________
Flashjs mailing list
Flashjsosflash.org
http://osflash.org/mailman/listinfo/flashjs_osflash.org
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )