Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Loading a swf in another swf and video play problem

New Here ,
Sep 24, 2010 Sep 24, 2010

image1.jpg

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.

TOPICS
ActionScript
747
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 24, 2010 Sep 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.

Translate
LEGEND ,
Sep 24, 2010 Sep 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 24, 2010 Sep 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 24, 2010 Sep 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 24, 2010 Sep 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 24, 2010 Sep 24, 2010
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines