7 Replies Latest reply on May 7, 2006 10:50 PM by octav20xx

    javascript in Flash?

    aimlesslady
      I want to add the following code to a button in my flash project. This
      is coded for HTML. (I didn't create it, it is a 'tell a friend' link
      from a 3rd party service we are using, I don't know javascript.) How
      can I include this script in my Flach project. Where do I put it and
      does it have to be modified at all?

      <!-- PLACE THIS CODE WHEREVER YOU WANT AN IMAGE LINK TO APPEAR -->
      <script language=javascript
      src=http://software.myetoolsonline.com/poshmom/lib/popup.js.php?
      header=&footer=&header_align=&footer_align=&taf_button=&back_color=&text
      _color=&url=&url_text=></script>
      <!-- END CODE -->

      When I just put the code in the actionscript where the url would go, only a blank window opens up. To see what I mean, go to www.poshmom.com and click on Email a Posh Pal on the left nav bar.

      Also, I have noticed recently that whenever a Flash object plays in my browser, a tool tip comes up that tells me to hit the spacebar or click to activate. Is there way to get rid of this?
        • 1. Re: javascript in Flash?
          Level 7
          >>When I just put the code in the actionscript where the url would go, only
          >>a
          >>blank window opens up.
          Javascript cannot be placed in Actionscript.

          Are you creating a link, then create a button and use the getURL
          Actionscript in the button's onRelease event handler.


          >>Also, I have noticed recently that whenever a Flash object plays in my
          >>browser, a tool tip comes up that tells me to hit the spacebar or click to
          >>activate. Is there way to get rid of this?
          This is a Windows IE issue with a patent legal battle. Here are the
          requirements to suppress the tool tip.
          http://www.adobe.com/devnet/activecontent/
          --
          Lon Hosford
          www.lonhosford.com
          May many happy bits flow your way!
          "aimlesslady" <webforumsuser@macromedia.com> wrote in message
          news:e3g2u2$666$1@forums.macromedia.com...
          I want to add the following code to a button in my flash project. This
          is coded for HTML. (I didn't create it, it is a 'tell a friend' link
          from a 3rd party service we are using, I don't know javascript.) How
          can I include this script in my Flach project. Where do I put it and
          does it have to be modified at all?

          <!-- PLACE THIS CODE WHEREVER YOU WANT AN IMAGE LINK TO APPEAR -->
          <script language=javascript
          src=http://software.myetoolsonline.com/poshmom/lib/popup.js.php?
          header=&footer=&header_align=&footer_align=&taf_button=&back_color=&text
          _color=&url=&url_text=></script>
          <!-- END CODE -->

          When I just put the code in the actionscript where the url would go, only a
          blank window opens up. To see what I mean, go to www.poshmom.com and click
          on
          Email a Posh Pal on the left nav bar.

          Also, I have noticed recently that whenever a Flash object plays in my
          browser, a tool tip comes up that tells me to hit the spacebar or click to
          activate. Is there way to get rid of this?



          • 2. Re: javascript in Flash?
            aimlesslady Level 1
            Are you creating a link, then create a button and use the getURL
            Actionscript in the button's onRelease event handler.
            That's what I did:
            on (release) {

            //Goto Webpage Behavior
            getURL(" http://software.myetoolsonline.com/poshmom/lib/popup.js.php?header=&footer=&header_align=& footer_align=&taf_button=&back_color=&text_color=&url=&url_text=","_blank");
            //End Behavior

            }
            But it still opens a blank page. Am I missing soemthing?
            • 3. Re: javascript in Flash?
              Level 7
              remove the "_blank"



              ******************************************
              --> Adobe Certified Expert *ACE*
              --> www.mudbubble.com
              --> www.keyframer.com




              aimlesslady wrote:
              > Are you creating a link, then create a button and use the getURL
              > Actionscript in the button's onRelease event handler.
              > That's what I did:
              > on (release) {
              >
              > //Goto Webpage Behavior
              >
              > getURL(" http://software.myetoolsonline.com/poshmom/lib/popup.js.php?header=&foo
              > ter=&header_align=&footer_align=&taf_button=&back_color=&text_color=&url=&url_te
              > xt=","_blank");
              > //End Behavior
              >
              > }
              > But it still opens a blank page. Am I missing soemthing?
              >
              • 4. Re: javascript in Flash?
                aimlesslady Level 1
                Tried that, still no success.Any other ideas, anyone???Please help!!!
                • 5. Re: javascript in Flash?
                  Level 7
                  try replacing "_blank" with "_self"? It always works so make sure you clear cache and test again.

                  ******************************************
                  --> Adobe Certified Expert *ACE*
                  --> www.mudbubble.com
                  --> www.keyframer.com




                  aimlesslady wrote:
                  > Tried that, still no success.Any other ideas, anyone???Please help!!!
                  • 6. Re: javascript in Flash?
                    octav20xx
                    yes !!!

                    `But it still opens a blank page. Am I missing soemthing?`

                    )

                    ... because there is a blank page !

                    ??? have u open the page ?!
                    • 7. Re: javascript in Flash?
                      octav20xx Level 1
                      _blank - opens into another window

                      ... no problem with the link !