?
Solved

how can I avoid the swf video does NOT automatically start on my website ?

Posted on 2007-07-21
12
Medium Priority
?
418 Views
Last Modified: 2013-11-22
I have tried everything to not to start video automatically, I don't want the video start automatically, only user should start the video. how can I do that,  go to my url and see it, always the video automatically starts :(  
exploringlasvegas.com/hotels/wynn.html

here is my code.

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="320" height="280" id="wynnlasvegas">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="wynnlasvegas.swf" />
<param name="play" value="false" />
<param name="loop" value="false" />
<param name="quality" value="best" />
<param name="scale" value="exactfit" />
<param name="wmode" value="transparent">
<param name="bgcolor" value="#ffffff" />
<param name="flashvars" value="streamName=http://www.exploringlasvegas.com/hotels/wynnlasvegas.swf&autoStart=false" />
<embed src="wynnlasvegas.swf" flashvars="streamName=http://www.exploringlasvegas.com/hotels/wynnlasvegas.swf&autoStart=false" play="false" loop="false" quality="best" scale="exactfit" bgcolor="#ffffff" width="320" height="290" name="wynnlasvegas" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
0
Comment
Question by:hpolat
  • 7
  • 5
12 Comments
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 19541189
in the fla - use the command stop() on the first frame :) That should do it!

Or are you looking for a more general way of stopping a swf from outside the source?
0
 

Author Comment

by:hpolat
ID: 19542293
I have tried it, no luck, is my html code correct though ?
thank you
0
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 19542579
If the swf plays in spite of a stop() command, there is something wrong with your code. Perhaps you have a play() command another place?

The html looks fine, as far as I can see. Never used anything other than the standard that is created by Adobe/Macromedia to be honest.

But the problem lies in the swf, not in the html...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:hpolat
ID: 19545851
Basicallay, I am importing an avi video that stays at the Layer 1. and Layer 1 has only 1 frame that has the video on it. I cliked the first frame and set the "stop" from sync, but still no luck, why the video start playing as soon as page loads.. damn :(
thank you for the ideas
0
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 19550049
Aaah, now I get it :)

Is the video in a symbol? If so - set the instance name of the video to e.g. "videoPlayer", then set the command videoPlayer.stop(); on the main timeline :)

That ought to do it... If not  - send me the file to Zamol_r (a) yahoo.com, with the subject "EE - Video not stopping", and I'll take a look :)
0
 
LVL 12

Accepted Solution

by:
SamuelRostol earned 2000 total points
ID: 19561125
Ok, you almost had it :)

First of all - to set a instance name of a object, select it and look in the Properties Panel (on the bottom of the screen). There, in gray, stands <instance name> in a text-area. Select your FLVPlayback component, and write:

videoPlayer

in that field. That's step one. Step two - in the same properties panel, go to the tab called "Parameters", still with the FLVPlayback selected. You will see a list of choices. The very first choice is called "AutoPlay". It is default set to true. Change this to false (just double-click the value, and you'll get the choices up). Now the video will not start playing.

Last step - to make it play on click, add the following code to the first frame of the timeline:
videoPlayer.onRelease = function() {
    this.play();
    delete this.onRelease;
}
This code starts the video, and then removes the button :)

I got it to work locally by following this exact procedure, but I use Flash CS3 - so if you use a older version, you'll not be able to open the file. IF you use CS3, I'll send you the file if you can't figure it out :)

Good luck!
0
 

Author Comment

by:hpolat
ID: 19564033
Samuel, do you know how I can make the skin little bit transparent? if there is a way? the skin control (play, rewind, fwd etc..) is on the video and I want it to stay there but when video plays I wish there was a way to make it transparent so that it wouldn't block the video.
thank you
0
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 19571133
There is no way to make it transparent (except by using the transparent skin - the name starts with clear...), however you can make the controls go away when the user hasn't got the mouse over the button:

videoPlayer.skinAutoHide = true;

Put this code in the same place as videoPlayer.onRelease.. :)
0
 

Author Comment

by:hpolat
ID: 19572286
alright thank you, is there a place I can download transparent skin ? i don't think I have it on flash 8.. I should give you another 500 points :)
0
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 19578589
Don't think about the points, I've been awarded enough :)

If you open the Parameters Tab of the FLVPlayback component, there is a property called "skin". Double-click that, and you'll get a list over skins for your player. Some of those are semi-transparent - that's your best bet without creating your own video-player / skin.

I regretably don't know how to create your own skin, but good luck :)
0
 

Author Comment

by:hpolat
ID: 19578612
alright man, thanks alot.
0
 
LVL 12

Expert Comment

by:SamuelRostol
ID: 19578657
You're welcome :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
Over the past decade, as Internet security has become a chief concern of IT professionals, one of the most common questions administrators and users ask is, “Which is more secure, SFTP or FTPS?” In short, both file transfer protocols offer a high…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question