Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onClick reLoad the.swf clip into layer(DIV)tag

Status
Not open for further replies.

Curisco

Programmer
Feb 6, 2002
90
SE
Well i'll start with i'm not sure if this is a Flash question or DW so i've placed a question in both...
Hope that's ok.

OK,
Here,s the deal on the htm page i have a layer which contains a swf movie, which unfortunatly for this projekt loads as soon as the page does.
So i would like to know if it's possible to, on the click of a button reload/refresh the contents of the layer?

The code below shows you that i have a show hide situation which works! (shows then hides, i'm working on getting it to do the opposite but that's another question)

<a href=&quot;#&quot; onClick=&quot;HideShow('flashBox1');&quot; reload/refresh('skrufnekk.swf');&quot;> Flash</a>

skruffnekk being the film inside the layer.

Well, i hope i've made my self clear and if not the site is up here ' the html is a bit of a mess but ... under the flash file on the right you'll find a button &quot;flash&quot; this hides the layer, after a few seconds when the film is loaded and the button is pressed ...no animation hence the need for the reload.

THanks for your time as always,
/Ramsey
-------------------------------------
Laughing out loud every day,
keeps the doctor away....gotoAndPlay
-------------------------------------


-------------------------------------
Laughing out loud every day,
keeps the doctor away....gotoAndPlay
-------------------------------------
 
u could use this concept:
-onclik: Show/Hide Layer X & Refresh Page...

in this case your layer will be shown while the page loads and starts the flash.

If this is not an option due to behind process or some other data collection...page load time etc. then consider using Flash controllers for the movie play + ShowHide lAyer
...
this way u use layes to show its content while small controlls of movie will be accesibe to users...to start/pause.stop etc.
Code:
Assign actions to the buttons

Select the &quot;Play&quot; button 
Click the &quot;Show Actions&quot; button on the Launcher bar 
Select &quot;+&quot; > Basic Actions > Play 
The default mouse event is &quot;On Release.&quot; Click the top line, uncheck &quot;release&quot; and check &quot;press.&quot; This means the action is triggered when the mouse button is pressed. 
Close the Actions panel 
Select the &quot;Stop&quot; button 
Click the &quot;Show Actions&quot; button on the Launcher bar 
Select &quot;+&quot; > Basic Actions > Stop 
The default mouse event is &quot;On Release.&quot; Click the top line, uncheck &quot;release&quot; and check &quot;press.&quot; This means the action is triggered when the mouse button is pressed. 
Select Control > Test Movie. The movie should run until &quot;Stop&quot; is pressed and remain paused until &quot;Play&quot; is pressed.
credit:
All the best!

> need more info?
:: don't click HERE ::
 
actually I take back the 1st concept as u can not have the layer hidden and.or shown on Refresh!
so the other option would work.
if u need &quot;auto play&quot; when layer is shown consider using those controls above and
then try:
LINK 1
-onClick: Show Layer #1(Hide Others) AND Play movie #1

LINK 2
-onClick: Show Layer #2(Hide Others) AND Play movie #2

All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top