A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: putting java on flash button

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Location
    Vancouver, BC Canada
    Posts
    3

    resolved putting java on flash button

    I have a link on one of my flash pages - I coded 'getURL ()' and entered the javascript between the brackets but still cannot get the button functional - can someone help me?

    <a href="http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=915038-0000&PA=1438008&HTML=http://www.gorgeousboys.com"><img
    src="http://www.gorgeousboys.info/JParker/Banners/1.gif" alt="Gorgeous
    Boys
    Visit Us" border="0"><br /><font
    size="1">WWW.GORGEOUSBOYS.COM</verdana></a>

    - this is HTML, I know - I converted this code to javascript using an online HTML to Javascript convertor

    Any advice would be greatly appreciated - I know that Flash accepts java code on buttons with the getURL tag - I just don't know what I am doing incorrectly
    Last edited by backinaflash; 01-29-2007 at 07:06 PM. Reason: website project

  2. #2
    Junior Member
    Join Date
    Jan 2007
    Posts
    15
    Make a button
    Open actionscript and enter this code into it:
    on(press){
    getURL("http://www.sanitationscape.com", "blank");
    }

    And my website should pop up... if thats what you mean...
    Just change the "http://www.sanitationscape.com"

  3. #3
    Junior Member
    Join Date
    Jan 2007
    Location
    Vancouver, BC Canada
    Posts
    3
    thanks for the reply, but that's not what I meant - I have a piece of code that is in HTML - I converted it from HTML to Javascript using an online code converter - I then placed the piece of java code onto my button in FlashMX and it didn't function - I need someone to read the piece of javascript code and tell me why it won't work when placed on the button - thanks for trying

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Well there's nothing about the HTML you posted that needs to be javascript, and if your javascript isn't working, it's probably better to post what you're trying rather than the code you started with, but all that being said...

    Generally speaking, you do something like:

    Code:
    on(release){
    getURL("javascript: doSomething()");
    }
    You can run into issues with this approach in Flash 8, especially if you're testing locally rather than on a server.

  5. #5
    Junior Member
    Join Date
    Jan 2007
    Location
    Vancouver, BC Canada
    Posts
    3
    thannks for the reply - I'll give it another try

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center