AVPlayer.SetFinishedEvaluate
----------------------------

Sets expression to be run when playback is finished.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [AVPlayer](component_AVPlayer.md) | [7.4](newinversion74.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "AVPlayer.SetFinishedEvaluate"; AVPlayer; Expression ) 

**MBS**( **"AVPlayer.SetFinishedEvaluate";** /\* Sets expression to be run when playback is finished. \*/  
**$AVPlayer**; /\* The reference number of the player.e.g. $Player \*/   
**$Expression**) /\* The expression to evaluate.  
Can be in local language of FileMaker Pro or english.   
For Server must always be in english.e.g. "Let ( $$Done = 1 ; 1 )" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| AVPlayer | The reference number of the player. | $Player |
| Expression | The expression to evaluate.   Can be in local language of FileMaker Pro or english.    For Server must always be in english. | "Let ( $$Done = 1 ; 1 )" |

### Result

Returns OK or error.

### Description

Sets expression to be run when playback is finished.  
In the expression the text $$ID$$ will be replaced when evaluated with the curl reference, so you can pass it to other functions if needed.  
### Examples

Sets evaluate for when player finished to show dialog:

 Set Variable \[ $r ; Value: MBS ("AVPlayer.SetFinishedEvaluate"; $Player ; "MBS ( \\"Msgbox\\"; \\"Player done.\\" )") \]  
### See also

- [AVPlayer.GetFinishedEvaluate](AVPlayerGetFinishedEvaluate.md)
- [AVPlayer.GetFinishedFileName](AVPlayerGetFinishedFileName.md)
- [AVPlayer.SetFinishedScript](AVPlayerSetFinishedScript.md)
- [AVPlayer.SetProgressEvaluate](AVPlayerSetProgressEvaluate.md)

### Release notes

- **Version 7.4**
    - Added [AVPlayer.GetFinishedEvaluate](http://www.mbsplugins.eu/AVPlayerGetFinishedEvaluate.shtml), [AVPlayer.GetFinishedFileName](http://www.mbsplugins.eu/AVPlayerGetFinishedFileName.shtml), [AVPlayer.GetFinishedScriptName](http://www.mbsplugins.eu/AVPlayerGetFinishedScriptName.shtml), [AVPlayer.SetFinishedEvaluate](http://www.mbsplugins.eu/AVPlayerSetFinishedEvaluate.shtml) and [AVPlayer.SetFinishedScript](http://www.mbsplugins.eu/AVPlayerSetFinishedScript.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 7.4pr5](https://www.mbsplugins.de/archive/2017-09-11/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin Schulung auf Deutsch bei der FMK 2017](https://www.mbsplugins.de/archive/2017-09-11/MBS_FileMaker_Plugin_Schulung_/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 6th September 2017 , last changed 24th January 2019

  
[AVPlayer.SetControlsStyle](AVPlayerSetControlsStyle.md) - [AVPlayer.SetFinishedScript](AVPlayerSetFinishedScript.md)

[HTML Version](AVPlayerSetFinishedEvaluate.shtml)