Flash movement on html action

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

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!

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.

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?

here is an example in action… 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 …

 
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…


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

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


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 :smirk: