A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: HTML frames and Javascript

  1. #1
    Junior Member
    Join Date
    Jan 2001
    Posts
    21

    resolved

    Ok, I have spent the last few weeks looking over the boards on Javascript commands and using them to communicate variables and commands between 2 SWFs on an HTML page.

    The only part of my work that I can't find answers to, is how to communicate between seperate frames. What I want is to be able to get a javascript command from one SWF in one frame, to a SWF in another HTML frame, so that I can make one movie respond to commands issued by the other.

    Any help is appreciated as well are any resource SWFs and HTML pages.

  2. #2
    Senior Member sxdesign's Avatar
    Join Date
    Aug 2000
    Location
    Serbia
    Posts
    844
    check:

    http://64.224.111.148/forums/showthr...threadid=67979
    http://board.flashkit.com/board/show...hreadid=111324

    also you may want to check threads from list on:

    http://64.224.111.148/forums/showthr...threadid=63443

    most of them are dealin with similar problem (Flash-JS connectivity)

    hope it helps...


  3. #3
    Junior Member
    Join Date
    Jan 2001
    Posts
    21
    Thanks for the help, SX. I have managed to get some of the stuff working that I wanted to, but I still have few problems.

    For one, I can't find a list of the Flash-specific JS commands anywhere, not on Macromedia or Java Sun. I have a feeling such a list exists, but I don't know where to look.

    Secondly, I am having a little bit of trouble with the setVariable flashscript command.

    Code:
    function setData(varName, varValue) { 
    	mObject(mName).SetVariable(varName.toString(), varValue);
    	}
    When I use it, it sets the variable in the swf I tell it to. The problem is it doesn't set it as a expression, so I can't use in mathematical calculations or expressions involving it. At present I am using TGotoFrame and using a frame in Flash to set the variable to the number I want it, but as the number of variables increases, this is becoming a pain. Do you have any thoughts as to what I can do to solve this, to make my variables an expression I can use, rather than one I can only display in text boxes?

  4. #4
    Senior Member sxdesign's Avatar
    Join Date
    Aug 2000
    Location
    Serbia
    Posts
    844
    grrrr.... i hate this... it just didn't send the whole post i wrote... check:

    http://www.macromedia.com/support/fl...ingwithflash4/

    those are methods that you will use mostly... there are few others, but don't have time now to write them all...

    about second problem... try to use:

    function setData(varName, varValue) {
    mObject(mName).SetVariable(varName.toString(), Number(varValue));
    }

    although it should work without it...

    hope it helps...


  5. #5
    Junior Member
    Join Date
    Jan 2001
    Posts
    21
    Thanks SX.

    Your help has been invaluable.

    You are da man, or, er, woman

  6. #6
    Senior Member sxdesign's Avatar
    Join Date
    Aug 2000
    Location
    Serbia
    Posts
    844
    he he... man i would prefer



    anyways... i'm glad it helps

    chhers..,


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