Results 1 to 8 of 8

Thread: Flash/actionscript 3 open url into an iframe

  1. #1
    Join Date
    May 2008
    Location
    Canada
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Flash/actionscript 3 open url into an iframe

    Hey Guys here's the low down

    I've done lots of design work (tons) but not a lot of code work.
    Hence I'm pretty fresh at the script part.

    Here's what I want to do.


    I'm working in Flash CS3 actionscript3 I am building the html in
    Golive CS2 but can use Dreamweaver CS3 if
    it would work better for this>

    I have built the intro page to my site in flash and have all the
    buttons working to go to a new url for each page

    I don't want the browser to open new windows.

    Instead I want them
    to open into the inline frame that the flash swf is in
    so the End user can easily navigate through the site without dealing
    with a mess of pages in new windows.

    How do I do that? I didn't really understand the past post as to how
    that was actually arrived at.

    Can we please start fresh with this.

    (here's the code I have)


    photo_btn.addEventListener(MouseEvent.MOUSE_DOWN, photoHandler);
    function photoHandler(event:MouseEvent):void {
    navigateToURL(new URLRequest("http://www.mysite.com/
    photography.html"));
    }



    and so on for each button.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    The past post ( i suppose the one you emailed me about) was in ActionScript 2 using the getURL() method. That method has been deprecated in ActionScript3.

    Your AS so far should be working. So, you just wanted to add the "target"?

    Simple enough...

    The navigateToURL() method takes the target as it's second parameter:
    Code:
    navigateToURL(request, '_blank');
    So you just replace _blank with your iframe's name and you should be all set

  3. #3
    Join Date
    May 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Similar problem

    Hi everyone!
    Since I have a similar problem, I thought I'd post it here instead of opening a new thread.
    (Hope this is OK!)
    Me too, am a designer rather than a scripter.(And whatever scripting I know got pretty rusty from not using it for a long period of time..)
    I am currently working on a webpage, in which I'd like to put a "floating" .html page on top of a .swf page, whose buttons should control the .html page.

    So far, I added an iframe to the page -as you can see here---> http://www.geocities.com/mimeli123/trial1.html (With Dreamweaver and the help of a friend..)...but I'm stuck:
    It is blank(I would want it to open as a certain page, like "home.html")
    and I don't know how to code the buttons on the .swf to inteact with the iframe(by clicking on the various buttons, only the content of the iframe should change to a different .html page)


    Can anyone help, please?
    Consider me as a newbie to the whole scripting idea,please! ..

    Thnks in advance!

  4. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Are you using ActionScript 2.0 or 3.0 for this project? The code varies between these two languages.

  5. #5
    Join Date
    May 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am using Action Script 2.0. Sorry I didn't mentioned it before.
    Aaahh..and I found a way to insert the page I wanted as the "mother page" opens.

    Thanks!

  6. #6
    Join Date
    May 2008
    Location
    Canada
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Thanks for answering my question about the iframe target

    Sorry I've been swamped with photo editing.

    I'll give that target a try. I'm crossing my fingers

    Cheers

  7. #7
    Join Date
    May 2008
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    This video may help. It teaches how you can use flash buttons and links using actionscript 3.0

    http://www.actionscript.org/forums/s...326#post751326

  8. #8
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    helllllo,
    So i have a Navbar that i created in in flash with actionscript 2.0,
    anyways i need the "button symbols" to open the HTML links for these buttons.... Does anyone have script for this...or does anyone know of a program that takes .SWF files and converts them back to .FLA??? because I have actually made a flash button open an Iframe but i lost the files all i have is the .SWF files.

    If i cant script the button to open an iframe then does anyone know the scripting to just open a pop up window?

    Thank for any responses..

Bookmarks

Posting Permissions

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