Hi, I am using Flash 8 with Actionscript 2.0. I am unable to stop my Flash Videos from playing as soon as the page loads. Tried everything...please help, Thank You

Dani AI

Generated

Confirmed — ’s issue was resolved using ’s tip to stop the FLVPlayback from auto-starting. For others who hit the same problem, here are a few practical gotchas and safe fixes that go beyond toggling the component parameter.

If you create or change the player at runtime, set the player so it won’t auto-start before you assign the video file. A simple, robust pattern is to delay assigning the video path until the user presses Play; for example (AS2):

playBtn.onRelease = function() {
  flvPlayer.contentPath = "video.flv";
};

Other things to check: make sure there are no stray calls to play() on the main timeline or in a parent SWF, verify the instance name you reference exactly matches the stage instance, and confirm wrapper HTML/JS flashvars aren’t overriding component parameters. The FLVPlayback component exposes properties like autoPlay and contentPath that control load/play behavior — keep property changes before loading the content to avoid race conditions. (flylib.com)

Note about long-term maintenance: FLV/Flash is a legacy format and Flash Player was officially retired (end-of-life) on December 31, 2020. For new or maintained sites, migrate video to HTML5 <video> with MP4/WebM sources or use a modern JS player; MDN’s video guide is a good starting point. ()

Quick checklist: set auto-play off before loading the file, avoid implicit play() calls on init, confirm exact instance names and scope, and if possible move to HTML5-based delivery for future compatibility.

Recommended Answers

All 3 Replies

Hi, I am using Flash 8 with Actionscript 2.0. I am unable to stop my Flash Videos from playing as soon as the page loads. Tried everything...please help, Thank You

Have you tried setting the autoPlay parameter of the FLV playback component to false? That should solve the problem...

To do this:
Open up your .fla, select the instance of the FLV playback component on the stage and then open up the 'component inspector' panel. (by selecting 'Window->component inspector' from the top menu or by pressing Alt+F7)

In the parameters tab of component inspector, right at the top of the list is a parameter called autoPlay, which is set to 'true' by default...Set this to 'false' and that should stop the video from auto-playing when the page loads..The user will then have to manually start the vid by pressing play on the FLV playback components controls.

Note:The above steps will only work if your FLV component has been manually added to the stage (i.e. you dragged and dropped an instance of it onto the stage from the component panel).

If you are dynamically adding your FLV player instance onto the stage via actionscript instead, then you'll need to do the following:
Wherever you're attaching the new instance of the FLV playback component, be sure to add the following line of AS to set the autoPlay property:
{FLV player instance name}.autoPlay=false;

So if you used actionscript to attach an instance of an FLV player control with an instance name of 'myFLVPlayback'; after creating the instance you would need to add:

myFLVPlayback.autoPlay=false;

If neither of the above methods work (both should!), then the only other explanation is that there must be some code in your actionscript which is causing the FLV component to play.
e.g. An explicit call to myFLVPlayback.play() somewhere in your onload() for the main movie.

I think that just about covers all of the possibilities, give it a shot and let me know how you get on!

It Worked!!!THANK YOU SOO MUCH!!!!!

Excellent, not begging or having a go or anything, but any chance you can mark this as solved??

J.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.