www.webdeveloper.com
Results 1 to 4 of 4

Thread: flash 5 actionscript - opening a window

  1. #1
    Join Date
    Jul 2004
    Posts
    13

    flash 5 actionscript - opening a window

    Hi. I worked this script out a month ago and have since had my hard drive crash. Since I only uploaded the .swf and the .html, I can no longer see the code I used or remember it. The functioning page is here:

    http://www.geary.k12.ok.us/shared/pa...eat/great.html

    the bottom button on the left that says, 'Login Instructions for Passport' - when you click it you get a small window with instructions.

    The html page has this at the top:

    <script language=javascript>
    function myWindow(textForWindow){ //do not place window params on this line
    var htmlString = "<html>" + textForWindow + "</html>";
    myWindow = open('','myWin','height=270,width=300');//<--- alter the window params here
    myWindow.document.write(htmlString);
    }
    </script>

    I know the above works. My problem is that there was also a bit of code on the button in the fla file and i can't remember what it was.

    It seems like I used GetUrl and put the text of the small window in the URL field somehow.. it's just not working.

    Can anyone help me?

    here's what I've got now.. same code in the html page; this is the code on the button in the fla file:

    on (release) {
    getURL ("javascript:myWindow('<html>TO ACCESS \"GREAT\" FILES IN PASSPORT <br>1. Access PassPort II site and scroll down to bottom of page. In the SECRET WORD box type \"GREAT\" and click \"Login\". <br>2. Messages and lessons are listed in order that they were posted. Click on lesson title to preview. <br>3. No changes can be made through secret word site, it is for viewing purposes only. <br>Log Out when finished.</html>')");
    }

    This permutation succeeded in stopping the errors from popping upon publication. However, I upload it and nada - nothing happens when you clcik it. What have I done wrong?
    Jenn

  2. #2
    Join Date
    Aug 2004
    Location
    Salt Lake City, Utah
    Posts
    17
    getURL("JavaScript:myWindow();");

    That's it Let me know if it works.

  3. #3
    Join Date
    Jul 2004
    Posts
    13
    yes. that's the solution that i reached. with the text that you want to appear in the window being within the parenthesis, it does work. i had made the miistake of adding an <html></html> tag to it within the parenthesis, and had to get rid of that for it to work, but it's great now. Thanks for responding.
    Jenn

  4. #4
    Join Date
    Aug 2004
    Location
    Salt Lake City, Utah
    Posts
    17

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles