Jump to content


Help with creating a photo gallery online


  • You cannot reply to this topic
11 replies to this topic

#1 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 11 July 2007 - 02:22 PM

i recently read the tutorial about creating a photo gallery with xml, and I am trying to make it where people can upload pictures and those urls will create a new xml file with those urls, i got that figured out, not what i dont know how to do is to put in the action for the name of the xml, is there a way i can get php in the action, so i could put in the variable for the xml file to display the pictures?

#2 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 11 July 2007 - 04:47 PM

anyone?

#3 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 11 July 2007 - 09:37 PM

Look into the sendAndLoad method in Flash. It should allow you to call a php page, and extract data from that. You could also use the ExternalInterface class in Flash 8 to communicate with Javascript and use a blend of Flash and Ajax to retrieve the data you want.

#4 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 15 July 2007 - 01:14 PM

is there a way that i can specify in the parameters of the swf, or is this there a way I can get info from the url? such as what xml file to load??

#5 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 15 July 2007 - 04:46 PM

something like this, but not as advanced http://www.rockyou.c...reate.php?ref=7

Edited by werny, 15 July 2007 - 10:32 PM.


#6 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 15 July 2007 - 09:52 PM

http://www.permadi.c...rial/flashVars/

#7 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 15 July 2007 - 10:18 PM

pax thank you! that was exactly what I was looking for. I love when I can come to a forum and get great help from the people, thank you :)


-edit, how now do I specify in my flash movie how to call that xml file based on the variable
this is what it is right now
xmlData.load("images.xml");
would it be something like this
xmlData.load(_root.xmlname);
,and then have it set to get the xmlname variable from the url?

Edited by werny, 15 July 2007 - 10:39 PM.


#8 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 16 July 2007 - 08:10 AM

When you set a variable when you embed the flash object, you use _root.varName

Change varName to whatever you called the variable. You should be able to use your second code block there and have it work.

#9 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 16 July 2007 - 09:52 AM

I have been trying all different combinations and I can't get my xml file to load,
heres what I have
xmlData.load(_root.xmlname);
and then my address looks like thi
test.php?xmlname=images2.xml
ive also tried encoding the url like this
test.php?xmlname=images2%2Exml
and this is my embedding
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
   codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
   ID=flaMovie WIDTH=250 HEIGHT=250>
   <PARAM NAME=movie VALUE="test.swf">
   <PARAM NAME=FlashVars VALUE="xmlname=<?php echo(urlencode($xmlname));?>">
   <PARAM NAME=quality VALUE=medium>
   <PARAM NAME=bgcolor VALUE=#99CC33>
   <EMBED src="test.swf" FlashVars="xmlname=<?php echo(urlencode($xmlname));?>"
	 bgcolor=#99CC33 WIDTH=250 HEIGHT=250 
	 TYPE="application/x-shockwave-flash">
   </EMBED>
 </OBJECT>




and yet the file does not load

Edited by werny, 16 July 2007 - 10:01 AM.


#10 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 16 July 2007 - 11:47 AM

Have you tried tracing the value of _root.xmlname?

#11 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 16 July 2007 - 12:20 PM

im not sure what you mean, like the file it is pointing to?

-edit i uploaded a rar of the files, if you think I have something wrong, the actual flash file is straight from this tutorial http://www.kirupa.com/developer/mx2004/xml...hotogallery.htm execpt for calling out the xml file

Attached Files

  • Attached File  test.zip   10.66K   157 downloads

Edited by werny, 16 July 2007 - 03:39 PM.


#12 werny

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 23 July 2007 - 07:23 PM

come on people, i feel like im really close, need a little help





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users