Click to See Complete Forum and Search --> : Flash ActionScript pro needed
synner
02-27-2008, 04:36 PM
Hello-
I'm a web developer with Flash knowledge, just not deep into actionscript. I need help writing a script that pulls in and displays XML data.
Super easy for a ActionScript guru. The idea is, theres a solid "background" image in the .FLA, displaying specific products.
When you mouse over a specific product, it calls the product info to a MC that follows the cursor. I haven't quite gotten the cursor MC to follow the pointer yet, as I'm running into a onClipEvent error that I can't seem to figure out.
Let alone the XML Parsing :P Thank You so much for your help!
Eye for Video
02-28-2008, 11:08 AM
Just so I get this straight…is the main idea to mouse over the product, then Mouse.hide(), replace with a movie which calls in info from an .xml file?
The Mouse.hide() should replace your cursor with the movie clip. Does your cursor disappear or is it still showing? Do you want it to disappear or keep showing?
synner
02-28-2008, 01:12 PM
Basically what I am looking for is to replicate this site ( LINK (http://www.bigfishgames.com/download-games/new-releases.html) )
You see how when you mouse over the "products" the info window comes up. I want that for my site and it's products and be able to easily edit an XML file to put in the info into the main site and those pop up windows with out having to constantly write new coding. Thank you very much as any help is very very appreciated--SyNN
funkdaweb
02-28-2008, 02:25 PM
The site you linked to isnt flash! Thats done using javascript! see code here..
http://www.bigfishgames.com/javascript/en/tips_output.js
synner
02-28-2008, 02:28 PM
I know that is Java... I want to replicate that effect using a fla file and being able to parse the xml... I love the effect I want to mimic it using flash... see what I am saying?
funkdaweb
02-28-2008, 02:52 PM
i do know! haha! you checked flashden.net? there are loads of things like that for next to nothing in price!
synner
02-28-2008, 04:24 PM
see thats the thing... I need this to be freelanced... I don't have a lot of money I already have the fla file and I got the mouse over working on it now... I just need to know how to parse the XML to it. I can send you my fla and xml file if any one would be willing to tinker around... :-) Thank you again! I will check out flashden in the mean time just in case--SyNN
Eye for Video
02-28-2008, 08:12 PM
Is the info all text? or will the mc include graphics?
Are you able to parse in the xml data to a non moving dynamic text box OK?
synner
02-28-2008, 08:34 PM
The MC will include txt as well as graphics ... and honestly I know nothing about xml / fla parsing ... like I said I know flash it's just this whole action script xml parsing that I am a total noob at :-P Thank you for any help-SyNN
Eye for Video
02-28-2008, 09:25 PM
Well basically, you create a dynamic text box, give it an instance name (caption_txt), and “push” the xml info into an array (captions) which is populated from the xml file (slideshow.xml).
var ssx:XML = new XML();
ssx.ignoreWhite = true;
var currentIndex:Number = 0;
var captions:Array = new Array();
ssx.onLoad = function(success){
if (success) {
var ss:Array = ssx.firstChild.childNodes;
for (i=0;i<ss.length;i++) {
captions.push(ss[i].attributes.caption);
}
caption_txt.text = captions[currentIndex];
}
else
{
trace("XML file failed to load. Please try again later.");
}
}
ssx.load("slideshow.xml");
But your .xml file has to be written to match the expected firstChild.childNodes and attributes.
<?xml version="1.0" encoding="ISO-8859-1"?>
<pictures>
<picture caption="Stone dragon" />
</pictures>
Some great tutorials at:
http://www.learnflash.com/wp/2008/02/
http://www.gotoandlearn.com/