[Flashjs] undefined arguments

Mike Chambers mchamber at macromedia.com
Thu Jun 16 00:51:49 PDT 2005


Sorry for the delay on getting back to you.

First, you only need to include this file:

<script type="text/javascript" src="/JavaScriptFlashGateway.js"></ 
script>

or these:

<script type="text/javascript" src="/javascript/Exception.js"></script>
<script type="text/javascript" src="/javascript/FlashTag.js"></script>
<script type="text/javascript" src="/javascript/FlashSerializer.js"></ 
script>
<script type="text/javascript" src="/javascript/FlashProxy.js"></script>

but not both.

(The first file actually contains all of those 4)

--

Second, is your problem that the javascript function that you are  
calling from Flash is not getting called, or is it that what you are  
doing in the javascript function is not working?


mike chambers

mesh at macromedia.com

On Jun 15, 2005, at 5:35 PM, Rafael G wrote:

> Thanks for your time, Mike
>
>
> I'm testing the work in Firefox 1.0.4 on Mac and PC, you can see it  
> here:
>
>
> http://rafael.servehttp.com/test/index.htm
>
>
> Look the html source and the problem is the "click" event in  
> Firefox, a friend told me this event is not suported by Firefox,  
> but maybe exist some trick to avoid this.
>
>
> For example, this another project work fine on Firefox on PC, and  
> the trick is a invisible layer with the form that follow the mouse  
> when is over the browse button in the swf. The bad thing of this  
> work is that was done in AS1 and in Mac only work with Explorer.
>
>
> http://www.yamago.net/components/
>
>
>
> Thanks!
>
>
> RAFA3L
>
>
>
> On Jun 15, 2005, at 1:42 PM, Mike Chambers wrote:
>
>
>> Cool. Glad you got it working.
>>
>> It isnt working for you in firefox?
>>
>> Which version of firefox are you running? What OS? Do you get any  
>> errors? Can you look in the javaScript console (FireFox > Tools >  
>> JavaScript console).
>>
>> mike chambers
>>
>> mesh at macromedia.com
>>
>> On Jun 15, 2005, at 10:35 AM, contacto at rafaelguedez.com wrote:
>>
>>
>>
>>> I'm happy!
>>>
>>> The problem was the bad path of the JavaScriptSerializer class  
>>> and this
>>> dont show error during the compiling time because is a static class.
>>>
>>>
>>> Well, I'm happy because all work in Safari and Explorer, but  
>>> would be
>>> perfect if work in Firefox too.
>>>
>>>
>>> The problem with Firefox is with this functions in javascript  
>>> working
>>> together with the html form:
>>>
>>>
>>>
>>>     function test () {
>>>         w=document.getElementById("uploadFile");
>>>         w.click();
>>>         w.focus();
>>>     }
>>>
>>>
>>>
>>> Any idea?
>>>
>>>
>>> RAFA3L
>>>
>>>
>>>
>>>
>>>
>>>> No, I have 2 fields on the stage, "test" and "test2", in "test"  
>>>> I see
>>>> the uid parameter and in "test2" I want see the argument.
>>>>
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> RAFA3L
>>>>
>>>>
>>>>
>>>> On Jun 15, 2005, at 1:58 AM, Kai Tier wrote:
>>>>
>>>>
>>>>
>>>>
>>>>> Is this just a typo?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> function testFunction (arg) {
>>>>>>      _root.test 2= arg;
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> as in should it not be _root.test = arg?
>>>>>
>>>>>
>>>>>
>>>>> --- Rafael G <contacto at rafaelguedez.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hi all!
>>>>>>
>>>>>> Thanks for this excellent work, I'm making some
>>>>>> tests but I get some
>>>>>> little problems.
>>>>>>
>>>>>>
>>>>>> for example, I can load my swf and send some vars
>>>>>> via tag.setFlashvars
>>>>>> (); and I can call a function inside the swf, but I
>>>>>> can get the args,
>>>>>> this is what I using in the flash:
>>>>>>
>>>>>>
>>>>>> // -----------------------------------------------
>>>>>>
>>>>>> import com.macromedia.javascript.JavaScriptProxy;
>>>>>>
>>>>>> var proxy:JavaScriptProxy = new
>>>>>> JavaScriptProxy(_root.test, this);
>>>>>>
>>>>>> function testFunction (arg) {
>>>>>>      _root.test 2= arg;
>>>>>> }
>>>>>>
>>>>>> // -----------------------------------------------
>>>>>>
>>>>>>
>>>>>> And this is what I have in the html:
>>>>>>
>>>>>>
>>>>>> // -----------------------------------------------
>>>>>>
>>>>>> <script type="text/javascript"
>>>>>> src="/flashJavascript/
>>>>>> JavaScriptFlashGateway.js"></script>
>>>>>> <script type="text/javascript"
>>>>>> src="/flashJavascript/javascript/
>>>>>> Exception.js"></script>
>>>>>> <script type="text/javascript"
>>>>>> src="/flashJavascript/javascript/
>>>>>> FlashTag.js"></script>
>>>>>> <script type="text/javascript"
>>>>>> src="/flashJavascript/javascript/
>>>>>> FlashSerializer.js"></script>
>>>>>> <script type="text/javascript"
>>>>>> src="/flashJavascript/javascript/
>>>>>> FlashProxy.js"></script>
>>>>>>
>>>>>> <SCRIPT LANGUAGE="javascript"><!--
>>>>>>
>>>>>> var uid = new Date().getTime();
>>>>>> var flashProxy = new FlashProxy(uid,
>>>>>> '/flashJavascript/
>>>>>> JavaScriptFlashGateway.swf');
>>>>>>
>>>>>> // --></SCRIPT>
>>>>>>
>>>>>>
>>>>>> <script type="text/javascript">
>>>>>>
>>>>>>      var tag = new FlashTag('test.swf', 300, 300);
>>>>>>      tag.setFlashvars('test='+uid);
>>>>>>      tag.write(document);
>>>>>>
>>>>>>      function testFromFlash (arg) {
>>>>>>          w=document.getElementById("uploadFile");
>>>>>>          w.click();
>>>>>>          w.focus();
>>>>>>      }
>>>>>>
>>>>>>      function set_variable (arg) {
>>>>>>          flashProxy.call('testFunction',  arg);
>>>>>>      }
>>>>>>
>>>>>> </script>
>>>>>>
>>>>>>
>>>>>> <form enctype="multipart/form-data" method="post"
>>>>>> name="form"
>>>>>> action="upload.php">
>>>>>> <input type="file" name="uploadFile" id="uploadFile"
>>>>>>
>>>>>> onchange="set_variable(this.value)">
>>>>>> </form>
>>>>>>
>>>>>> // -----------------------------------------------
>>>>>>
>>>>>> In this example I call "testFromFlash" from my swf
>>>>>> and open the
>>>>>> explorer file window only on Safari (Mac) and
>>>>>> Explorer (PC), them,
>>>>>> when I press "Choose" I get a undefined argument
>>>>>> when I call the
>>>>>> "testFunction" from the "set_variable" function in
>>>>>> javascript. The
>>>>>> flashProxy.call work fine but I think don't send the
>>>>>> arguments.
>>>>>>
>>>>>> and the another question: is possible make it to
>>>>>> work in Firefox?
>>>>>>
>>>>>>
>>>>>> The idea is make a image uploader using this kit
>>>>>>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>>
>>>>>> RAFA3L
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Flashjs mailing list
>>>>>> Flashjs at osflash.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ___________________________________________________________
>>>>> How much free photo storage do you get? Store your holiday
>>>>> snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
>>>>>
>>>>> _______________________________________________
>>>>> Flashjs mailing list
>>>>> Flashjs at osflash.org
>>>>> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Flashjs mailing list
>>>> Flashjs at osflash.org
>>>> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Flashjs mailing list
>>> Flashjs at osflash.org
>>> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Flashjs mailing list
>> Flashjs at osflash.org
>> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>>
>>
>>
>>
>
>
> _______________________________________________
> Flashjs mailing list
> Flashjs at osflash.org
> http://osflash.org/mailman/listinfo/flashjs_osflash.org
>




More information about the Flashjs mailing list