If you wanted, you could write a function which iterates over all DisplayObjects, and loads/saves each relavent property from/into your SharedObject. It's not impossible there's simply no push-button solution for it. var settings:Object = SharedObject.getLocal("foo") Load with getLocal(), and save with flush(). Looking at this broadly, let's assuming you want to save the position of your button every time you load the swf. If you want to change those properties, you have to address each and every one you want different. ![]() In this app, the 50 states of America come to life as colorful animated characters, each with the shapes of its. Like a hand-written class, a copy of the customButton is created with all the properties you defined on it before you compiled it. Stack the States makes learning about U.S. Assuming you create something called customButton, you could spawn thousands of them onscreen (or one) like this: var foo:customButton = new customButton() Library items in the Flash IDE are technically miniature classes, as evidenced by the way we instantiate them. What about it do you want to save? The x property? Perhaps the alpha? EVERYTHING? Each object is stored in a default state in your swf. To save the "state" of the MovieClip is more complicated. ![]() You want to start with SharedObject, which as Adobe puts it, "is used to read and store limited amounts of data on a user's computer or on a server". The code inside big_mc: child_mc1.addEventListener(MouseEvent.CLICK, remove_child1) Ĭhild_mc2.addEventListener(MouseEvent.CLICK, remove_child2) Ĭlose_big.addEventListener(MouseEvent.CLICK, bye) įunction remove_child1(e:MouseEvent):voidįunction remove_child2(e:MouseEvent):void please help.much is appreciated.Ĭode in main time line: var big_mc:mother_mc = new mother_mc Īdd_big_btn.addEventListener(MouseEvent.CLICK, call_big) So the scenario is when I click child_mc1 which remove itself from the scene, then next I'll click the close_big movieclip to remove big_mc from the stage and will save it's own state, so then the next time i run the SWF file and dynamically add big_mc to stage, child_mc1 would be still missing and child_mc2 would still be displayed (EVEN IF I CLOSE THE SWF FILE, the state should be saved). Miniclip is a global leader in digital games with a mission of unleashing the gamer in everyone. This is actually a noobish question, but is there a possible way to save a certain state of a movieclip?, example i dynamically added a movieclip called big_mc, then inside big_mc contains three(3) smaller movie called child_mc1 and child_mc2 and a close_big to remove big_mc from the stage, when i click either of child_mc1 and child_mc2, the child_mc will disappear prior to which child_mc i clicked.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |