# Help passing a variable to FLVPlayer

**URL:** <https://forum.kirupa.com/t/help-passing-a-variable-to-flvplayer/203519>\
**Category:** flash\
**Created:** [October 11, 2006, 6:41pm UTC](https://forum.kirupa.com/t/help-passing-a-variable-to-flvplayer/203519 "2006-10-11T18:41:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vegiemite](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vegiemite](https://forum.kirupa.com/u/vegiemite)\
**Post date:** [October 11, 2006, 6:41pm UTC](https://forum.kirupa.com/t/help-passing-a-variable-to-flvplayer/203519/1 "2006-10-11T18:41:35Z")

</div>

I am working on a little gallery to play FLV clips. I have gotten the following working:

Frame 1 (labeled list) has a list of the videos with thumbnails that have the following variables assigned for onPress:  
videoPath = “path/to/video.flv”;  
returnTo = “list”;  
gotoAndPlay(“player”);

Frame 10 (labeled player) has an embedded FLVPlayer Component which grabs the videoPath and plays the video referenced.

Now I am working with a scrolling component I found online so I can have a longer list of videos in Frame 1 but the long list is inside its own movieclip.

So I have made the variables global:

\_global.videoPath = “path/to/video.flv”;  
\_global.returnTo = “list”;  
\_root.gotoAndPlay(“player”);

and it still works except it wont play the video.

I have the following on the FLVPlayer component frame:  
// Begin playing the FLV file  
videoplayer.play(\_global.videoPath);

where videoplayer is the instancename of the FLVComponent.

Any ideas why it’s not working? I’m a bit of a newb at actionscript so if you need more info let me know.

Thanks,  
Jon
