Ticket #216 (closed enhancement: wontfix)
displayclick: playpause when no link
| Reported by: | jeroen | Owned by: | |
|---|---|---|---|
| Priority: | Milestone: | Flash 4.2 | |
| Component: | Keywords: | ||
| Cc: | Forum thread: |
Description
I have a question regarding a modification in the source code of the flv player. I hope, you can help me, I hardly programmed Flash before. :) My target: Use the displayclick-event as LINK only if a link was set for the video. Otherwise use the displayclick as Play / Pause.
In the flashvars I set displayclick to LINK and then I play 2 videos, the first with { ..., link: ' http://url' }, the second with { ..., link: undefined }
I wanted to add this modification in the View.as in the function sendEvent() ... propably it would be better in another function, but I took this way :)
This is the code, I wrote until now (wrote this directly above the line "dispatchEvent(new ViewEvent(typ,dat));"):
if( typ == 'LINK' && configlink? == undefined ) {
typ = 'PLAY'; if( _configstate? == 'PLAYING' )
datstate? = false;
else
datstate? = true;
}
But this doesn't work (it always plays / pauses the video), because configlink? is always undefined. I also tried the private variable _configlink?, but this is also undefined. Is there a way to find out, whether a link was set?
Change History
comment:2 Changed 5 years ago by jeroen
- Status changed from new to closed
- Resolution set to wontfix
Building in this functionality presents new problems:
- The 'link' icon is shown in the display, but still a click on the video starts the player. This is inconsistent.
- Additional code is needed inside the display to check for the playlist and -items. This is better left in the Controller and not copy-pasted into a plugin.

This might be better placed in the DisplayView, since it's a display-specific feature. In there, there is a clickHandler() function. You could do something like this:
/ Process a click on the display. / private function clickHandler(evt:MouseEvent) {
};
Makes sense this, so I'll put it in the default player too.