dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: new browser window questions

Hybrid View

  1. #1
    Senior Member
    Join Date
    Jan 2002
    Posts
    161

    new browser window questions

    Howdy all.
    I need to open an html file in a new window with a specific size.
    I have attached the following code to a button and it works for a url such as http://www.apple.com.

    Here's my problem. I can't reach the html file called geturl_test.html, located in the directory with my main swf.

    on (release) {
    getURL("javascript:NewWindow=window.open('geturl_t est.html','newWin','width=475,height=375,left=0,to p=0,toolbar=No,location=No,scrollbars=No,status=No ,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
    }

    A normal getUrl script has no problem opening the file located in the same directory. Maybe it's because its javascript?

    Is there a solution or a better way to solve my pop up window problem?

    Thanks
    matt

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Posts
    398
    did you cut and paste thay code from your movie?

    there seem to be some spces in your code that could cause the problem.
    Like where the * are..

    java*script:NewWindow=window.open('geturl_test.*ht ml

  3. #3
    Senior Member
    Join Date
    Sep 2002
    Posts
    398
    If you are still having problems you could always do the cheat thing and compare it to your code..

    http://www.flash-db.com/PopUp/

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Posts
    161
    yea, I did cut and paste the code. Is there a better way to post code. Anyway, there aren't spaces in the code in the actionscript window. The code works o.k. Here are the problems.
    When the button is pressed a new browser is launched, just not the file I need. Now when I'm online it launches a flashkit page saying "sorry, can't find the page you are looking for.
    Once again, the code does launch a new window, I just need to launch a window with geturl_test.html, which is located in the same directory as the swf.
    thanks

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Use the full path on the URL.

  6. #6
    Senior Member
    Join Date
    Jan 2002
    Posts
    161
    hey old newbie!
    what would the full path be? The swf that has the code to launch the new pop up window html file is in the same directory. They are on my hard drive now tucked away in several folders. Here's the breakdown: HD/webdesign/smv3/geturl_test.html . Is that how it should be in the code and will I have to change it to reflect the storage structure on the server? I just figured if they were in the same directory I could avoid all that. Any help welcome.
    thanks
    matt

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    If you're testing this locally, why don't you just put a copy of geturl_test.html in the same directory/folder along with your project's .fla?

  8. #8
    Senior Member
    Join Date
    Jan 2002
    Posts
    161
    That's what I'm trying to say. Both the geturl_test.html and all my project flas and swfs are all in the same folder right now. If I do a basic gerUrl script it references the html file no problem. However, as I mentioned, the script I posted above Isn't referencing the html file right now. I was wondering if it's the javascript.

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Can you attach your .fla or a mock up along with that html?

  10. #10
    Senior Member
    Join Date
    Jan 2002
    Posts
    161
    ok, so I think I figured this out a little. The code I was given came from a pop up code generator at www.flash-db.com. The same link in this message chain. I went through the documentation a little and I read, can't find it again, that the http:// is necessary. Can I adapt this to work for me? It's the little technical stuff like this that snags me. Oh and thanks oldnewbie. You are always there when I need help.

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