# Passing variable from HTML (or PHP) to Flash from in an onClick event?

**URL:** https://forum.kirupa.com/t/passing-variable-from-html-or-php-to-flash-from-in-an-onclick-event/48268
**Category:** flash
**Created:** [April 12, 2004, 2:26am UTC](https://forum.kirupa.com/t/passing-variable-from-html-or-php-to-flash-from-in-an-onclick-event/48268 "2004-04-12T02:26:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Joker69](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@Joker69](https://forum.kirupa.com/u/Joker69)
#### Post date: [April 12, 2004, 2:26am UTC](https://forum.kirupa.com/t/passing-variable-from-html-or-php-to-flash-from-in-an-onclick-event/48268/1 "2004-04-12T02:26:05Z")

</div>

Hi, I was wondering, say I had a Flash movie on one side of a page, and a list of links on the other side, say the links were like “image1”, “image2”, “image3”, etc, is there a way that I can pass a variable into the Flash movie on the onClick event, with like “image1” as the passed variable, so that I can dynamically load image1 when it’s clicked, and the same for the other images? Basically I wanna do this so I can have the images completely dynamically loaded in the Flash file, so that I just have to update the HTML if something new gets added, as opposed to having to update the whole SWF file, any help?
