A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [CS3] mute swf files from another swf/html & javascript

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    7

    [CS3] mute swf files from another swf/html & javascript

    Hi all,

    im adding some swfs to our site (old ones containing movies)

    we show a small clip on a page with a link to a high res version. the problem being is that the small clip volume is still up when the high res video loads.

    is there a way i can use JS etc to control the volume on these swf files? i dont want to add mute buttons as this would still rely on users muting the video themselves.

    can we get hold of the flash object via javascript?

    thanks in advance peeps!

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    yes.. you can use ExternalInterface (I believe is still in CS3).. are you using AS2? or AS3?

    anyways.. using ExternalInterface(), you can create functions in your container/wrapper (ie: html page for example) that is housing your embedded .swf...

    you can then 'register' this function to be executed form a Flash event...


    this also works the other way... calling a function inside flash (such as mute function) by an event/link/function call from in the wrapper (your JS function)


    hope this helps.

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    7
    ok, will look into that...

    to be honest ive inherited some swf files from the previous designer... so i dont even have the fla files to tinker with...

    thanks for the reply..

    if anyone has successfully done anything like this i would appreciate a code cut and paste.... ive not touched flash for years now!

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    well then its going to be hard if you cant touch any of the code.. (dont ya think?)


    maybe you can try loading the .swf into containerClip.. .and then muting that containerClip...see if it mutes the volume..

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