A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help....passing varibles between frames

  1. #1

    Unhappy

    I hope someone can help me out there. Basically I have a navigation bar in the left hand frame called chris_navbar.swf which calls some java script when pressed. In the topframe I have header.swf which contains a text field which pulls in the varible "heading" according to which section has been pressed in the chris_navbar.swf.

    In chris_navbar.swf I have

    Set Variable: "section" = "Corporate"
    Get URL ("javascript:rad()")

    I have tried this Java script in the frame that contains chris_navbar.htm:

    <SCRIPT LANGUAGE=JavaScript>
    function rad()
    {
    var flashvar_string = document.chris_navbar.GetVariable("section");
    parent.topframe.document.header.SetVariable("heade r",(flashvar_string));
    }
    </SCRIPT>

    Unfortunately it still will not change the text field in the topframe. Should I be writing my varible instead? Have I mucked up my synatax?

    any help much appreciated, thanks

  2. #2
    The Supreme Shaman and Keeper of Polar Lights
    Join Date
    Apr 2000
    Posts
    1,175

    Post

    Hi !

    Are you sure that name of topframe is "topframe", movies ID are "header" and "chris_navbar" and at last there is NAME= inside <embed
    ?

    ------------------
    Good luck !
    Ilya. -Polar Lights Studios-
    Flash sources page

  3. #3

    Wink

    Thanks, you put me on the right track. I was also having problems between browsers but worked out that I had to put the swlive connect for Netscape. Checked out your site too, very cool stuff. Keep up the good work.

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