# Flv toggle button

**URL:** <https://forum.kirupa.com/t/flv-toggle-button/277490>\
**Category:** Uncategorized\
**Created:** [December 12, 2008, 3:46pm UTC](https://forum.kirupa.com/t/flv-toggle-button/277490 "2008-12-12T15:46:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![triad](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@triad](https://forum.kirupa.com/u/triad)\
**Post date:** [December 12, 2008, 3:46pm UTC](https://forum.kirupa.com/t/flv-toggle-button/277490/1 "2008-12-12T15:46:17Z")

</div>

I am trying to create a button for my custom flv player that gives the user the ability to toggle between a hi res or low res flv.  
The button (instance name = res)will at first be visible but when clicked it will load hi-res.flv and button will disappear  
A new button(instance name res2)will appear and when clicked play low res.flv and son like a toggle.  
I have the code to toggle between the two flvs but how do i make the buttons function as mentioned above.  
Cheers in advance.  
Here is my flv toggle code

[code=text]  
var hiVer:Boolean = true;

function playFlik(filmName:String){  
ns.play(filmName);  
}

res.onRelease = function(){  
if(hiVer){  
//play hi version  
playFlik(“hiResMovie.flv”);  
//toggle  
hiVer = false;  
}  
res2.onRelease = function(){  
if(hiVer){  
//play hi version  
playFlik(“hiResMovie.flv”);  
//toggle  
hiVer = false;

```auto

[triad promotional merchandise and business gifts supplier UK](http://www.triaduk.co.uk) 
http://www.triaduk.co.uk] triad promotional merchandise and business gifts
```
