# Problems with scope for newbie!

**URL:** https://forum.kirupa.com/t/problems-with-scope-for-newbie/256738
**Category:** flash
**Created:** [April 6, 2008, 6:59pm UTC](https://forum.kirupa.com/t/problems-with-scope-for-newbie/256738 "2008-04-06T18:59:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Boondogger](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@Boondogger](https://forum.kirupa.com/u/Boondogger)
#### Post date: [April 6, 2008, 6:59pm UTC](https://forum.kirupa.com/t/problems-with-scope-for-newbie/256738/1 "2008-04-06T18:59:42Z")

</div>

Hi,

I’m trying to change a global variable from within a MC. On my main timeline my variable is declared as follows [COLOR=darkred]\_root.Artist=“Test”;[/COLOR] I created a function which randomly selects a frame number in my MC on stage in order to show an image. At the same time code in this frame is meant to update [COLOR=darkred]\_root.Artist[/COLOR] with the content of the image. In my MC frame the value is changed as follows [COLOR=darkred]\_root.Artist=“Fragonard”; [/COLOR][COLOR=black]This doesn’t however seem to affect its value in the main timeline which stubbornly remains [/COLOR][COLOR=darkred]“Test”. I[/COLOR][COLOR=black] need my function in the main timeline to retrieve the new value of \_root.Artist from the MC.[/COLOR]

I hope I explained this okay!😊
