Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Abdul Qabiz

Why don't you pass the path of XML to SWF using FlashVars. When SWF loads,
it would have variable available, you dont need to detect or do anything
else.

Yeah, you need to make sure you pass the path.

-abdul


On 6/12/06, Matt Mc [EMAIL PROTECTED] wrote:


Loading XML in the HTML Embed Tag

What I am doing:
I have a dynamic MP3 player that I need to play a single MP3 per swf. I
need to load XML file from a link in the html embed tag, this way I can use
the same player for different XML files that call out each MP3 from dynamic
locations.

How it works now:
Right now I am loading the XML with the path coded into an action script
file.

// playlist variables
 private var playlistURL:String = playlist.xml;
 private var playlistObj:jwPlaylist;
 private var playlistArray:Array;

What I need help with:

I need to create a flashvar that will load in the XML dynamically from a
link in the Embed tag.

How do I get the action script to detect and load the variable in the
Embed tag?

I am looking for the code that you put in the ebed tag and the code that
accepts it in the actionscript file.


I just need a small push in the right direction.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc
Thanks Abdul But I am not sure I know how to do that. Can you give me an idea 
of what that would look like. Sorry I am a total noob and I am treading water 
if you know what I mean. 
   
  I really appreciate any help you can give me in solving this dynamic linking 
problem.
   
  Matt

Abdul Qabiz [EMAIL PROTECTED] wrote:
  Why don't you pass the path of XML to SWF using FlashVars. When SWF loads,
it would have variable available, you dont need to detect or do anything
else.

Yeah, you need to make sure you pass the path.

-abdul


On 6/12/06, Matt Mc wrote:

 Loading XML in the HTML Embed Tag

 What I am doing:
 I have a dynamic MP3 player that I need to play a single MP3 per swf. I
 need to load XML file from a link in the html embed tag, this way I can use
 the same player for different XML files that call out each MP3 from dynamic
 locations.

 How it works now:
 Right now I am loading the XML with the path coded into an action script
 file.

 // playlist variables
 private var playlistURL:String = playlist.xml;
 private var playlistObj:jwPlaylist;
 private var playlistArray:Array;

 What I need help with:

 I need to create a flashvar that will load in the XML dynamically from a
 link in the Embed tag.

 How do I get the action script to detect and load the variable in the
 Embed tag?

 I am looking for the code that you put in the ebed tag and the code that
 accepts it in the actionscript file.


 I just need a small push in the right direction.


 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Merrill, Jason
Thanks Abdul But I am not sure I know how to do that. Can you give me
an idea of
what that would look like. Sorry I am a total noob and I am treading
water if you
know what I mean.

Using Flashvars is extremely easy - all you have to do is add a PARAM to
the object tag, or a Flashvars to the Embed tag.  Then that variable is
already created and available in the Flash file when it loads.  You just
reference it like any other variable at that point.  See this technote:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16417


Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc
All the resources I get tell me how to put a flashvar into an embed tag but not 
the syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is simple 
because everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0;
 width=300 height=46 id=NoxPlayer align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml quality=high 
wmode=transparent devicefont=true bgcolor=#00 width=300 height=46 
name=NoxPlayer align=middle allowScriptAccess=sameDomain 
type=application/x-shockwave-flash 
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get this to 
work.

If anyone can give me a detaild response or steer me to a tutorial that will 
show me the syntax to use in the action script document. Not the first frame of 
the FLA

Thanks

If you want to look at the files let me know I will post them. It is an mp3 
player but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Geoffrey Holland
How about:

private var playlistURL:String = _root.xmlURL
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

give that one a whirl!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Mc
Sent: Monday, June 12, 2006 3:20 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Help loading xml in html embed tag

All the resources I get tell me how to put a flashvar into an embed tag but
not the syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is simple
because everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.
cab#version=7,0,0,0 width=300 height=46 id=NoxPlayer align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle allowScriptAccess=sameDomain
type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;


How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get this
to work.

If anyone can give me a detaild response or steer me to a tutorial that will
show me the syntax to use in the action script document. Not the first frame
of the FLA

Thanks

If you want to look at the files let me know I will post them. It is an mp3
player but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Merrill, Jason
On the Flash end, there is no syntax - as I mentioned, you just call
it like any other variable - it should already exist if you have
Flashvars right in the HTML.  It's suppose to be inserted even before
frame 1 initializes.  

Really, just in Flash:

trace(myVariable)

Jason Merrill
Bank of America 
Learning Technology Solutions
 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Matt Mc
Sent: Monday, June 12, 2006 4:20 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Help loading xml in html embed tag

All the resources I get tell me how to put a flashvar into an embed
tag but not the
syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is
simple because
everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/sw
fl
ash.cab#version=7,0,0,0 width=300 height=46 id=NoxPlayer
align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml
quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle
allowScriptAccess=sameDomain
type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get
this to work.

If anyone can give me a detaild response or steer me to a tutorial
that will show
me the syntax to use in the action script document. Not the first
frame of the FLA

Thanks

If you want to look at the files let me know I will post them. It is
an mp3 player
but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread elibol

Hey man,

Another way to do this is to add a query string to the swf you're embedding.

