Skip to main content
New Participant
September 24, 2010
Answered

Loading a swf in another swf and video play problem

  • September 24, 2010
  • 2 replies
  • 813 views

So i have an HTML page (in folder Subdirectory 1) and i embed 2.swf (in folder Subdirectory 2 (both folders are located in Parent Directory)).

2.swf loads 1.swf from Subdirectory 1.

In 1.swf i have a video player( which loads video1.flv from videos folder) and if run individually it plays without any problem.

If I run the html it loads both swf's but the video does not play because of a "Stream.NotFound" exception.

This arrangement of files and folders is a requirement for my project. So, please can you tell me, why this behaviour occures and if there is a way out from this.

This topic has been closed for replies.
Correct answer Andrei1-bKoviI

Looks like it is not very intelligent requirement/architecture to have assets all over the place. If you cannot convince people that created this architecture to get real, you can play with relative paths and, maybe, use LoaderInfo.loaderURL to get to the videos folder since it looks like videos folder is a subdirectory of the folder where 1.swf resides.

2 replies

September 24, 2010

I believe it is possible to do that, but sometimes it can get confusing. I think the path to the video should be relative to the HTML page. However it seems that is what you are doing, so I don't know what to say.

September 24, 2010

Why not get the relatvie path by slicing the path for 2.swf and then working backwards?

Inspiring
September 24, 2010

Looks like you use relative path. Relative path is relative to browser url - not the directory from which swf is loaded. Try to use absolute path.

New Participant
September 24, 2010

This would be a great solution, but i can't use an absolute path in this project. All paths must be relative to the html page.

Andrei1-bKoviICorrect answer
Inspiring
September 24, 2010

Looks like it is not very intelligent requirement/architecture to have assets all over the place. If you cannot convince people that created this architecture to get real, you can play with relative paths and, maybe, use LoaderInfo.loaderURL to get to the videos folder since it looks like videos folder is a subdirectory of the folder where 1.swf resides.