Ticket #216 (closed enhancement: wontfix)

Opened 20 months ago

Last modified 18 months ago

displayclick: playpause when no link

Reported by: jeroen Owned by:
Milestone: Flash 4.2 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

Changed 20 months ago by jeroen

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) {

if(view.configdisplayclick? == 'link' && !view.playlist[view.configfile?]link?) {

view.sendEvent('link');

} else {

view.sendEvent(view.configdisplayclick?);

}

};

Makes sense this, so I'll put it in the default player too.

Changed 18 months ago by jeroen

  • status changed from new to closed
  • resolution set to wontfix

Building in this functionality presents new problems:

1. The 'link' icon is shown in the display, but still a click on the video starts the player. This is inconsistent. 2. 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.

Note: See TracTickets for help on using tickets.