PDA

View Full Version : Please help, linking from html



MidNite
10-25-2004, 11:08 AM
I am working with a team on a website that will feature Flash as a portion of the site. They have asked for something I'm not sure I can do. Here's the situation: they want to be able to jump to a certain part of the flash movie after it has gone to an html page. For example, there is a Contact Us link, and after the user goes to that link, if he/she hits the Home button it would go back to the original flash movie. But here's what they want: they want to be able to have that movie NOT replay itself, but return to the frame/scene that is static. I don't know if I am making sense here. If there is anyone that could help, I would be so grateful. I don't know how to look this up in the Help portions of Flash or on Google.

Ti
10-28-2004, 01:05 PM
We can tansfer variables to flash movie.
Something like this:

<EMBED src="/intro.swf?mode=1" .... etc>

We can make a first page, which loads the flash movie in php.

It will be like this:

$mode=intval($_GET["mode"]);
<EMBED src="/intro.swf<?php if ($mode) { echo "?mode=1"; ?>" .... etc>

So, if we load the site like this:
http://www.somesitename.none
there will be no variable transfered to Flash.

But if we load
http://www.somesitename.none/index.php?mode=1
The variable will be sent to Flash.

In the first frame of flash movie we put the actionscript code like this:

if (mode==1) {
GoToFrame(100);
}
With the desired frame number in place of 100.

Then we change internal links to homepage from pages like "Contat Us" to "/index.php?mode=1" or just "/?mode=1".

All this is my supposition, but probably it will work.

MidNite
10-30-2004, 01:21 AM
Thank you so much. This site has been a challenge, but -so far- I have been able to work it all out.

MidNite
11-27-2004, 02:22 AM
I found a quick/easy way to fix this! If you label a frame in the scene you want to play (such as mylabel) then in your html link, add a # sign before the label name.

For example, http://www.somesite.here/index.html#mylabel will take you to the point in the scene you want to skip to!

Granted, I have not tested this in all browsers, but it works in my IE.