In HTML you do:

object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0;
width=300 height=46 id=NoxPlayer align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf?xmlURL=playlist.xml /
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf?xmlURL=playlist.xml quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle allowScriptAccess=sameDomain
type=application/x-shockwave-flash pluginspage=
http://www.macromedia.com/go/getflashplayer; /
/object

In AS you do:

  private var playlistURL:String = _root.xmlURL;
  private var playlistObj:jwPlaylist;
  private var playlistArray:Array;

The main idea is that when you pass variables in from an embed tag, the
variables will be properties of the _root object.

So calling _root then the name of your variable, like _root.xmlURL, will
give you your value.

M.



On 6/12/06, Merrill, Jason [EMAIL PROTECTED] wrote:


On the Flash end, there is no syntax - as I mentioned, you just call
it like any other variable - it should already exist if you have
Flashvars right in the HTML.  It's suppose to be inserted even before
frame 1 initializes.

Really, just in Flash:

trace(myVariable)

Jason Merrill
Bank of America
Learning Technology Solutions







-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Matt Mc
Sent: Monday, June 12, 2006 4:20 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Help loading xml in html embed tag

All the resources I get tell me how to put a flashvar into an embed
tag but not the
syntax for bringing the variable into my Action Script Document.

I have been working on this for almost a week now and I know it is
simple because
everyone keeps telling me so.

If I can't get this I am dead.

here is my embed tag:
object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/sw
fl
ash.cab#version=7,0,0,0 width=300 height=46 id=NoxPlayer
align=middle
param name=allowScriptAccess value=sameDomain /
param name=movie value=NoxPlayer.swf /
param name=FlashVars value=xmlURL=playlist.xml
param name=quality value=high /
param name=wmode value=transparent /
param name=devicefont value=true /
param name=bgcolor value=#00 /
embed src=NoxPlayer.swf FlashVars=xmlURL=playlist.xml
quality=high
wmode=transparent devicefont=true bgcolor=#00 width=300
height=46 name=NoxPlayer align=middle
allowScriptAccess=sameDomain
type=application/x-shockwave-flash
pluginspage=http://www.macromedia.com/go/getflashplayer; /
/object


here is how they get the xml document now.

private var playlistURL:String = playlist.xml;
private var playlistObj:jwPlaylist;
private var playlistArray:Array;

How do I make this get the playlist.xml link from the embed tag.

I can't seem to get the syntax right or something because I can't get
this to work.

If anyone can give me a detaild response or steer me to a tutorial
that will show
me the syntax to use in the action script document. Not the first
frame of the FLA

Thanks

If you want to look at the files let me know I will post them. It is
an mp3 player
but my boss wants to add the xml with dynamic links




 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc


elibol [EMAIL PROTECTED] 

I really appreciate you guys helping. For some reason it is still not working. 
I am going to load a zip file of the project. I just need this playlist to be 
dynamic to make my boss happy before I get canned. he knows I am not an 
actionscripter but he seems to think this is easy.

Perhaps it has something to do with the way the files are set up. It works just 
fine untill I try to load a variable. I know it is their because I tested it in 
a text box. 

If anyone can help That would be great. I have a feeling I will be up all night 
again.

Matthew McLemore

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread elibol

Maybe you're loading the xml file relative to the swf?

If you define the xml files location relative to the swf file and the html
document you're embedding the swf file into is located in different
directory then the xml location will be incorrect.

example:

Lets say that these are the paths:

./player/player.swf
./player/playlist.xml
./index.html

If you pass './playlist.xml' as the path from where index.html is located
(as it would be the correct location relative from player.swf) and run the
index.html you should get null for your playlist.xml.

I'm doubting it's the playlist.xml path that is incorrect since you
mentioned that you've seen it work in the textfield, but maybe the paths to
the mp3s should be tested...

In the end, all paths must be defined relative to the swf.

You can email me the files if it becomes really critical: [EMAIL PROTECTED]

M.

On 6/12/06, Matt Mc [EMAIL PROTECTED] wrote:




elibol [EMAIL PROTECTED]

I really appreciate you guys helping. For some reason it is still not
working. I am going to load a zip file of the project. I just need this
playlist to be dynamic to make my boss happy before I get canned. he knows I
am not an actionscripter but he seems to think this is easy.

Perhaps it has something to do with the way the files are set up. It works
just fine untill I try to load a variable. I know it is their because I
tested it in a text box.

If anyone can help That would be great. I have a feeling I will be up all
night again.

Matthew McLemore

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Help loading xml in html embed tag

2006-06-12 Thread Matt Mc
Right now the file is relative to the swf. The problem is i need it to link to 
files that may not be relative. The actuall xml doc will be on a completely 
difference server.

So The MP3 player which is now relative to the files needs to accept the 
Flashvar so it does not need to be relative.

I have made sure the links are correct that is not the problem. Also the SWF 
accepts the Flashvar so this is not the problem.

It is getting this to work. (Or it may be something else in the document that I 
have completely overlooked. My day is almost done and I have read every 
tutorial I can find and still have made no headway. I feel like pulling my hair 
out.LOL

private var playlistURL:String = _root.xmlURL;

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com