Link to home
Start Free TrialLog in
Avatar of martin69
martin69

asked on

FLASH get url and if equal gotoandstop frame

Im trying to get flash ActionScript 2 to read the current url and if it has say ?page=Meeting on the end of it it would goto and stop on a frame number i.e 40
Avatar of courtthree
courtthree

Cool, what kind of page does the flash movie appear in? Is it ASP.NET or PHP or something else? Have you already dealt with the issue of extracting the name value pairs from the url and getting that into the HTML of the page?
Avatar of martin69

ASKER

Php index.php

If you can do it with php that will be fine
OK, what's your site structure? Is it a single dynamic movie that you need to have the url talk to? That is, the same page is called several times but with a different name value pair?
the site structure consists of one php file index.php the flash movie does not talk to anything at present in php. it has roll over buttons that change the picture in the middle. but what i would like it to do is have an if statement that is ?page=Metting it would jump to say frame 40 and stop.
OK, there are two main ways to get the PHP and the Flash talking to each other (which is what you'll need to do if you want the Flash movie to read and react to the URL). The first is a LoadVars function and the second FlashVars. What method have you used to embed your Flash movie? Is it Adobe's run active content js or, perhaps, swfobject? Either way, we need to introduce FlashVars and I'll run you through that when you let me know your embedding method.
think its object. but not sure so code below. thanks

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="840" height="316">
              <param name="movie" value="flash/photos.swf">
              <param name="quality" value="high">
          <embed src="flash/photos.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="840" height="316"></embed></object>
ASKER CERTIFIED SOLUTION
Avatar of courtthree
courtthree

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
brilliant. works a treat. also if i double the points can i ask you this questioned too.

I have 3 pictures that fade on then after so many seconds fade on to another one.

how do i use xml to have one fade on and wait time line but it does it for how ever many items are listed in the xml in AS2

Well there's many, many ways to accomplish this! Tell me, have you already imported the references to the images via the XML? If so, have you loaded them into an array?
Hi no i have not imported or implemented an xml reference file to pictures yet. not sure where to start.
One other thing, how are the images managed? Will you manage them or do you have a scenario where third parties are uploading them etc?

If you're managing them, a simple text file that you can easily update will do the job. Let me now and write something out for you.
Hi, I have managed to do it in the end but thanks for the help with the phph and flash vars a great help.