# \[MX04\] Truncate a variable with AS

**URL:** <https://forum.kirupa.com/t/mx04-truncate-a-variable-with-as/208497>\
**Category:** flash\
**Created:** [November 29, 2006, 12:20pm UTC](https://forum.kirupa.com/t/mx04-truncate-a-variable-with-as/208497 "2006-11-29T12:20:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rumpus](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rumpus](https://forum.kirupa.com/u/rumpus)\
**Post date:** [November 29, 2006, 12:20pm UTC](https://forum.kirupa.com/t/mx04-truncate-a-variable-with-as/208497/1 "2006-11-29T12:20:00Z")

</div>

hi all, if i have a variable called textVar and that variable always holds the path to external swf files to be loaded into a loader component and that path always starts with swf/ and then the file name, ie. swf/movietoload.swf, is there a way of then getting that value into another variable but without the swf/ part so I just have the file name?

Secondly, can you associate a media controller to an swf file that is loaded into a loader component rather than a media display component?

Thank very much… A
