logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 06-20-2011, 08:43 PM   #1
henryhayes
 
Join Date: Jan 2011
Posts: 57
Default JS to stop / start 2 SWF's simultaneously?

I have 2 SWF files on the same webpage:

SWF1 is an audioplayer
SWF2 is a moving graphic

I want SWF2 to start and stop simultaneously with SWF1:
When the musicplayer is pressed to start, the graphic starts too.
And when the musicplayer is pressed to stop, the graphics stops as well.

Can this be done using javascript? If so, where to find working code?
Ive spent hours on google with no result. Any help or comment appreciated
henryhayes is offline   Reply With Quote
Old 06-20-2011, 08:51 PM   #2
m1a2x3x7
m1a2x3x7's Avatar
 
Join Date: Mar 2007
Posts: 297
Default

Yes it can, assuming you have the working files to the SWF.

You'll need to look into flash.external.ExternalInterface.
__________________
Chris Schultz
Web and Multimedia Designer
Schultz|Studio
m1a2x3x7 is offline   Reply With Quote
Old 06-20-2011, 08:54 PM   #3
m1a2x3x7
m1a2x3x7's Avatar
 
Join Date: Mar 2007
Posts: 297
Default

Then again... You're working with two SWF files you don't need to use JavaScript.

Read this: http://www.ahrooga.com/entry/how-to-...calconnection/
__________________
Chris Schultz
Web and Multimedia Designer
Schultz|Studio
m1a2x3x7 is offline   Reply With Quote
Old 06-20-2011, 09:12 PM   #4
henryhayes
 
Join Date: Jan 2011
Posts: 57
Default

Thx for reply. Yes i read about LocalConnection which would be an ideal solution.

Unfortunately i only have the FLA file for the graphic. The audioplayer is freeware recommended by Gentleone in a previous string in this forum. Working well and easy to customize by the way.

So if i understand it correctly, i cant use LocalConnection since a "receiver" and "sender" must be implemented while creating both SWF's?
henryhayes is offline   Reply With Quote
Old 06-21-2011, 01:53 PM   #5
henryhayes
 
Join Date: Jan 2011
Posts: 57
Default

Issue solved in HTML / CSS by stacking two div with different z-index and top div postion:absolute.

Bottom div contains the graphics which is hidden by startbutton from Audioplay.
When startbutton is pressed the stopbutton is released; stopbutton is a PNG which allow the graphics contained in bottom div to shine through.

No js needed afterall; CSS and a couple of hours of sleep solved the issue..
henryhayes is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com