A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: communicate between swf file and html file

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Location
    Belgium - Antwerp
    Posts
    1

    communicate between swf file and html file

    Hi,

    check out www.actpartners.com
    Here i used a popupwindow to open a fixed window containing a flashintro. I used a fixed window because the moment you click the square the background of the flashfile changes from black to white. But i want to get rid of that popup and just show the .swf file centered in a htmlpage. Is it possible to change the background color of the html page in wich i placed my .swf file by clicking the red square in that flash file?

    The actionscript i allready use for this button to start the animation and change the flash background to white is:
    on (release) {next = "loop_end";
    this.mc_clicktekst._visible = false;
    this._parent.i_mov_achtergr.gotoAndPlay("1");}

    Can someone help me with this??

    thanx
    SlickEddy

  2. #2
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    Hi,

    Check this out ...
    http://www.echoecho.com/flashjavascript.htm

    //poden

  3. #3
    Senior Member
    Join Date
    May 2002
    Posts
    1,017
    Or if you don't want to use Fscommand you can do something like this.
    Add the folloing line on the button within the on release event:

    _root.getURL("javascript:change(Red)");

    then in the hmtl in the head part add this:

    <script type="text/javascript">
    function change(color) {
    document.body.style.background=color;
    }
    </script>

    Change the color to your liking
    while (2+2 == 4) {
    drink ("bourbon");
    }
    gotoAndStop("bed");

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