FORUMS: list search recent posts

getting url variable into contentPath

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chip Johns
getting url variable into contentPath
on Oct 26, 2006 at 8:34:00 pm

Hi All,

I have been beating my head against the wall on this. Hoping someone can help me a bit.

I was hoping to keep it as simple as possible.
I want to have one flash file that will play my flv movies. (player.swf)
I will have quite a few movies. (001.flv, 002.flv, etc)
I want to pass a movie name with the url.


1) Link:
a href=""
a href=""

2) CFM page will take the url query string and assign it to a variable
cfset cpmovie = #URL.MyMovie#

3) CFM page will add this to the flash movie player url
param name="movie" value="player.swf?contentPath=cfoutput#cpmovie#cfoutput"
embed src="player.swf?contentPath=cfoutput#cpmovie#cfoutput" play="true" loop="false"....

4) FLash Player.swf will take this variable and use it to play the proper movie.

I am having trouble getting the variale into the contentPath for the player..??
I thought that when I passed the info using contentPath as my variable in the url, that this automatically assigned this to the Flash contentPath, but Either I am incorrect, or I need to do something specific to make flash recognize it..

Help..Please! Thanks..!


ps - I know that my tags above need <> around them. Just couldn't get them to show in this post...

Return to posts index

Sher Ali
Re: getting url variable into contentPath
on Oct 26, 2006 at 8:59:18 pm

I don't understand, either you are printing the hash symbols deliberatly or this a strange output, anyway fix the CFM printing url thing if it is not okay, as i don't know coldfusion. Also you are not using the param tag in the right way.Here is how you should go.

to get variables in flash from html pages or dynamic pages the param tag should look like:

taking your example:

when clicked the cfm page should format the param tag as:

Note: also u should format the embed section as well, for firefox and netscape etc. by just adding:

now the MyMovie string is available in flash as a variable at the root level and you should access this way:

flvComp.contentPath = unescape(_root.MyMovie);

Hope you will solve the problem now. If still have problem let me know.

Sher Ali

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved