Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2005
    Location
    London, UK
    Posts
    1,607

    Opening new browser window at specific size

    Can anyone help me with opening a page that is a popup for displaying a streaming showreel?

    I've found the following links, which detail stuff I've done in the past --

    http://www.htmlgoodies.com/beyond/ja...le.php/3471221
    http://webtips.dan.info/new-window.html

    -- but this time is a bit different. I'm basically editing someone else's old site, and the old way of accessing the showreel was to download a .wmv file, which is of course ridiculous these days. So I'm replacing it with a streaming flv, which will be a popup html, one that is sized specifically to the video dimensions and has no address bar, no tool bar, etc, and I can do all this. What is making it difficult is that I have to launch it from a page that is all flash (as in, there is no html driving the page, it's all flash) and I'm not particularly fond of flash at the best of times. So I'm figuring that putting a javascript into a flash document wouldn't be very fun, so how would I go about achieving this simple task?

    Thanks!
    ... one pixel at a time
    TomHauville.com slash Portfolio

  2. #2
    Join Date
    Aug 2005
    Location
    London, UK
    Posts
    1,607
    well ok, so no one has an answer for me... but it's okay, I just realised that the original site has these kind of popups being opened up from the flash app, so I'll just rip their code
    ... one pixel at a time
    TomHauville.com slash Portfolio

  3. #3
    Join Date
    Mar 2003
    Location
    Brisbane Australia
    Posts
    1,429
    if your using AS2
    getURL("javascript:myFunction()");
    will call the myFunction javascript function.

    I haven't tried javascript with AS3 but this might work
    navigateToURL (new URLRequest ("javascript:myFunction()"), "_self");

    I just read your post again and you say that there is no HTML. Isn't the flash embedded on a html page?
    Because to run the above, the javascript will have to be on the same html page that the flash is embedded on.
    Last edited by Browndog1978; 10-08-2008 at 07:04 AM.

  4. #4
    Join Date
    Aug 2005
    Location
    London, UK
    Posts
    1,607
    thanks for the response, Browndog... as you may have guessed, I'm somewhat out of my depth with this stuff... the code in the site was, well, strange, and that's because almost all of it is in the flash and, well, I couldn't understand how they had so much code to perform simple tasks... but since I'm no programmer, it was all redundant for me to play with it...

    so here's the link:
    www.relativity.com.au
    click on portfolio and then on view showreel to see what my solution was...
    ... one pixel at a time
    TomHauville.com slash Portfolio

  5. #5
    Join Date
    Mar 2003
    Location
    Brisbane Australia
    Posts
    1,429
    nice showreel.

    you might want to check the size of the textarea in portfolio -> project list

  6. #6
    Join Date
    Aug 2005
    Location
    London, UK
    Posts
    1,607
    yeah, I know, I've buggered it up a little and don't know how... it all worked fine before, but by me changing a completely different part of that swf, I've somehow made that project list part of the site screwy...

    but that should be changed soon anyway, and the boss barely looks at his own website... I don't think anyone really bothers to look at that part of the site either... but since it's all flash, we can't get accurate numbers on which links are being clicked on... never mind!
    ... one pixel at a time
    TomHauville.com slash Portfolio

  7. #7
    Join Date
    Nov 2008
    Posts
    9
    I think you can do it using this way:

    First slect the button and in the actions panel type

    on (release) {
    getURL("javascript:Launch('http://www.yoursite.com/popup.htm')");
    }


    "yoursite is your domin and popup is the pop up page name"

    The flash part is done. Bam simple right?
    Now publish the flash file. flash will make an HTML version of your flash movie.

    Open the HTML file that Flash created in an HTML editor such as Notepad or FrontPage and DreamWeaver in HTML view.

    Once the file has been opened in your HTML editor, place your mouse anywhere between the <Body> and </Body> tags and copy and paste the following code.

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function Launch(page) {
    OpenWin = this.open(page, "KirupaStyle", "toolbar=no,menubar=no,location=no,scrollbars= no,r esizable=yes,width=550,height=250");
    }
    // End -->
    </SCRIPT>

    Once the code has been pasted, save the file and preview it in your browser. The button you created in Flash should be visible. Click the button and a new window should appear with the address you specified.

Posting Permissions

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