A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: [Resolved] [Resolved] what should i put in the flash actionscript for linking to a frame.

  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    28
    Sorry..Does anyone know how to add the coding to allow my flash button to link to a page which display in another frame??

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Come again?

  3. #3
    Junior Member
    Join Date
    Aug 2002
    Posts
    28
    Mm...I import my flash into a webpage..
    I have two frames for that webpage.
    The first frame I will put the flash in it. But when I click a button in the flash.. I need to display another page in the second frame.. What should I add the coding in the flash in order to make it work??

  4. #4
    Senior Member nepdude's Avatar
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    960
    The button has to have this action
    Code:
    on(release){
    geturl("whatever.html","FrameName");
    }
    where the FrameName is the same as specified in the frameset file.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You mean a frameset! Why can't you call it what it is?

    So, if you've used framesets before, you most probably know that each frame should have a name you can refer to, right?

    Supposing you have a left frame named left_nav and a main frame on the right of this left frame, named main, then the script from a Flash button in a .swf in the left frame, would be something like the following:

    on(press){
    getURL("http://www.flashkit.com/", "main");
    }

  6. #6
    Junior Member
    Join Date
    Aug 2002
    Posts
    28
    Erm... I had put the coding in my flash.. but it seems to open a new window for that page.

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You have to test this through the html that holds the frameset, not in the application itself.

  8. #8
    Senior Member nepdude's Avatar
    Join Date
    Feb 2001
    Location
    Canada
    Posts
    960
    you got the frame name wrong
    check your frameset file. it should look something like this:

    <*frameset cols="140,*">
    <*frame src="menu.html" name="left">
    <*frame src="content.html" name="main">
    <*/frameset>

    (Leave out the *)

    With the above code in the frameset you would need to use this action
    Code:
    on(release){
    geturl("whatever.html","main");
    }
    If you don't specify the frame name, the new page will open in the same frame that the button is in.
    If you specify a framename that does not exist it will open it in a new window.
    If you specify a frame name that does exist, then it will be opened in that frame.

    I hope all this makes sense

  9. #9
    Junior Member
    Join Date
    Aug 2002
    Posts
    28
    Can help mi to see which parts had go wrong?? This is my coding below.

    <*frame name="banner" scrolling="no" noresize target="contents" src="" marginwidth="0" marginheight="0">
    <*frameset cols="151,*">
    <*frame name="admin_function.htm" src="admin_function.htm" scrolling="no" marginwidth="4">
    <*frame name="main" src="">
    <*/frameset>

    //i put my flash in the admin_function frame.

    for my flash I put this codes:

    on (release) {
    getURL("blank.htm","main");
    }

    Thanks for your advise.



  10. #10
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Don't bother with what I posted... I don't know what I'm talking about!

  11. #11
    Junior Member
    Join Date
    Aug 2002
    Posts
    28
    Its ok.. oldnewbie..

  12. #12
    Junior Member
    Join Date
    Aug 2002
    Posts
    28
    Sorry I think its my mistake.. My page runs well now.. Just now i went to run the wrong page...tats why open the other page in a new window.. thank nepdude and oldnewbie.. thanks alot..

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