dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Coding Javascript in Flash

Hybrid View

  1. #1
    Member
    Join Date
    Jul 2002
    Location
    London, England
    Posts
    46

    Coding Javascript in Flash

    I want to write Javascript in Flash so I can put in to a button and create a new PopUp Browser Window from a Flash Movie.

    What I want to know is......

    1. Do I write the Javascript in the getURL "window"

    2. Do I write the Javascript in one line , <HTML><HEAD><TITLE> or do I write it
    <HTML>
    <HEAD>
    <TITLE>

    3. How do I move words blow each other when writing text in an action script function as it only appears to set text in a continueous line.

    4. Do I write the Javascript in the same getURL as the button.
    Ben

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    if you're going so far as to dynamically write out the HTML contents of a page using javascript then you would want to do that prior to the getURL call since its going to involve a lot of text. At any rate, the script you are using in the javascript itself will have to be added to a string variable, and one line at at time. ie.

    myJS = "document.write('<html><head><title>";
    myJS += "Welcome to my page</title></head><body> ...";
    myJS += "... </body></html>);";

    etc. Then in the getURL you would use

    getURL("javascript:"+myJS+"void(0);");

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