Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 44

Thread: changing iframe content with flash buttons

  1. #21
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    You don't you put the code on your buttons. OR, you can use action script in the first frame to tell the file what to do with which buttons: You have to give your buttons instance names. For the example the instance name is "btnFirst"

    Code:
    btnFirst.onRelease = function(){
         getURL("barr.html", Iframe_ID);
         getURL("barr_descript.html", Iframe_ID2);
    }
    Personally I like to keep the code on the MCs as it is easier to find and cleaner (or just the opposite, depending on what you want )
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  2. #22
    Join Date
    Oct 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have been trying everything. at one point I got the menus to bring up a webpage, but it would load a new page, not just in the iframe.
    I apologize for having so much trouble understanding how to complete this.
    If I try to put the last code "btnFirst.onRel....etc" onto the actual menu movie clip, i still can't get it to work. It makes sense to me why it should, but it still doesn't function.

  3. #23
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    No no.. the btnFirst.onRelease code goes in the root time line. Frame 1 is the best spot.

    The first code (on(release) ) goes on the button instance on the stage (nothing in the MCs in the library.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #24
    Join Date
    Oct 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i tried that, the error I get is

    Statement must appear within on/onClipEvent handler

  5. #25
    Join Date
    Oct 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok, I pasted it onto the actions layer, frame 1.
    I get no error, but it doesn't work either.
    I am assuming that that is the only place I would put any code refering to the iframe.
    or do I also have to put the code onto the menu MC.
    I have named all the buttons btnFirst, btnSecond, etc.
    so I can see where the action script is being directed to it.

    this is the code I put on the first frame of the actions layer:

    btnFirst.onRelease = function(){
    getURL("barr.html", Iframe_ID);
    getURL("barr_descript.html", Iframe_ID2);
    }

    btnSecond.onRelease = function(){
    getURL("battle.html", Iframe_ID);
    getURL("battle_descript.html", Iframe_ID2);
    }

    btnThird.onRelease = function(){
    getURL("deforest.html", Iframe_ID);
    getURL("deforest_descript.html", Iframe_ID2);
    }

    btnFourth.onRelease = function(){
    getURL("gatewood.html", Iframe_ID);
    getURL("gatewood_descript.html", Iframe_ID2);
    }

    btnFifth.onRelease = function(){
    getURL("gore.html", Iframe_ID);
    getURL("gore_descript.html", Iframe_ID2);
    }

    btnSixth.onRelease = function(){
    getURL("heckel.html", Iframe_ID);
    getURL("heckel_descript.html", Iframe_ID2);
    }

    btnSeventh.onRelease = function(){
    getURL("hotrod.html", Iframe_ID);
    getURL("hotrod_descript.html", Iframe_ID2);
    }

    btnEigth.onRelease = function(){
    getURL("kutnick.html", Iframe_ID);
    getURL("kutnick_descript.html", Iframe_ID2);
    }

    btnNinth.onRelease = function(){
    getURL("lobalzo.html", Iframe_ID);
    getURL("lobalzo_descript.html", Iframe_ID2);
    }

    btnTenth.onRelease = function(){
    getURL("marcus.html", Iframe_ID);
    getURL("marcus_descript.html", Iframe_ID2);
    }

    btnEleventh.onRelease = function(){
    getURL("mulla.html", Iframe_ID);
    getURL("mulla_descript.html", Iframe_ID2);
    }

    btnTwelfth.onRelease = function(){
    getURL("parikh.html", Iframe_ID);
    getURL("parikh_descript.html", Iframe_ID2);
    }

    btnThirteenth.onRelease = function(){
    getURL("posner.html", Iframe_ID);
    getURL("posner_descript.html", Iframe_ID2);
    }

    btnFourteenth.onRelease = function(){
    getURL("pratt.html", Iframe_ID);
    getURL("pratt_descript.html", Iframe_ID2);
    }

    I am so confused as to why it isn't working. I can't even get the scrolling menu to call up any websites in any window, let alone the iframe.
    I really do appreciate your help, and I am sure I am very close to getting it to work.
    thanks again.

  6. #26
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    okay.. the "Iframe_ID" and "Iframe_ID2" need to be changed to the labels you gave your iframes.

    Also your buttons need to have instance names that match the code (btnFirst, btnSecond, etc.)

    And lastly.. in the libray right click on these buttons and choose "linkage" and check the box "Export for Action Script" then in the input box make the linkage name btnFirst, btnSecond, etc..
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  7. #27
    Join Date
    Oct 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    1. the "Iframe_ID" and "Iframe_ID2" are the labels I gave the iframes.

    2. The buttons have instance names that match the code (btnFirst, btnSecond, etc.)

    3. And lastly.. in the libray right click on these buttons and choose "linkage" and check the box "Export for Action Script" then in the input box make the linkage name btnFirst, btnSecond, etc..

    I did the linkage and name the linkage. still nothing. here is the flash file with the html that it is going into. I know alot of things won't show up in the html file, but at least the swf and the iframes will. can you please check this if you get a chance and let me know where I am making errors?

  8. #28
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    As I am almost off work I will take a look tomorrow. I have football and then halloween to deal with. I will need some sleep sometime, but I have 2 days off from work so I should get some time to take a gander soon!
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  9. #29
    Join Date
    Oct 2007
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks BLiZZaRD.

  10. #30
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    I haven't forgotten about you either. Soon as I finish the Flash Form I will take a look at this.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •