# Flash movement on html action

**URL:** <https://forum.kirupa.com/t/flash-movement-on-html-action/183506>\
**Category:** Uncategorized\
**Created:** [March 27, 2006, 7:05pm UTC](https://forum.kirupa.com/t/flash-movement-on-html-action/183506 "2006-03-27T19:05:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thinking\_inc](https://avatars.discourse-cdn.com/v4/letter/t/6f9a4e/32.png) [@thinking\_inc](https://forum.kirupa.com/u/thinking_inc)\
**Post date:** [March 27, 2006, 7:05pm UTC](https://forum.kirupa.com/t/flash-movement-on-html-action/183506/1 "2006-03-27T19:05:29Z")

</div>

Hey out there all you geniuses. Hope you can help me out. Video production is my specialty but I find myself getting flashed at work this week.

Problem: We have a very basic html site using png bg images with hotspots as links. We are firm believers in less is more and we want to incorporate just a bit of flash movement. When the user clicks on a link and goes to another page on our site we would like our flash graphic to change images. The flash graphic is in a window that is always displayed. So is it possible to have flash take direction from outside of flash like the html link?

Thanks for you time…

justin  
thinking HD

---

<div class="post-metadata">

**Author:** ![Soig](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Soig](https://forum.kirupa.com/u/Soig)\
**Post date:** [March 27, 2006, 11:01pm UTC](https://forum.kirupa.com/t/flash-movement-on-html-action/183506/2 "2006-03-27T23:01:56Z")

</div>

Hi Justin, I know that flash can take Cues from HTML when it loads. So you could make one flash banner and apply it to several different websites because the websites pass a cue onLoad.

However to give a cue to the Flash file at run time is a bit harder. For that you would have to know PHP and I’m not sure if the project would be worth the effort.

Whenever you use PHP (like in a mail form) flash sends the information and awaits a confirmation from the PHP file. Based on that confirmation, you could make flash to do anything. What I would do (if it really is that important) is to set up a PHP file. And have the HTML file direct to a new link and send a message to PHP. Then PHP would get back to flash and from there the action would be taken.

I really don’t have the time to get into it in any more detail, much less get you started on the project. But as far as ideas go, I believe that is the way to do it. Best of luck!

---

<div class="post-metadata">

**Author:** ![RichL](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@RichL](https://forum.kirupa.com/u/RichL)\
**Post date:** [March 30, 2006, 10:45am UTC](https://forum.kirupa.com/t/flash-movement-on-html-action/183506/3 "2006-03-30T10:45:02Z")

</div>

Couldn’t you use a LocalConnection in some way? maybe have a (hidden) flash movie in each new page that (as the page, and movie, is loaded) does nothing but send a local message to your “permanent” flash movie that it should change image.

---

<div class="post-metadata">

**Author:** ![thinking\_inc](https://avatars.discourse-cdn.com/v4/letter/t/6f9a4e/32.png) [@thinking\_inc](https://forum.kirupa.com/u/thinking_inc)\
**Post date:** [April 3, 2006, 11:01pm UTC](https://forum.kirupa.com/t/flash-movement-on-html-action/183506/4 "2006-04-03T23:01:09Z")

</div>

thanks for both of your time. just the mention of php frightens me away. our coding expert is mia. the hidden flash file seems like it could work. does anyone happen to know a script that would perform that operation?

---

<div class="post-metadata">

**Author:** ![RichL](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@RichL](https://forum.kirupa.com/u/RichL)\
**Post date:** [April 5, 2006, 12:30pm UTC](https://forum.kirupa.com/t/flash-movement-on-html-action/183506/5 "2006-04-05T12:30:42Z")

</div>

here is an example in action… [http://myweb.tiscali.co.uk/richstuff/lcfs.html](http://myweb.tiscali.co.uk/richstuff/lcfs.html)

in the top frame is an image (of a letter) and a dynamic text field that both get updated by moving from page to page in the lower frame.

the pages that load into the lower frame have a one pixel swf that sends a message to the top swf to update its image and text.

the one pixel swfs could be completely hidden by making their background colors the same as the html pages they are in.

code in the top swf …

```auto
 
this.createEmptyMovieClip("holder",1);
holder._x = 150;
holder._y = 30;
var receiving_lc:LocalConnection = new LocalConnection();
receiving_lc.onUpdateImage = function(image) {
  if(image=="image1"){
   holder.attachMovie("tholder","tholder",1);
   imagetxt.text="tpic";
  };
  if(image=="image2"){
   holder.attachMovie("xholder","xholder",1);
   imagetxt.text="xpic";
  };
};
receiving_lc.connect("UpdateImage");

```

code in the swf which is in the first lower html page…

```auto

var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("UpdateImage","onUpdateImage","image1");

```

code in the swf which is in the second lower html page…

```auto

var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("UpdateImage","onUpdateImage","image2");

```

i have no idea whether this is the best solution to your problem but it does seem to work 😏
