Xml :: Flash RPG Engine - Parse The Quests In The Xml Into Quest Objects So That They Can Be Accessed By Other Code?
Nov 9, 2010
I am developing an isometric rpg engine in flash AS3. I have decided to separate the engine code completely from the game data, which is in xml. So I have all the maps in xml files, all the quests and npcs etc. My question is when to parse the xml into actual Actionscript code. Should I do this at the start of every play session? Should I only parse the maps as they are called? This is like start up code. For example, I want to parse every tile into a tile object, then draw it to the map. Also, I want to parse the quests in the xml into quest objects so that they can be accessed by other code. So, when should I do this??
View 2 Replies
Similar Posts:
Jan 25, 2011
how I can make a shared object be able to be accessed by different SWFs on the same server.
View 5 Replies
Sep 15, 2010
I'm trying to access a shared object created by one flash application from another flash application. Is this possible? If so, what do I need to do?
If not, are there any other ways to share the information between the applications?
View 2 Replies
Dec 1, 2011
I'm trying to make black-outlined objects using the Alternativa3D engine, I'm going for a cartoonish look. How can I do this?
View 2 Replies
Mar 27, 2011
Got to the point where the hole in my AS3 knowledge is getting large!Realising I have confusion about the relationship of:Body of code on first frame of AS3 file.(Which I have so far used to create instances of library objects using addchild and make calls to class code).Is this code called the document code? What do people call it?Numerous classes linked together by extending each other etc.Library objects (usually graphical objects)Should it be done differently? have the following problems due to lack of understanding:Addchild complicated from a class but straight forward in main body code.Cant call functions on the main body code from classes, because class code does not know the main body code exists?
View 1 Replies
Jan 13, 2010
i'm having problems tweening 3d objects using the built in fp10 3d engine. i have a timeline tween that i want to create a tweenlite tween from and then duplicate it for other objects. i am using the bezierthrough plugin as well to tween along a path. i have used the motion editor in the ide to copy all values that change along the path into a tweenlite instance as follows:
[Code]....
View 1 Replies
Jul 27, 2010
In a recent project, after loading an XML document, I immediately parsed it and created a bunch of custom data objects that represented the data in the XML document.Now that the project is complete, I have a little bit of time to reflect and am wondering if I should have bypassed creating the data objects and just create a handful of methods that parse the XML in specific ways.I just did a quick rewrite to test it out and it is definitely simpler (which I tend to think is better). If the XML structure changed later on in time, I could just update or write new wrapper functions for parsing it.
View 1 Replies
Jul 8, 2009
I'm creating a game-engine, which will add objects to itself as symbols, and I want to be able to choose how they are "layered". For example, say I decide to model things in a type of 3D, and the Z co-ordinate is used for depth (distance from front), how would I translate this into an object 1 unit away rendering in front of an object rendering 2 units away? The engine programming I've done fine in terms of calculating the values etc., as I have a strong javascript background so that was the easy what with actionscript's neat OO syntax, but getting it to do things visually is a bit problematic know, heh. So far all I've really managed is a nice little loading bar, which isn't really that hard =D
Also, the symbols I create are actually going to be comprised of multiple parts; a base-layer, a detail-layer, and a colour-layer. What is the easiest way to do this? Ideally I'd create the symbol with multiple layers of its own, and simply toggle the detail and colour-layers on/off as required, and tint the colour-layer independently of the rest of the symbol. Is this possible? Or will I need to use multiple symbols and move them in tandem myself?
View 4 Replies
Nov 12, 2010
i've been reading that XML/E4X is very slow with AVM2 / ActionScript 3.when supplying an application with XML data, is it always generally a better idea to parse the XML object into an array of objects to call rather than using E4X with the stock XML data?
View 2 Replies
Nov 3, 2010
However, they work in other examples, even locally, when I download the source.
Code:
//Button
on(release)
[code]........
View 1 Replies
Jan 27, 2012
I created a new flash ide project and used a document class named 'Main.as'. Then I created Main.as file. I then drew a box and converted it to a movieclip and used export for actionscript on it. I assigned the square box in the flash ide the instance name 'box1'. Below is my Main.as file[code]...
View 7 Replies
Oct 26, 2009
I'm creating mc's during runtime like this:
for (var i:Number = 1; i <= pictures; i++) {
this.attachMovie("box_mc", "box" + i+ "_mc", this.getNextHighestDepth())
}
So, if pictures is 5, then we end up with 5 boxes, box1_mc, box2_mc, box3_mc and so on. But I can't work out an easy way to refer to them later on. For example, say someone presses a button and I want to move all of them - how can I set their _x value in a loop? For example, if I wanted to move all of them 100 pixels, then this wouldn't work:
for (var i:Number = 1; i <= pictures; i++) {
"box"+i+"_mc"._x = "box"+i+"_mc"._x - 100;
}
View 1 Replies
Nov 8, 2010
I am getting the xml data in my flash envronment by Test Movie. But when uploaded it does not displays the data. Note that here I have not loading a physical file with .xml extension rather i am loading a url reference which creats an xml structure for this flash object to use.
The code is given below:
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, showXML);
xmlLoader.load(new URLRequest("http://www.warraq.cc/Core/waraq/quiz-
[Code].....
It loads the data during Testing the swf but fails when accessed via the link above.
View 2 Replies
Oct 6, 2009
I tried something interesting recently. I had code effecting an object with the instance name : object_mc.Now I added another object and gave it the same instance name.The result was, that the code only effected the most recent added object (no error).Is there a way in flash to have multiple objects with the same instance name all being affected by one piece of code?
View 5 Replies
Nov 28, 2010
I'm creating a banner that is supposed to send an user to a Web site. I have the following as my AS3 code (in a separate layer)[code]...
How do I get to this "settings manager"? I'm using Windows 7 Professional.
View 1 Replies
Jan 22, 2012
I have some audio streaming resources on my HTTP server, let's sayI did design a flash player for playing it.Their player will try to reload that resource until it's available.This makes a lots of stress to my HTTP server. To stop them from hamming my server, I want to allow access only from my flash player. Strangely, I think in this case, flash player should check the crossdomain.xml first before load my audio resource, but they didn't. They just load the sound and play. The corssdomain.xml is not even there. I try to add one, it doesn't work as well
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
[code].....
View 2 Replies
Oct 17, 2003
I have a html page that has a link, which links to another html page with a flash file on. What I need is when this flash page is accessed I need a new movie to load, which would usually load from the navigation when someone clicks on a button. Is there anyway to link to a page which then loads a new movie into the main movie. can this be done???
View 10 Replies
Sep 29, 2009
I purchased this Thermometer flash template everything works well data is being populated through an xml file but I want to put multiple Swf files on a page with different data.Is there a way I can use SWf Objects.js to call a flash var of the XML file in the browsers source code.This is the Action Script Code
ActionScript Code:
stop();
import caurina.transitions.Tweener;//import tween class
stage.scaleMode = StageScaleMode.NO_SCALE;//define how stage scales
[code]....
View 2 Replies
May 23, 2010
I'm thinking about learning a flash 3d engine. I need some advice on which one to use. There's quite a few out there. Which is the best? I'm also considering whether there're a good bunch of tutorials on the web, that can make the learning easy.
View 9 Replies
Jul 14, 2010
I'm trying to take into account the Garbage Collector (GC), so I decide to optimize this code:[code]For instance, is it useful to put "xmlOne = null" in every iteration? I'm checking with the Flashdevelop's profiler, but I don't see the difference.maybe, I can also reuse the item object rather than creating it every time, right?
View 1 Replies
Nov 9, 2010
When I'm laying out objects on the code, I noticed that I'm having a hard time getting things to stack properly. I know that I need to be dealing with the index property, but I don't know how.
What are some properties, methods etc that can help me easily move around my objects on the stage and visually stack them properly? (Also, can multiple objects have the same index?)
[Code]...
View 2 Replies
Dec 26, 2010
im trying to use a use a code segment that makes something avoid the mouse. My issue is the code requires that iff i have more than one object that i want to avoid the mouse than i need to make a new set of variables for the second object and pretty much copy the code than change the variable names. Thats all great and dandy but i have a couple hundred very small objects that i need to avoid the mouse. is there any way to maybe apply the code to each object with an onclipload maybe?
ActionScript Code:
import flash.events.Event;
stage.addEventListener(Event.ENTER_FRAME, fun);
function fun(event:Event) :void {
[code]....
as you can see the object i want to move requires its own variables and 2 if statements. and i REALLY dont want to have to copy/paste that code over 200 times and make a new set of variables for each object. maybe i could apply the code to the object itself ? but than what would i name the variables?
View 7 Replies
Nov 12, 2010
just uploaded my first flash website..and I'm having difficulty working out how to get google to 'see' it.
I've registered the site with google and have a very specific phrase in the <title> tag of the html code but the more I investigate, the more complicated it seems..Can anyone point me towards a step by step tutorial or something to get my site in the top 10 results?
View 5 Replies
Jun 16, 2010
How the heck do you Kern in Flash CS5 while using the new TLF text engine?
There's no letter-spacing control and the keyboard shortcut doesn't work.
I'm not interested in auto-kerning. I'm looking to tighten up large text like headlines and logos and stuff.I'm starting to suspect it can't do it.
View 8 Replies
Oct 9, 2011
I cannot find any download link for the search SDK described in this URL.[url]...
View 1 Replies
Sep 15, 2010
Is there is a way to optimize flash for search engines??
View 4 Replies
Oct 12, 2011
What is the mp3 playing engine does flash player web plugin is using ?
View 1 Replies
Jan 13, 2011
I need to find out how i can add those same movie clips on the main timeline with code..So i need to figure out how to take objects from the library and add them on stage (main timeline) using code..
View 8 Replies
Jan 29, 2010
I have .fla file. There in library i have 3 movie clips cockroach0, cockroach1, cockroach2. I want show they random on the stage on .swf file.
working code:
var classNames:Array = ["cockroach0", "cockroach1", "cockroach3"];
var len:int = classNames.length;
[code]....
View 12 Replies
Mar 13, 2009
I have found the following code and modified it.
Code:
// Drag a piece of garbage.
rubbish_mc.onPress = function() {
this.startDrag(false); }; // When the garbage is dragged over the trashcan, make it invisible.
rubbish_mc.onRelease = function() {
this.stopDrag(); // Convert the slash notation to dot notation using eval.
if (eval(this._droptarget) == trash_mc) {
rubbish_mc._visible = false;
change_score(); } };
My question: I have numerous movie clips for the rubbish. Is there a more elegant way of calling them than repeating the above lines with rubbish2_mc, rubbish3_mc etc.
View 2 Replies