ActionScript 2.0 :: Saving An Element In A Flash Document?
Oct 31, 2010
I'm working on a Character Creator for a game engine (2d) and I use Drag-and-Drop to combine parts... If I fully combine the character, how can I save the area, where the combined chara is? I want, that an area (like a pink square) would be saved to ex. Desktop, when I press Save...
I have a AS3 file I used in Flash CS4 that worked just fine. The preloader at the beginning of it worked normally.When I started using it in Flash CS5 it stopped working....at first it would jump around the number instead of going up from 0% to 100%. Then it just quit working all together..I tried saving the swf as a Flash CS4 document in flash cs5 .Here is my code:
So I've got an .swf file embedded in a document (SMART board in this case, but a simple Word doc would probably serve in the same fashion). I'm trying to replicate the same functionality I see in another .swf. Basically its got a configuration menu where you can open and configure the .swf to behave differently, then save off and have it keep that. More importantly, if I close the document and re-open, it keeps the configuration. Harder yet, if I mail the document to someone else, it will keep the configuration.
Oops, its that last step that kills me. I understand how to use shared objects to save settings locally. I don't believe they're using server based shared objects in this case (no maintained server for it). So how can they be saving settings that travel with the document?
I am trying to get the name attribute of the first element in my XML document. Here is the extract from my xml file:
HTML Code: <shop name="Pick n Pay"> Here is my AS3 code: var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); xmlLoader.load(new URLRequest("mall.xml")); function LoadXML(e:Event):void { [Code] .....
And this is the output that I am getting: Code: XML loaded XML Output TypeError: Error #1010: A term is undefined and has no properties. at map_fla::MainTimeline/ParseShops()[map_fla.MainTimeline::frame1:23] at map_fla::MainTimeline/LoadXML()[map_fla.MainTimeline::frame1:15] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete()
I've created numerous games which load and unload off a main menu.The player enters their name on the main menu before playing any games and when the player completes a game I want to save their time (taken to complete the game) and unload this time back into the main menu.Is there any way of saving the times using AS3 to a word document or something like this? I can't send the times to my website with php because the games will be used within a competition and it all needs to work with the internet.
I'll explain a little before asking my question ... I've created numerous games which load and unload off a main menu.The player enters their name on the main menu before playing any games and when the player completes a game I want to save their time (taken to complete the game) and unload this time back into the main menu.Is there any way of saving the times using AS3 to a word document or something like this? I can't send the times to my website with php because the games will be used within a competition and it all needs to work with the internet.
Edit: var dataloader:URLLoader = new URLLoader(); var dataarray:Array = new Array(); // do this where you intialise other vars
I'm using flex 4 to build a program and I am getting this error on one module I call. Does this refer to the module document (.mxml) or the actually xml file the module it calling?
I experienced the following error when loading xml using AS3. I searched the whole internet for solutions but nothing works! But after trying for hours, i somehow solve it. All I did was to remove "</xml>" from my xml.
TypeError: Error #1088: The markup in the document following the root element must be well-formed. at toffees_fla::MainTimeline/onLoaded() at flash.events::EventDispatcher/dispatchEventFunction()
I have flash where there is a link for song download. And, at the bottom of the flash I've a count, loaded thorugh flash vars which should increment everytime donload button is hit. Please let me know what approach should i take to do that. can i call a Java method on donload button which will insert a row in the table and and then get the count and render it to the count variable in my flash?
May be this extremely confusing. Here is a very similar example on how it is done. This is actually very similar to what i want to do. [URL] on this link there is count below which increments you hit the download button.
We have a requirement to show documents (if we have URL for a document) within Flash. We have a need use embedded document viewer for MS Office and PDF documents. Are there any Flash controls available to acheive this?
I know that there is no such function as getElementByName in Flex but I also now that you can do this["object_id"] to get the element of the application u're in.What about getting an element inside another element?I've tried making element["id"] ? But in my try-catch it always runs the "catch" part..how do I get an element inside another element just having it's id in dynamically created string form?
I've built a rather robust tooltip class recently that attaches and draws a single tooltip sprite to the root, then uses MOUSE_OVER to detect when it is over a tooltippable object, and shows the appropriate tooltip text. At the moment, I'm ensuring that any elements in my application which wants to take advantage of showing tooltips implement the ITooltippable interface, and expose a public getter, get tooltip().
Basically I have 14 text boxes, each box draws its content from an external txt file. Next to each text box is a button. I want the button to be either visible=true or visible=false depending on weather or not the text box has content or is "undefined" Here is what I have so far, and it's not working:[code] I would like a FOR loop to just run through the variables and check to see if any of them are undefined. if it is, then make the correct send button invisible.
this["nodeValue"+i] = new TextField(); (surely in dynamic class )
then I want to change instance name of that element.when I trace this["nodeValue"+i].name.I got a different name for that element ! f ex : instance8 .how can I get "nodeValue"+i from my element and change that .is it read only ? I want to swap tow element's instance name !
for example : this["nodeValue"+i] to this["nodeValue"+i+1]
Can I set the style of another document from it's parent document? At the moment its giving me the error 1119: Access of possibly undefined property StyleManager through a reference with static type DesignCardForm.
Im trying to save from fla or swf to .mov or .avi. without having to buy a 3rd party app.I've tried exporting from Flash but both my computers just sit there and don't finish the job.I can't see any options to save as an .avi file either.I've tried opening both the swf and fla files in Quicktime with Perian
I have made a cartoon section that needs to go into a video movie, it uses a lot of movie clips etc. It needs to be very high resolution- 1920x1080 When I just export it as an avi, none of the movie clips animate- they just slide around on the first frame of their animations.
When I export is as a .mov the file size is huge and I am not even offered the ability to compress it. It is like 8 gigs. When it was finally done the movie played in slow motion- the clip was about twice as long as it should have been.When I saved the file as an swf, and then tried to convert it to an avi using a converter, all the movie clips moved in doubletime, while the animations in the timeline were fine. How can I get my flash file to play in a standard video format.
I've recently upgraded to Flash CS4. However, the project I'm currently working on was started in CS3 and I need to keep it as a CS3 as I transfer the .fla file between two computers because one only has Flash CS3. Is there way of setting it so when I click 'Save' or Ctrl+S it saves it automatically as a CS3 fla, rather than automatically converting it from a CS3 to CS4 file? I'm serial Ctrl+S hitter so this is getting really annoying now having to go to File>Save As everytime!
I am trying to take a variable sent from flash, and save it to a spot on my web server using PHP, I have NO idea how to do this, and I can't seem to find code that works anywhere on the web
I've been all over the interwebs, including Stack Overflow, for hours, trying to identify a solid, workable example of saving information in Flash into an XML file.
I want to take the positions of two different types of objects and export the lists of each to XML. We'll call the objects ball and bat.
Is it possible to set up FDT so that it only builds the workspace when I save (as opposed to constantly or manually) like it does in Flash Builder (previously Flex Builder) and if so, how?
I need to edit some CS5 files but don't have CS5. If anyone could open these and save them down to CS4 I'd be hugely grateful. There are 4 files. If there's a way I can return the favour I will. eg some beer money via PayPal.