Flash/XML comms
I have been working through friendsofED book called
"Foundation ActionScript for Flash 8". I really get how to get
information out of a XML database and be able to display it. Now I
want to learn how to get data to go the other direction. Is there a
web location (tutorial) on how to append records back to a XML
database through the use of Flash 8 actionscript???
respectfully,
Anthony Jackman
eLearning Application Developer
SI International
kglad's link is how to create and XML document using
actionscript, but if you want to interface with a DB to append
records etc, you're going to need to use another scripting language
in conjunction with Actionscript to make the DB calls (like PHP).
Cheers,
FlashTastic
Similar Messages
-
i have a flash & xml gallery source. whatever click the
thumbnails, opening first image. where is the problem? i need help,
please...
Flash & Xml
Gallerythen that's a problem. sometimes your cookie may loaded
sooner than the needed frame in your swf and when you try to go to
a frame that hasn't been downloaded, the swf will stay on frame 1.
i assume you already have a stop() on frame 1 and you check
the cookie's value before proceeding. in addition to waiting for
the cookie to load, you should wait for the needed frame of your
swf to load.
so, if you're not using a loop now to check for your cookie,
you'll need one for your swf to check its _framesloaded property
before advancing the timeline. -
Flash & XML Photo Gallery with Categories
Hello friends
i am trying but
i want to create Flash & XML Photo Gallery with Different Categories
please help meIf you want to do using oop
go throgh this article first
http://active.tutsplus.com/tutorials/actionscript/as3-101-oop-additional-concepts/ -
Flash xml slideshow in iWeb not working
Hallo
I am really struggling to get a Flash xml slideshow to work. I have used Flash Slideshow Maker app, which creates a slide.xml, .swf and .html file and everything is published in one folder "slideshow" on a local disk.
I am using the following code and it works perfectly when viewed in iWeb:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 40,0"
WIDTH="920" HEIGHT="400" id="Phambili">
<PARAM NAME=movie VALUE="/Users/elsjevanzyl/Documents/Websites/Published Websites/Phambili/Slideshow/Phambili.swf?xml_path=slides.xml">
<PARAM NAME=quality VALUE=high>
<PARAM NAME="wmode" value="transparent">
<PARAM NAME=base VALUE=".">
<EMBED src="/Users/elsjevanzyl/Documents/Websites/Published Websites/Phambili/Slideshow/Phambili.swf?xml_path=slides.xml" quality=high wmode="transparent" WIDTH="920" HEIGHT="400"
NAME="Phambili" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" base=".">
</EMBED>
</OBJECT>
But as soon as I publish it to FTP with following code, it displays the slideshow but NOT the photos or thumbs:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0, 40,0"
WIDTH="920" HEIGHT="400" id="Phambili">
<PARAM NAME=movie VALUE="http://harmonieproteas.co.za/Slideshow/Phambili.swf?xml_path=slides.xml">
<PARAM NAME=quality VALUE=high>
<PARAM NAME="wmode" value="transparent">
<PARAM NAME=base VALUE=".">
<EMBED src="http://harmonieproteas.co.za/Slideshow/Phambili.swf?xml_path=slides.xml" quality=high wmode="transparent" WIDTH="920" HEIGHT="400"
NAME="Phambili" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" base=".">
</EMBED>
</OBJECT>
I have also tried iFrame code, but this is not working at all.
Can anybody tell me what I am doing wrong when publishing the above code to FTP?
Any help will be appreciated.Flash isn't my thing but, it appears that you are missing the images:
<flash_parameters copyright="socusoftFSMTheme">
<preferences>
<global>
<basic_property movieWidth="920" movieHeight="400" decoration="" html_title="Title" loadStyle="Pie" startAutoPlay="true" continuum="true" backgroundColor="0x00000000" hideAdobeMenu="true" photoDynamicShow="true" enableURL="true"transitionArray="" socusoftMenu="false"/>
<title_property showTitle="true" photoTitleColor="0x00000000" backgroundColor="0x00c0c0c0" alpha="30" autoHide="true"/>
<music_property path="" stream="true" loop="true"/>
<photo_property topPadding="2" bottomPadding="64" leftPadding="2" rightPadding="2"/>
<properties enable="true" backgroundColor="0x00c0c0c0" backgroundAlpha="30" cssText="a:link{text-decoration: underline;} a:hover{color:#ff0000; text-decoration: none;} a:active{color:#0000ff;text-decoration: none;} .blue {color:#0000ff; font-size:15px; font-style:italic; text-decoration: underline;} .body{color:#ff5500;font-size:20px;}" align="top"/>
</global>
<thumbnail>
<basic_property width="40" height="40" thumBackColor="0x002c2c2c" borderColor="0x002c2c2c" thumborder="2" thumSpacing="4" shapeAlpha="60" buttonColor="0x00000000" currentbuttonColor="0x00ffffff"/>
</thumbnail>
</preferences>
<album>
<slide jpegURL="thumbs/mozzie tour 2.jpg" d_URL="slides/mozzie tour 2.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Mozzie Tour 2" width="916" height="334"/>
<slide jpegURL="thumbs/mozzie10.jpg" d_URL="slides/mozzie10.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Mozzie10" width="916" height="334"/>
<slide jpegURL="thumbs/snow on hogsback.jpg" d_URL="slides/snow on hogsback.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Snow on Hogsback" width="916" height="334"/>
<slide jpegURL="thumbs/tea time@santa maria.jpg" d_URL="slides/tea time@santa maria.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Tea Time@Santa Maria" width="916" height="334"/>
<slide jpegURL="thumbs/western cape tour knersvlakte.jpg" d_URL="slides/western cape tour knersvlakte.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Western Cape Tour Knersvlakte" width="916" height="334"/>
<slide jpegURL="thumbs/western cape tour[2].jpg" d_URL="slides/western cape tour[2].jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Western Cape Tour[2]" width="916" height="334"/>
<slide jpegURL="thumbs/bush camp in botswana[2].jpg" d_URL="slides/bush camp in botswana[2].jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Bush Camp in Botswana[2]" width="916" height="334"/>
<slide jpegURL="thumbs/eastern cape tour 2.jpg" d_URL="slides/eastern cape tour 2.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Eastern Cape tour 2" width="916" height="334"/>
<slide jpegURL="thumbs/hogsback 2.jpg" d_URL="slides/hogsback 2.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Hogsback 2" width="916" height="334"/>
<slide jpegURL="thumbs/mozzie tour.jpg" d_URL="slides/mozzie tour.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Mozzie Tour" width="916" height="334"/>
<slide jpegURL="thumbs/western cape tour.jpg" d_URL="slides/western cape tour.jpg" transition="0" panzoom="1" URLTarget="0" phototime="2" url="" title="Western Cape Tour" width="916" height="334"/>
</album>
</flash_parameters>
http://harmonieproteas.co.za/Slideshow/ -
Saving XML from Flash XML.sendAndLoad
I'm new to XML and haven't a clue how to integrate Flash xml
and Coldfusion 7. There is a Flash app ( I didn't develop it) that
is sending xml.sendAndLoad formatted data like this to a cf page
setSummaryQuiz.cfm
<?xml version="1.0" encoding="UTF-8"?>
<result lessonID="19" userID="56">
<word id="281" value="1" />
<word id="282" value="1" />
<word id="283" value="5" />
<word id="284" value="5" />
<word id="285" value="3" />
<word id="286" value="7" />
<word id="287" value="3" />
<word id="288" value="8" />
<word id="289" value="7" />
<word id="290" value="4" />
<word id="291" value="8" />
<word id="292" value="2" />
<word id="293" value="5" />
<word id="294" value="4" />
<word id="295" value="1" />
<word id="296" value="4" />
<word id="297" value="8" />
<word id="298" value="1" />
<word id="299" value="7" />
<word id="300" value="1" />
</result>
My page is supposed to return saved = true or false like
this:
<? xml version = " 1.0" encoding = "UTF-8"?>
<result saved = "true"/>
Can someone help me or point me to a tutorial or code snippet
where I can see how CF reads and parses the XML data from
Flash?In ASP setting the response type to "text/xml" you can do a
response.write command to send back XML to Flash if you were
performing an XMLSendAndLoad command ie. send XML from Flash,
processed by ASP and receive an XML response from the ASP - good
for Flash to know if something worked or an error resulted in
processing the info. -
Flash XML Slideshow - Load next image after set amount of time
I'm creating flash xml slideshow and have managed to get the
images to load from the XML file. What I want to do now is have a
timer that loads the next image after x amount of seconds. Any help
would be great.
Code sample
stop();
// Create XML Object
slideshow_xml = new XML();
// Start slideshow once XML file is loaded
slideshow_xml.onLoad = startSlideShow;
//Load XML file
slideshow_xml.load("slideshow.xml");
//Ignore Whitespace in XML Document
slideshow_xml.ignoreWhite = true;
//Create Function for Slideshow - Shows first slide and
initalises variables
function startSlideShow(success) {
if (success == true) {
rootNode = slideshow_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpgURL;
slideText = newSlideNode.firstChild.nodeValue;
loadMovie(imagePath, loadTarget);
}Ok I've managed to get most of this working including the
alpha fade in. I haven't been able to get the images to fade out
(fadeImageOut function) so if someone can tell me what I'm doing
wrong. Also should I have some sort of preloader function for when
each image loads? and if so any pointers, then it should be done
except that I might need to add some text for each image in the XML
file.
stop();
var container:MovieClip =
this.createEmptyMovieClip("container", this.getNextHighestDepth());
var loader1:MovieClip = this.createEmptyMovieClip("loader1",
this.getNextHighestDepth());
var loader2:MovieClip = this.createEmptyMovieClip("loader2",
this.getNextHighestDepth());
container._x = 0;
container._y = 0;
function fadeImageIn() {
var fadeTween = new mx.transitions.Tween(loader1, "_alpha",
mx.transitions.easing.Regular.easeIn, 0, 100, 1.5, true);
loadmovie(imagePath, loader1);
function fadeImageOut(loader1) {
var fadeTween = new mx.transitions.Tween(loader1, "_alpha",
mx.transitions.easing.Regular.easeOut, 100, 0, 1.5, true);
unloadMovie(loader1);
// Create XML Object
slideshow_xml = new XML();
// Find out what this does
slideshow_xml.onLoad = startSlideShow;
//Load XML file
slideshow_xml.load("slideshow.xml");
//Ignore Whitespace in XML Document
slideshow_xml.ignoreWhite = true;
//Create Function for Slideshow - Shows first slide and
initalises variables
function startSlideShow(success) {
if (success == true) {
rootNode = slideshow_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpgURL;
slideText = newSlideNode.firstChild.nodeValue;
//loadMovie(imagePath, loader1);
fadeImageIn();
function nextSlideImage() {
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
rootNode = slideshow_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
slideTimer = setInterval(nextSlideImage, 5000); -
I have downloaded a flash-xml template which is working
perfectly in my PC, but when I upload it to a hosting server, the
data (coming from the XML file) is incomplete!! The data
corresponding to the menu doesn't appear, as well as the titles of
the different pages, however the main text is there. Crazy to me.
I found an identical webpage which is working fine (
http://www.nullsetinteractive.com),
but after extracting it with Teleport, and uploading it again in my
hosting server, the same problem appears!!
Check
http://andresbrugger.byethost12.com/page/index.htm
to see how it looks like).
I tried many hosting servers, but this seems to not be the
problem.
Any idea why this could be happening?
You are my last chance...thx.I have downloaded a flash-xml template which is working
perfectly in my PC, but when I upload it to a hosting server, the
data (coming from the XML file) is incomplete!! The data
corresponding to the menu doesn't appear, as well as the titles of
the different pages, however the main text is there. Crazy to me.
I found an identical webpage which is working fine (
http://www.nullsetinteractive.com),
but after extracting it with Teleport, and uploading it again in my
hosting server, the same problem appears!!
Check
http://andresbrugger.byethost12.com/page/index.htm
to see how it looks like).
I tried many hosting servers, but this seems to not be the
problem.
Any idea why this could be happening?
You are my last chance...thx. -
I am trying to add multiple flash files to my website...the
only way these seem to work is if the swf and corresponding xml
file are all on the root of the website directory. I would have
liked to organize them into files to sort.
My problem is that many of these flash files (mainly
purchased) have the same xml file, so I cannot use these together
on the root. Thus, I need to either rename in the flash the xml
file or figure out how to put into folders...please help!
-JoshANSWER: I figured it out myself. I am just replying to let
everybody else know how I fixed it. I had the full URL in the load
request and apparently some Flash players don't like this. I put a
link to the file without the domain name and everybody is working
fine. The load function, Flash, or something could not resolve the
domian correctly and could not find the XML file. I was not getting
a request for the file from the Flash movie so I knew it had to be
soemthing in Flash. -
Flash xml data loading and unloading specs
hi i am trying to get specification information that i cannot
find anywhere else.
i am working a large flash project
and i would like to load xml data into the same swf
object/movieclip repeatedly.
as i do not want the previously loaded items to unload i need
to know if doing this will unload the items from the swf or just
keep them in the library so they can be reposted without reloading.
i cannot find any supporting documenation either way that
tells me that if i load new content into a clip (i am aware
levels overwrite) if it will or will not unload this content.
thanks in advance.
mkthis is awful for me -- i cant even get the clip to duplicate
-- and i thought this would be the simplest solution to keeping
everything cached for one page before and one page after current in
the project.
i have used a simpler clip to test the code and see if i am
insane.
duplicateMovieClip(_root.circle, "prv", 5);
prv._x = 300;
prv._y = 300;
prv._visible = true;
prv.startDrag();
this ALWAYS works when i use the _root.circle file of a green
simple circle
BUT
when i change it to my main movie clip (which is loaded AND
On screen -- it just doesnt duplicate at all!) -- i've even
triggered it to go play frame 2 JUST IN CASE
I've even set visibility to true JUST IN CASE
ie all i do is change _root.circle to _root.cur
and .... nada.
AND _root.cur IS DEFINITELY on the screen and all xml
components have been loaded into it. (it is a slide with a dynamic
picture and dynamic type and it 100% works)
has anyone had this insanity happen before?
is this an error where flash cannot attach movie or duplicate
a clip that has dynamic contents??? -
Question about flash,xml
I have a flash form, when people click submit, I want it be
saved as an xml file. can anyone please tell me how to do this? I
think I have to do this by php, isnt it?1/ If I have a persons details stored in a mysql database... to get it
into xml so that flash can read it... do i use php to get the details
and then simply print it out the sql result into xml format. Is this
how you would get xml out of a database? or is there a better way?
Yes, typically. At least I don't know of another way. There are some php classes that can simplify the database access and manipulation. But if you access records you typically loop through them and output the data inside tags.
2/ Why would i ever use xml?... is it simply becuase the data is then
available in a structure that other aplications/sites can understiand?
You have a choice. XML in a way is quite easy to change in terms of the output on the server and (with e4x in actionscript) how it's read in flash. But it's also a 'generic' format that can be accessed and interpreted by many different clients in different languages.
Another way is to use amfphp or other amf support on the server to support sending your data in flash's native binary encoded format. Or you could send it as name value pairs (URLVariables in as3) if its a simple single level array. -
Flash xml file and file size?
I have a flash animation that pulls in images using an xml
file. I was
wondering if the images must all load first? In other words,
the images
are timed to load at different times. I was thinking, when I
did this,
that the images would not be downloaded until they were
called but I am
starting to doubt this.
Anyone have any idea how these images are loading?
Basically, my main concern is that they are putting too much
load on the
homepage. I have a feeling I know what the answer is.
Thankswhatever the size of your SWF is, is what is going to be
loaded when entering your homepage. Flash doesn't know what images
to load, until you make a call to load them. It will only load the
assets on the timeline, and anything set to export on the first
frame. -
Flash - XML - PHP together.....
How to get xml data created by php in flash file (Action script 3).....?
You would use a URLLoader in as3 and the as3 XML object which parses the XML text.
check out:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000132.html#wp118987
in the place of the Sample3.xml you just use your php script (which needs to generate correctly formatted xml) -
Flash/XML doesn't update on Website?
Please help!
I'm working on a school website and have a 'Stop Press' panel
on the home page which is used for breaking news e.g. School Closed
Due to Snow....
The home.htm file contains a flash insert to do the animation
which in-turn is supplied with the news announcements from an XML
file. The administrator updates the news in the XML and then
uploads to the site.
Now the problem...
Whereas all htm files uploaded to the web server usually take
effect immediately, the XML doesn't. Users of the web site report
all sorts of delays in seeing the new information. I can see from
my FTP program (Dreamweaver) that the xml is PUT onto the site but
it has an erratic delay (sometimes hours!) in getting into the
Flash program?
Strange - How can my Browser (IE7) affect the web server
file?
I find that if I open the XML file on the web server (by
writing it's address directly into the browser address bar), I see
the OLD version of the XML.
However, if I then click my browser REFRESH button, the XML
file on the server updates and is then available to the flash
program on the home page and all is well (at least in my browser)??
Yours, confused DaveFeldkircher ,
Thanks again for the link to the answer. A great Blog site!
For information:
The problem is with browsers not refreshing external files
when you think they should be.
I overcame the problem by changing the code in my swf
FROM:
xml.load("stoppress.xml");
TO:
xml.load("stoppress.xml?ver=" + Math.floor(Math.random() *
999));
This forces the browser to reload the XML file every time it
comes across the instruction, even if the XML hasn't been updated.
This is acttually inside a loop so it means that it's like a
real-time update.
Check out david stiller's blog site for instructions on how
to force the htm file to reload.
regards
Dave -
How to make a flash/xml site?
I'm no stranger to html, actionscript, dreamweaver, or flash, but I seem to be in a bit of a rut, here.
Note: I'm not asking anyone do do the work for me. it would just be really helpful to have access to source fla's, templates, tutorials, etc.
Basically, I want to make an animated, dynamic-width flash site to show off my projects, portfolio, and company information, but I'm absolutely overwhelmed. D:
Here's the concept I've come up with:
As you can see, the idea is a simple monochrome layout with a top and bottom bar, and a "moving" sidebar. Regardless of window-size, I want to make the bars stretch all the way across the screen, except for the bottom one, which will only go 100-200 pixels away from the right edge.
So my question(s) is(are) basically, where do I begin?
Should I use xml or just flash?
Should it be broken up into small swf files or be one big one
One swf file per page, or one for the whole site?
How do I go about making a dynamic width layout in flash?
What's the best method to make animation "transitions" between pages?
Do I need a preloader, and how do I make one?
Is there anything else I should know (tips, advice) before I start?
I'm not sure if I missed anything or not... ^_^;
I know I'm asking a LOT, but answers to any (or all) of these questions would be greatly appreciated, and I'd be forevereverever in your eternal debt.
thanks for everyone's time!
Sincerely,
EricIf you are going to want to update your content on a regular basis, say weekly or monthly, then you may want to use XML. If you site will remain pretty constant, then there's no need for that extra layer of complexity. A good design methodology is to create one base movie and then create a series of additional movies that hold the content. I always try to design so that the user has no or very little wait time when they move from one section to another. This means that each content movie needs to be pretty small in file size.
You probably want to go through the tutorials that come with Flash to get you started in how Flash works. You might want to pick up a book or two and visit some of the Flash sites that contain tutorials. Good books: Flash CS3 Flash Bible, Actionscript 3 Cookbook, Flash CS3 for Designers, Adobe Flash CS3 Professional Classroom in a Book. Good sites: http://www.gotoandlearn.com, http://schoolofflash.com/, http://www.adobe.com/devnet/flash/, http://www.flashandmath.com/. -
Flash & XML ... Please help me !!??
hi,
i have flash document & i want to write some data one my
xml docyment with flash. Plase help me. but i want to do it with
flash and not to do with .Net or something like that ... if any one
can help please mail me .
My email address:
[email protected]For starters, read the Help Docs in Flash on Data
Integration. There's even a tutorial in Flash 8 called "Flash and
PHP Integration." Then you might want to Google "flash php xml
tutorial" which returns plenty of stuff to keep you reading for a
while.
Good luck!
Maybe you are looking for
-
I just purchased a new 3tb Seagate Backup Plus 3 to attach to my new Airport Extreme. When I plug the Seagate's USB in to the AE, the drive starts spinning, clicks and then the AE light turns amber and the wifi connection is lost. After I unplug th
-
Error handling in scenario.
Hi,, I want to send an idoc to a partner with the (for example) BD10 transaction. I also want to make sure all "required fields" are filled So in my outbound user-exit I have this code: if l_ze1marcm-zcomcode is INITIAL. message e008(zmdm) with '(ZE1
-
Cannot mount dvd or usb flash drive in kde 4.6 ?
Hi, I am unable to mount a dvd in kde 4.6 I keep getting the following error: udisk error permission denied: not authorised I have added myself to storage, disk and all the normal groups. I had the same problem with a flash drive but after adding the
-
Iphoto backup, with regards original images.
OK, background. I have been searching on here but maybe not using the correct search terms. I upgraded from an eMac with OSX 10.4 to a shiny new iMac (eMac had 38GB HD so images were stored on external drives). I stopped using iPhoto in 2006. In 2006
-
NEW "Ipod skipping certain songs" Post... Little help Apple!!!
I've been putting this off for a while, but I finally lost it the other night and almost threw my ipod out the window... upon further investigation I found a post on page 2 with 4500 views about this issue with still no resolution. My new ipod 80G sk