2010/2/4 cem sonmez <[email protected]> > I would recommend putting the code in your .js file into a real class, and >> not using the >> script block if possible. The bug is as you saw that declaring >> >> function foo () { >> ... >> } >> > > you mean that you recommend to change the .js code into .lzx class ? I have > tried it but got some errors as well?i am going to try it again. > > > >> Does the wrong thing inside of a script block when "when=immediate" is >> set. >> Or else you could declare the script block as not "immediate". >> >> it is working when i declare without using immediate. > > And the another thing: isnT this declaration possible ? > > <include href="md5.js" /> > > when i use like this i get this error : > md5.js:1:1: Content is not allowed in prolog. Some text editors may insert > a Byte-Order Mark (the sequence of characters 0xEFBBBF) at the start of your > source file without your knowledge. Please remove any non-whitespace > characters before the start of the first '<' character. > > instead > > <script src="md5.js"/> > > I have also tried to include another very simple .js file. But got the same > error. > Or am i doing a mistake? > > Thanks > > Thanks > >> >> On Thu, Feb 4, 2010 at 3:29 PM, cem sonmez <[email protected]> wrote: >> >>> Actually the code that i m trying almost same with you wrote >>> >>> <canvas debug="true"> >>> >>> <script src="md5.js" when="immediate" /> >>> <button>Md5 >>> >>> <handler name="onclick"> >>> var hash = hex_hmac_md5("bar","foo"); >>> Debug.debug("md5 : %w", hash); >>> </handler> >>> </button> >>> </canvas> >>> >>> This works on swf8 runtime. >>> But on swf10 runtime i get the following compilation error : >>> >>> Error: Call to a possibly undefined method hex_hmac_md5, in line: var >>> hash_$1 = hex_hmac_md5("bar", "foo"); >>> >>> I always try to work on swf10 runtime. Have ever faced this kind problem >>> on swf10? >>> Thanks >>> >>> 2010/2/4 P T Withington <[email protected]> >>> >>> Can you show your method code? >>>> >>>> You should be able to say: >>>> >>>> <script src="md5.js" when="immediate" /> >>>> <button> >>>> <handler name="onclick"> >>>> var hash = hex_hmac_md5("bar", "foo"); >>>> Debug.debug("md5 :", hash); >>>> </handler> >>>> Click me! >>>> </button> >>>> >>>> >>>> On 2010-02-04, at 10:42, cem sonmez wrote: >>>> >>>> > hi all >>>> > i can use the "md5.js" javascript file in the lzx such like : >>>> > >>>> > <script src="md5.js" when="immediate" /> >>>> > <script> >>>> > var hash = hex_hmac_md5("bar", "foo"); >>>> > Debug.debug("md5 :", hash); >>>> > </script> >>>> > >>>> > But i want call this function when any button is clicked. >>>> > When i use the lines in the method tag, getting compiler error about >>>> canT >>>> > find the related function. >>>> > Can anyone help me about this issue ? >>>> > >>>> > King regards >>>> > -- >>>> > Cem SONMEZ >>>> >>>> >>> >>> >>> -- >>> Cem SONMEZ >>> >> >> >> >> -- >> Henry Minsky >> Software Architect >> [email protected] >> >> >> > > > -- > Cem SONMEZ >
-- Cem SONMEZ
