0

Hello,
I have been looking for a solution for a long time. I have embedded a SWF app in html page using SWFObject. Now I need to give the Flash app the address where it is currently embedded, since the same SWF file is embedded in more than one locations! So the Flash app is supposed to pull the right content according to its current position.
I am open to everything!
any ideas are welcomed!
I will be fine if I have to send the current URL through JS in my embedding html!
please help! !!!

3
Contributors
10
Replies
11
Views
7 Years
Discussion Span
Last Post by rajarajan07
0

You can accomplish your task by using JAVA SCRIPT and FLASH

Logic:

i) Using javascript you can find the url of the page
ii) Pass the result to flash using the flash communication with javascript
iii) External Interface is used to execute the javascript functions from flash
iv) So based on the result you can have a logic there to implement your need.

Hope you understand.

Edited by rajarajan07: n/a

0

thank you so much for you prompt reply!
According to your guideline, I am stuck somewhere in the middle of second and third point.
I have obtained the URL in javascript. Now I need to send this URL to flash.
The problem is this javascript also does the embedding!
so somehow, this script is supposed to do two things in the right order
first: it needs to embed the flash app properly (which it does)
second: Once the app is embedded and, it needs to send the URL
i would really appreciate it if you could help me on this one!
thanks!

You can accomplish your task by using JAVA SCRIPT and FLASH

Logic:

i) Using javascript you can find the url of the page
ii) Pass the result to flash using the flash communication with javascript
iii) External Interface is used to execute the javascript functions from flash
iv) So based on the result you can have a logic there to implement your need.

Hope you understand.

0

Actually what you want to control in flash? Are you changing animations based on the URL or something else?

here is the complete stroy:

  • The flash app (.swf) is in the root of the website.
  • The same app is embedded in many different pages in different directories (not in the root!)
  • When the app is "called" on a webpage, it reads the text content from the directory where the page is embedded at the moment
0

not hosted yet!
the swf is a full fledged flash app
it reads text from the same directory

0

Ok, Whether the text reads from a text file or xml? Is it contains different datas for different pages? Whats the problem now? You have flash fla with you?

Edited by rajarajan07: n/a

0

the text files are XMLs
and each xml file has different contents!
so when the flash app loads, it needs to look for the XML file, and in order to look into the right folder, it needs to know where exactly it is embedded!

0

Okay, then the problem is to change your fetching url code within your flash file. You know flash to edit the contents? There we have a external interface class to solve your problem.

One more quesiton, do you paste your code flash url code which is already there?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.