This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > February 2007 > Still Image in FLV Player
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Still Image in FLV Player
|
|
| GregABC 2007-02-19, 6:16 pm |
| I have a video player with a choice of videos that can be started using buttons
adjacent to the player. So far so good. The correct videos play when I click
the buttons. But is there a way to get a .jpg image to show in the player when
nothing is playing? I have searched the entire site here and can't find a
solution. All I want is a nice title frame to show when nothing is playing.
Is that doable? Thanks.
| |
| alanwallace4 2007-02-19, 6:16 pm |
| Hi,
What i do is pause my video at an apropriate point then press print screen
sysrq and paste the image into paint shop, crop it down and import it into
flash. like here....http://www.gal.footballnewcastle.co.uk/video.html a small
video thing which incidently shows me scoring my 96th goal fo my club :grin;
| |
| GregABC 2007-02-19, 6:16 pm |
| Thanks for the reply and example. I can import a still image onto the stage
successfully, as you did. But it stays there when the video starts playing. I
can't seem to control the visibility of it. I think that may be the key.
...Greg
| |
| David Stiller 2007-02-20, 10:15 pm |
| Greg,
> I can import a still image onto the stage successfully, as you
> did. But it stays there when the video starts playing.
That makes sense, though, right? Until you tell it to move ... an image
*should* stay put. ;)
> I can't seem to control the visibility of it. I think that may
> be the key.
In order to be able to address this image, you'll have to convert it to
a symbol. I recommend a movie clip symbol Doing so allows you to give that
movie clip an instance name (see the Property inspector, while the movie
clip is selected on Stage). Once it has an instance name, you can use
ActionScript to "call this object by name," so to speak, and tell it what to
do.
Each object in Flash has its own set of features. These are determined
by the object's class (in ActionScript, all objects are defined by a class,
which specifies that object's particular properties [characteristics],
methods [things it can do], and events [things it can react to]).
When it comes to Components, this principle still holds -- that is,
ActionScript even features an FLVPlayback class, which defines your
FLVPlayback object (the player itself) -- but the Components Language
Reference is organized a bit differently from the ActionScript 2.0 Language
Reference. In the ASLR, classes generally show properties, methods, and
events all in the same class entry. For some reason, the CLR separates
them, so Component classes are a little harder to "follow." In the case of
FLVPlayback, in particular, this object extends MovieClip and wraps the
VideoPlayer object, so you have more than one class to research.
But ... at least you've got a start now. :) FLVPlayback, via
VideoPlayer, provides quite a few events that may be of interest to you.
Controlling your image, which has now been converted to a movie clip --
that's much easier. You'll notice, for example, that the MovieClip class
features a MovieClip._visible property. When dealing with a class instance
(such as your image, which, as a movie clip, has been given an instance
name), you use the instance name, then a dot, then the property you're
interested in.
If your instance name is, say, posterFrame ...
posterFrame._visible = false;
.... will do it. As to *when* you want that image to go invisible ... that's
up to you, and will probably determined by the VideoPlayer.PLAYING property
of the VideoPlayer.state property.
David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."
| |
| GregABC 2007-02-20, 10:15 pm |
| Thank you very much for the detailed explanation. Early this morning I did
manage to make the still image (which I converted to a btn symbol) disappear
when I click a button to start the video . But I was unsuccessful trying to
get it to reappear when the stopButton was clicked on the player. I'll follow
your strategy and investigate the VideoPlayer.state property. Stay tuned.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|