DIRE * Need help with flash/xml for HW due tommorow :(

Platypus

Lifer
Apr 26, 2001
31,046
321
136
I am trying to embed a flash menu I made (.swf) but it relies on an XML file for the information inside the menu such as the links etc. I tried embeding the flash menu into this website that is due for class tommorow, and it only loads a blank white box that is a flash movie, but obviously has no content because it cannot read the info it needs from the XML file. Can anyone please help me very quickly I am about to go insane I've been making this page for hours.

 

Ameesh

Lifer
Apr 3, 2001
23,686
1
0
this is soo vauge..


is your xml file in the right directory?

is your computer even on?




(need more info)
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Originally posted by: Ameesh
this is soo vauge..


is your xml file in the right directory?

is your computer even on?




(need more info)


How is this vague? Yes of course the XML file is in the same DIR. The problem is that when I embed the flash movie into the website, it doesn't read the XML file in the same DIR. Is there a bit of code I need to connect them? I just started using flash, so I am pretty lost here and I cannot use any code editors.
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Ok no music, I already made the file, I am trying to embed it into the website
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Which version of Flash did you publish as? MX or Flash 5? The latter used loadVariables() and also had XML socket capabilities that I never got into. Either way, you need to specify to the .swf (in the FLA) to connect to your XML file somehow. You can't just place it in the same directory and expect it to pick up the vars. As far as MX goes... you can use the same method as Flash5 (if you publish it as such). Only publish as MX if you are using MX-specific actionscript.
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Ok let me make this simpiler. It is not linking the XML with the flash, like I said before it's EMBEDDING THE FILE INTO A WEBSITE that is the problem.
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Can you quickly post your assignment instructions? I've never heard of EMBEDDING AN XML FILE using Flash. You said in your first post that an SWF retrieves information from the XML file (like vars, right?). Why must you use Flash to EMBED the XML file to a directory on your webserver? You keep saying EMBED IT. Which IT ? XML or SWF ?
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Originally posted by: CorporateRecreation
Ok let me show you then..

I need to embed a flash movie into a website. This flash movie needs an XML to run properly. When it's embedded, it's a plain white box, with no content.

White box of messed up flash
Flash alone

How is your standalone file reading the XML content right now? I notice that you're embedding both the .swf and .xml file in your webpage source. You cannot embed XML like that. XML shouldn't be referenced by HTML code at all... it should be referenced by actionscript within your SWF. Try removing the code in your HTML page where it states <embed src="/~asuarez/site/pics/menu.xml"> and run it again. Obviously the swf calls whatever it needs from the XML file successfully already (from seeing your standalone file).
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Originally posted by: rh71
Originally posted by: CorporateRecreation
Ok let me show you then..

I need to embed a flash movie into a website. This flash movie needs an XML to run properly. When it's embedded, it's a plain white box, with no content.

White box of messed up flash
Flash alone

How is your standalone file reading the XML content right now? I notice that you're embedding both the .swf and .xml file in your webpage source. You cannot embed XML like that. XML shouldn't be referenced by HTML code at all... it should be referenced by actionscript within your SWF. Try removing the code in your HTML page where it states <embed src="/~asuarez/site/pics/menu.xml"> and run it again. Obviously the swf calls whatever it needs from the XML file already (from your standalone file.

I tried this. It still comes up with a white box. It's almost as if the swf file cannot read the XML file or something. But when they're in the same directory you can.
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Originally posted by: CorporateRecreation
Originally posted by: rh71
Originally posted by: CorporateRecreation
Ok let me show you then..

I need to embed a flash movie into a website. This flash movie needs an XML to run properly. When it's embedded, it's a plain white box, with no content.

White box of messed up flash
Flash alone

How is your standalone file reading the XML content right now? I notice that you're embedding both the .swf and .xml file in your webpage source. You cannot embed XML like that. XML shouldn't be referenced by HTML code at all... it should be referenced by actionscript within your SWF. Try removing the code in your HTML page where it states <embed src="/~asuarez/site/pics/menu.xml"> and run it again. Obviously the swf calls whatever it needs from the XML file already (from your standalone file.

I tried this. It still comes up with a white box. It's almost as if the swf file cannot read the XML file or something. But when they're in the same directory you can.

Yes, it is very obvious that your SWF cannot FIND the XML file... not that it cannot read from it. How do you currently call the XML content within your SWF ? What's your script look like? Try some absolute paths.
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Can I send you the .swf and the .xml files and you can tell me what's up with them because I am a total n00b at flash and this is one of the tutorials that they give you when you start the program. I just started flash like a week ago.

Do you have gaim or aim or something ?
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Just as a suggestion, you should also try the Flash masters at Flashkit's board. Give them the 2 samples as you did here and I'm sure they'll figure it out. Might save you some time too.
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Originally posted by: CorporateRecreation
Can I send you the .swf and the .xml files and you can tell me what's up with them because I am a total n00b at flash and this is one of the tutorials that they give you when you start the program. I just started flash like a week ago.

Do you have gaim or aim or something ?

You need to send me the FLA and XML file (I saw the XML code thru the browser already anyway). AIM won't work, can you email to rh71@optonline.net zipped up?
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Ok... try this... in your HTML code... specify EMBED src="menu.swf" instead of embed src="/~asuarez/site/pics/menu.swf" AND ALSO specify PARAM NAME=movie VALUE="menu.swf" instead of param name=movie value="/~asuarez/site/pics/menu.swf"

These absolute paths may be screwing up the XML reference.

EDIT>> actually hold on... it won't find it in that dir since you've placed them in the /pics subdirectory and that's not the path your webpage is on... is there any chance you can throw menu.swf and menu.xml in the /site directory instead of /pics subdir ? (move it 1 dir up then apply the changes I stated in this post).
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Originally posted by: CorporateRecreation
Done, no luck.

You moved the files up from the /pics directory into the /site directory and it failed?

EDIT>>> I just clicked on your page again and it's working... albeit TINY. You need to play with your parameter sizes within your HTML embed code.
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Ok it loads but now it's small as hell and the backround is white, anyway to change it to grey in the XML code and to make it larger?
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
Originally posted by: CorporateRecreation
Ok it loads but now it's small as hell and the backround is white, anyway to change it to grey in the XML code and to make it larger?

Use this...
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="640" HEIGHT="480" id="menu" ALIGN="">
<PARAM NAME=movie VALUE="menu.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="menu.swf" quality=high bgcolor=#FFFFFF WIDTH="640" HEIGHT="480" NAME="menu" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

If the size is too large/small... play around with the WIDTH/HEIGHT. About the menu being white and the rest of your page being gray, if you make your menu gray, the menu items will disappear because they're gray too. My advice to you is to change the rest of your page white instead of gray.

If you must make your menu gray, the code is:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="640" HEIGHT="480" id="menu" ALIGN="">
<PARAM NAME=movie VALUE="menu.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#999999> <EMBED src="menu.swf" quality=high bgcolor=#999999 WIDTH="640" HEIGHT="480" NAME="menu" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

BUT, you must then edit your XML file for colors to make the menu items show up as another color. (see the hassle?).
 

Platypus

Lifer
Apr 26, 2001
31,046
321
136
Any advice on how to make it larger? I can make the height and width bigger, but the text is still small.

Thank you so much for your help rh71 you rock.