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

load an external xml in an external loaded .swf

New Here ,
Jul 24, 2009 Jul 24, 2009

Hi there...

I've got a small (more than 100 hours of thinkwork up till now!) problem I can't seem to solve:

I want to populate an external loaded swf with an dynamicly loaded xml fil (loaded from my config.xml).

<menuItem bgColor="000000" bgHover="eeeeee" fontColor="cccccc" fontHover="ffffff">
     <title>home</title>
     <btntitle><![CDATA[Home]]></btntitle>
     <linktype>external swf</linktype>
     <url1>./content/swf/home.swf</url1>   <-- Loads the external swf in to the main swf -->
     <url2>./content/xml/home.xml</url2>  <loads the external xml file thet is needed in the external loaded swf in the line above -->

</menuItem>

how do I get the external xml into the external swf as a variable for the actionscript in the external loaded swf (So I just want to put the path in the script in my external swf...).

Can anyone help me out here cause I'm really stuck for now...

Thanks in advance!

greets William

TOPICS
ActionScript
874
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

Community Expert , Jul 24, 2009 Jul 24, 2009

the path to the xml file is relative the the html file that embeds your main swf.  it doesn't matter where the loaded swf is located (except for the path you'll use in your loadMovie() etc method).

Translate
Community Expert ,
Jul 24, 2009 Jul 24, 2009

the path to the xml file is relative the the html file that embeds your main swf.  it doesn't matter where the loaded swf is located (except for the path you'll use in your loadMovie() etc method).

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 ,
Jul 24, 2009 Jul 24, 2009

Sorry Kglad, this isn't embedded straight in to a html fil but from a main swf (full screen flash website i'm building).

The code example is a part of my nodes from the menu config xml...

William

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
Community Expert ,
Jul 24, 2009 Jul 24, 2009

if you're not using an html file, the path will be relative to your _level0 swf.

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 ,
Jul 24, 2009 Jul 24, 2009

the thing is that im loading everything via a for loop so I can't hard code everything...

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
Community Expert ,
Jul 24, 2009 Jul 24, 2009
LATEST

i dont know why a for-loop would make any difference.  you must use a correct path and the path should be a relative path.

does your xml load and parse correctly when you open your loaded swf without loading it into another swf?

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