2 Replies Latest reply on May 26, 2006 12:05 AM by Newsgroup_User

    javascript in flash

    mocaking
      Is there a way to embed javascript function in actionscript without an external file so that I can call the function in actionscript using getURL("javascript:myfunction();");?

      And also is there way to pass information between flash movies of different windows?

      thx!
        • 1. Re: javascript in flash
          gaurav_ch Level 1
          hi,

          i dont think that its possible using getURL. however, if i understand you correct, you need to create a javascript function in html page and use fscommand in flash to call that function. refer to the help file for 'fscommand'.

          you can pass information between flash movies of different windows by using LocalConnection object. its very easy infact. refer to help file. in general you will have to prepare a sender and reciever movie for it.

          hope it helps. if you need more info, refer to livedocs or send me a private message.

          gaurav
          • 2. Re: javascript in flash
            Level 7
            mocaking wrote:

            > Is there a way to embed javascript function in actionscript without an external
            > file so that I can call the function in actionscript using
            > getURL("javascript:myfunction();");?

            Flash will look for the function in the page where your swf movie is
            embeded not in AS

            > And also is there way to pass information between flash movies of different
            > windows?

            LocalConnection object as gaurav_ch pointed out