RE: [Flashcoders] Singleton AS2
Assuming you are storing the Singleton instance in a static class variable, unloading the movie from your container does not remove the instance from the class. Try setting your instance property to null when you unload the app (via a die() call or something similar), or detect its existence on load and handle your initialization accordingly. To help grasp the reasoning, remember that classes live in the global space. That's how you're able to call a static method or access a static property just by naming the Class. Makes sense? Bryan I have 5 applications and one of them was created with the Singleton pattern, those 5 apps are being loaded at different times into a container, when any of the movies is loaded and unloaded everything works fine but everytime the movie with the Singleton pattern is loaded into the container it creates a new copy of itself. one way to see that is creating a static counter variable that increases everytime the movie is loaded into the container. Could some one point me to a site where I could understand why this is happening. I understand what is going on but I can't grasp the reasoning behind it so that I can avoid those duplicates. TIA -- ...helmut ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Re: #SharedObject not so shared (Rákos Attila)
EEColor, I remember asking the same question years ago. The answer was something like this: SharedObject.getRemote(my_so, rtmp:/./.., /); I am not completely sure and do not have time to test it. As I forgot my mailing list password I couldnt search the archives... And next to that, I'm not sure if it still works in the current players. Yeah, good thinking, it was originally mentioned here http://www.thoughtsabout.net/blog/archives/03.html As mentioned on the blog, (and I've tested this) and it sadly no longer works in Flash 8, or 9. Rakos, Movies running in different sandboxes cannot access shared objects of each other. Yes, that makes sense, except for 2 things: 1) As far as I can tell, they should NOT be in separate sandboxes, they use the exact same code, and are installed in next to the same folder. As far as I can tell there is no way to specify the domain for a projector to get the desired behavior. 2) It's also inconsistent. First run it WILL use the same sandbox as the Flash IDE/etc, then later something will trigger the generation of a new sandbox (install a second version of the app, or view pandora) then all further requests go against the new sandbox instead of the original. Meaning the Flash Player changes it's mind about which domain it thinks it belong to! My best guess, likely due to it running in a projector without access to URL information, it's making stuff up. It doesn't make sense to me. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Focus stays in Flash control
Hi, I have a chat application that uses an HTML text field for input and a Flash Control for output. Everything worked fine until I installed Flash 9: The focus now stays in the Flash Control when clicking on it. I am having this problem with Firefox 2.0.0.6 and the Flash 9 plugin on Windows XP. It can be tested on any website, for example on the Aral Balkan website: http://aralbalkan.com/825 Click on the bunny talk Flash control in the upper right corner, then into the text field below it and try to type something there (you might have to repeat this a couple of times and don't switch windows; you can also tab around and see that the focus is still in the flash movie). It works again when clicking outside in the HTML area and then into the HTML text field - or when switching windows. This is rather annoying (I am using the JavaScript focus function in my Flash Application to automatically send the focus back to the text field, but this has the same effect). Does anybody know a workaround, is this a bug, etc.? Any insight would be greatly appreciated Bernhard ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] OT - Calling all Stephen Sacks
I don't have you're new email address ping me off list :) -- [ JPG ] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] variable scope
I have just created a class 'ClassA' that loads an XML file.Within that class I have a public function that navigates through the XML and populates arrays with the XML content. I am now creating another class, which will be called 'ClassB' which I plan to extend 'ClassA'. From 'ClassB' I would like to reference the array variable to re-use in the 'ClassB' class. I have tried tons of different ways all of which I get undefined. Could anyone help? Cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Singleton AS2
Thanks Bryan, after I posted this yesterday I did some more testes and in fact came out to the conclusion of what you are describing... private function onUnload () { delete Singleton trace(deleted); } It works, my variables get reset (counter) but there is still one item that is being stubborn and that is the tween class, after unloading and loading the movie with the Singleton pattern in the next load the Tween picks fires and also picks up a copy of the previous version... and that is what is trowing me off. is the Tween class is being instantiated inside another function within the class so there is not a reference of it directly on the class... for example: private function start() { var myTween:Tween = new Tween(img_mc, _x, mx.transitions.easing.Elastic.easeOut,0, Stage.width-img_mc._width, 3, true); maTween = myTween; myTween.FPS = 30; myTween.onMotionFinished = function() { trace(completed); myTween.yoyo(); }; } any ideas in regards to this? TIA On 9/9/07, Bryan Thompson [EMAIL PROTECTED] wrote: Assuming you are storing the Singleton instance in a static class variable, unloading the movie from your container does not remove the instance from the class. Try setting your instance property to null when you unload the app (via a die() call or something similar), or detect its existence on load and handle your initialization accordingly. To help grasp the reasoning, remember that classes live in the global space. That's how you're able to call a static method or access a static property just by naming the Class. Makes sense? Bryan I have 5 applications and one of them was created with the Singleton pattern, those 5 apps are being loaded at different times into a container, when any of the movies is loaded and unloaded everything works fine but everytime the movie with the Singleton pattern is loaded into the container it creates a new copy of itself. one way to see that is creating a static counter variable that increases everytime the movie is loaded into the container. Could some one point me to a site where I could understand why this is happening. I understand what is going on but I can't grasp the reasoning behind it so that I can avoid those duplicates. TIA -- ...helmut ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- ...helmut ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] variable scope
did you tried the Delegate- Class? in sense something like that: import mx.Delegate(i think that path is wrong) //.. ..// Delegate.create(scope,object) cheers olee 2007/9/9, Lee Marshall [EMAIL PROTECTED]: I have just created a class 'ClassA' that loads an XML file.Within that class I have a public function that navigates through the XML and populates arrays with the XML content. I am now creating another class, which will be called 'ClassB' which I plan to extend 'ClassA'. From 'ClassB' I would like to reference the array variable to re-use in the 'ClassB' class. I have tried tons of different ways all of which I get undefined. Could anyone help? Cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- http://www.renkster.de/#/about/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] variable scope
Hello :) can you show your code ? else try it : import mx.utils.Delegate ; class Test { function Test() { x = new XML() ; x.onLoad = Delegate.create(this, onLoad) ; // create a proxy between your instance and the xml object x.load(test.xml) ; } public var x:XML ; public function onLoad( success:Boolean ):Void { trace( scope of your function : + this) ; trace(xml : + x ) ; // here use your Test methods ! } } The Delegate class of Adobe can be your solution ? In my opensource framework i use more powerful Delegate implementation and event model, you can read : - http://code.google.com/p/vegas/wiki/VegasTutorialsEvents_delegate - http://code.google.com/p/vegas/wiki/VegasTutorialsEvents - http://code.google.com/p/vegas/ My vegas.events.Delegate class is more complete ... but the Adobe class it's more easy to begin with the proxy model. EKA+ :) 2007/9/9, Lee Marshall [EMAIL PROTECTED]: I have just created a class 'ClassA' that loads an XML file.Within that class I have a public function that navigates through the XML and populates arrays with the XML content. I am now creating another class, which will be called 'ClassB' which I plan to extend 'ClassA'. From 'ClassB' I would like to reference the array variable to re-use in the 'ClassB' class. I have tried tons of different ways all of which I get undefined. Could anyone help? Cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] variable scope
if you are just extending from ClassA you should be able to do something like this: --CLASS A: class ClassA { public var myVar:Number = 50; public function ClassA() {}; } --CLASS B class ClassB extends ClassA{ public function ClassB() { trace(myVar);//this will return 50 } } On 9/9/07, Lee Marshall [EMAIL PROTECTED] wrote: I have just created a class 'ClassA' that loads an XML file.Within that class I have a public function that navigates through the XML and populates arrays with the XML content. I am now creating another class, which will be called 'ClassB' which I plan to extend 'ClassA'. From 'ClassB' I would like to reference the array variable to re-use in the 'ClassB' class. I have tried tons of different ways all of which I get undefined. Could anyone help? Cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- ...helmut ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] variable scope
I did, yes Here is a snippet: kp_xml.load (xml/keypoints.xml); kp_xml.onLoad = Delegate.create (this, kpLoad); } public function kpLoad (bSuccess : Boolean) { kp_array = new Array; if (bSuccess){ //trace(Keypoints loaded!); //Sort keypoints numKPs = kp_xml.firstChild.childNodes.length; for (i = 0; i numKPs; i ++){ kpID_array.push (kp_xml.firstChild.childNodes[i].attributes.id); kp_array.push (kp_xml.firstChild.childNodes[i].childNodes[0].nodeValue); } // //trace(kp_array); gl_xml.load (xml/glossary.xml); gl_xml.onLoad = Delegate.create (this, glossLoad); } else { _root.debug_txt.text = Keypoints XML failed to load; } } From: [EMAIL PROTECTED] on behalf of o renken Sent: Sun 09/09/2007 14:58 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] variable scope did you tried the Delegate- Class? in sense something like that: import mx.Delegate(i think that path is wrong) //.. ..// Delegate.create(scope,object) cheers olee 2007/9/9, Lee Marshall [EMAIL PROTECTED]: I have just created a class 'ClassA' that loads an XML file.Within that class I have a public function that navigates through the XML and populates arrays with the XML content. I am now creating another class, which will be called 'ClassB' which I plan to extend 'ClassA'. From 'ClassB' I would like to reference the array variable to re-use in the 'ClassB' class. I have tried tons of different ways all of which I get undefined. Could anyone help? Cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://www.figleaf.com/ http://training.figleaf.com http://training.figleaf.com/ -- http://www.renkster.de/#/about/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://www.figleaf.com/ http://training.figleaf.com http://training.figleaf.com/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] variable scope
Sure: I am trying to retreive kp_array in 'classB', which is in the kpLoad function. /** * ... * @author - * @version 0.1 */ import mx.utils.Delegate; class xmlHandler { public var new_array : Array; public var numKPs : Number; public var kpID_array :Array public var kp_array :Array private var kp_xml : XML; private var numGlossIDs : Number; public var numGlossTerms : Number; private var letters_array : Array; private var glIndex_array : Array; private var glTerms_array : Array; public var glDefs_array : Array; private var tmpArr1 : Array; private var tmpArr2 : Array; private var glButtActive : Array; private var gl_xml : XML; private var numRefs : Number; private var ref_xml : XML; public var refID_array : Array; private var refRef_array : Array; private var i : Number; private var j : Number; private var __index : Number; var kp_cmp:mx.controls.TextArea; public function xmlHandler(){ //Keypoints kpID_array = new Array; kp_array = new Array; kp_xml = new XML (); kp_xml.ignoreWhite = true; //Glossary letters_array = new Array; glIndex_array = new Array; glTerms_array = new Array; glDefs_array = new Array; glButtActive = new Array; tmpArr1 = new Array; tmpArr2 = new Array; gl_xml = new XML (); gl_xml.ignoreWhite = true; //References refID_array = new Array; refRef_array = new Array; ref_xml = new XML (); ref_xml.ignoreWhite = true; //Load keypoints kp_xml.load (xml/keypoints.xml); kp_xml.onLoad = Delegate.create (this, kpLoad); } public function kpLoad (bSuccess : Boolean) { if (bSuccess){ //trace(Keypoints loaded!); //Sort keypoints numKPs = kp_xml.firstChild.childNodes.length; for (i = 0; i numKPs; i ++){ kpID_array.push (kp_xml.firstChild.childNodes[i].attributes.id); kp_array.push (kp_xml.firstChild.childNodes[i].childNodes[0].nodeValue); } // //trace(kp_array); gl_xml.load (xml/glossary.xml); gl_xml.onLoad = Delegate.create (this, glossLoad); } else { _root.debug_txt.text = Keypoints XML failed to load; } } public function glossLoad (bSuccess : Boolean) { if (bSuccess){ //trace(Glossary loaded!); //Sort glossary numGlossIDs = gl_xml.firstChild.childNodes.length; for (i = 0; i numGlossIDs; i ++) { numGlossTerms = gl_xml.firstChild.childNodes [i].childNodes.length; glIndex_array.push (gl_xml.firstChild.childNodes [i].attributes.letter); if (numGlossTerms == 0) { glButtActive.push(0); } else { glButtActive.push(1); var tmpArr1:Array = new Array(); var tmpArr2:Array = new Array(); for (j = 0; j numGlossTerms; j ++) { tmpArr1.push (gl_xml.firstChild.childNodes [i].childNodes [j].childNodes [0].childNodes [0].nodeValue); tmpArr2.push (gl_xml.firstChild.childNodes [i].childNodes [j].childNodes [1].childNodes [0].nodeValue); } glTerms_array.push (tmpArr1); glDefs_array.push (tmpArr2); } } // ref_xml.load (xml/references.xml); ref_xml.onLoad = Delegate.create (this, refsLoad); } else { _root.debug_txt.text = Keypoints XML failed to load; } } public function refsLoad (bSuccess : Boolean) { if (bSuccess){ //Sort keypoints numRefs = ref_xml.firstChild.childNodes.length; for (i = 0; i numRefs; i ++){ refID_array.push (ref_xml.firstChild.childNodes[i].attributes.id); refRef_array.push (ref_xml.firstChild.childNodes[i].childNodes[0].nodeValue); } // } else { _root.debug_txt.text = Keypoints XML failed to load; } _root.id_txt.text = refRef_array; } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] FLASH CMS
I'm currently doing some research on flash CMS. The idea is to build my own using Flash CS3. The backend will be ASP.NET(C#) and MSSQL. . I have many questions, the first one is: what do you think is the best approach? For example, suppose I need to edit some text (content) and properties (bold). So, this text, once edited, will be a html string like 'bthis text in bold/'. Should I store this value in a database or XML file associated with some 'template file' OR does flash allow me to create/generate a movie file (lets say 'movie_bold_text.swf') as a result? . Is any CMS out there (preferably open source) that I should see? I hope you guys could point me to any URL that you consider, tutorials, AS3 classes to see. TIA. __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar/ http://www.blumer.com.ar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] FLASH CMS
OpenCMs and Lenya Claudio M. E. Bastos Iorio wrote: I'm currently doing some research on flash CMS. The idea is to build my own using Flash CS3. The backend will be ASP.NET(C#) and MSSQL. . I have many questions, the first one is: what do you think is the best approach? For example, suppose I need to edit some text (content) and properties (bold). So, this text, once edited, will be a html string like 'bthis text in bold/'. Should I store this value in a database or XML file associated with some 'template file' OR does flash allow me to create/generate a movie file (lets say 'movie_bold_text.swf') as a result? . Is any CMS out there (preferably open source) that I should see? I hope you guys could point me to any URL that you consider, tutorials, AS3 classes to see. TIA. __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar/ http://www.blumer.com.ar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] FLASH CMS
http://www.10cms.com/ Steven Sacks Flash Maestro Los Angeles, CA -- blog: http://www.stevensacks.net Ron Wheeler wrote: OpenCMs and Lenya Claudio M. E. Bastos Iorio wrote: I'm currently doing some research on flash CMS. The idea is to build my own using Flash CS3. The backend will be ASP.NET(C#) and MSSQL. . I have many questions, the first one is: what do you think is the best approach? For example, suppose I need to edit some text (content) and properties (bold). So, this text, once edited, will be a html string like 'bthis text in bold/'. Should I store this value in a database or XML file associated with some 'template file' OR does flash allow me to create/generate a movie file (lets say 'movie_bold_text.swf') as a result? . Is any CMS out there (preferably open source) that I should see? I hope you guys could point me to any URL that you consider, tutorials, AS3 classes to see. TIA. __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar/ http://www.blumer.com.ar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] FLASH CMS
Thanks for your response! As I see, Lenya and OpenCMS are both 'html' CMS. Now what I'm trying to do is flash based CMS. For example: Start CMS, select a template or start with a blank. Drag a textbox to stage, edit content, edit styles. Drag a picturebox to stage, set url image or upload the file. Insert an external movie file, drag the movie to a desired position. Save. And then, generates/writes swf file (possible?) or generate a template-like swf file linked to a file (XML - database) with information about content (images, movies, text, coordinates). Later, re-login and edit the contents or add 'user restrictions to page' module, whatever. What do you think? __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Wheeler Sent: Sunday, September 09, 2007 1:36 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] FLASH CMS OpenCMs and Lenya Claudio M. E. Bastos Iorio wrote: I'm currently doing some research on flash CMS. The idea is to build my own using Flash CS3. The backend will be ASP.NET(C#) and MSSQL. . I have many questions, the first one is: what do you think is the best approach? For example, suppose I need to edit some text (content) and properties (bold). So, this text, once edited, will be a html string like 'bthis text in bold/'. Should I store this value in a database or XML file associated with some 'template file' OR does flash allow me to create/generate a movie file (lets say 'movie_bold_text.swf') as a result? . Is any CMS out there (preferably open source) that I should see? I hope you guys could point me to any URL that you consider, tutorials, AS3 classes to see. TIA. __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar/ http://www.blumer.com.ar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Singleton AS2
My assumption is that you have a scope problem. It seems like you're Singleton is working properly inside its own SWF, because you remarked that the duplication when loading was unusual. It sounds like you know that the Singleton pattern is designed to instantiate only one copy of itself, only if it doesn't exist, or to use the existing instance. If this is working correctly in the lone SWF, it sounds like, when loaded, there are two scopes: the original SWF and the loaded environment. When the Singleton is referenced after loading it is somehow relevant to the loading shell (_root, _parent, etc.), where an instance didn't previously exist. This sounds probable because after the second instance is created, a third instance is not created. That is, once the Singleton exists in each scope, it continues to work as it was designed. On 9/9/07 12:22 AM, Helmut Granda [EMAIL PROTECTED] wrote: I have 5 applications and one of them was created with the Singleton pattern, those 5 apps are being loaded at different times into a container, when any of the movies is loaded and unloaded everything works fine but everytime the movie with the Singleton pattern is loaded into the container it creates a new copy of itself. one way to see that is creating a static counter variable that increases everytime the movie is loaded into the container. Could some one point me to a site where I could understand why this is happening. I understand what is going on but I can't grasp the reasoning behind it so that I can avoid those duplicates. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How do you delete child movieclips?
If i get your explanation you are going to index the instance name of each childMc inside an array, to later delete mcArray[0], mcArray[1],mcArray[2] and so on as in: mcArray[0] = mc1.mc2; and so on... in this case try: unloadMovie(mcArray[0]); // will delete the mc2 inside mc1 Note that this will remove the movieclip visually only, so you'll have to add a delete statement after it as: //let's assume you have a button that does it mcArray = []; mcArray[0] = mc1.mc2; but.onRelease = function () { unloadMovie(mcArray[0]); trace(mcArray[0]); // traces _level0.mc1.mc2 delete mcArray[0]; // deletes the movieClip referred to the array index 0, not the value of the array element itself! trace(mcArray[0]); // traces undefined. } hope this helps... cheers On 9/4/07, Eduardo Barbosa [EMAIL PROTECTED] wrote: Hi Alexander, What I usually do is, at the same time that the child MCs are created, write them one after the other in an empty array that then you'll later call, run through it and delete all its contents. Makes sense? Let me know if you want me to copy paste some code I've written for your reference. Cheers! Eduardo ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How do you delete child movieclips?
Or you could simply put all your movieclips into a container movieclip and remove that one movieclip rather than iterating through and removing each movieclip one at a time. Steven Sacks Flash Maestro Los Angeles, CA -- blog: http://www.stevensacks.net Omar Fouad wrote: If i get your explanation you are going to index the instance name of each childMc inside an array, to later delete mcArray[0], mcArray[1],mcArray[2] and so on as in: mcArray[0] = mc1.mc2; and so on... in this case try: unloadMovie(mcArray[0]); // will delete the mc2 inside mc1 Note that this will remove the movieclip visually only, so you'll have to add a delete statement after it as: //let's assume you have a button that does it mcArray = []; mcArray[0] = mc1.mc2; but.onRelease = function () { unloadMovie(mcArray[0]); trace(mcArray[0]); // traces _level0.mc1.mc2 delete mcArray[0]; // deletes the movieClip referred to the array index 0, not the value of the array element itself! trace(mcArray[0]); // traces undefined. } hope this helps... cheers On 9/4/07, Eduardo Barbosa [EMAIL PROTECTED] wrote: Hi Alexander, What I usually do is, at the same time that the child MCs are created, write them one after the other in an empty array that then you'll later call, run through it and delete all its contents. Makes sense? Let me know if you want me to copy paste some code I've written for your reference. Cheers! Eduardo ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How do you delete child movieclips?
Steven's Idea is also good.. Others? On 9/10/07, Steven Sacks [EMAIL PROTECTED] wrote: Or you could simply put all your movieclips into a container movieclip and remove that one movieclip rather than iterating through and removing each movieclip one at a time. Steven Sacks Flash Maestro Los Angeles, CA -- blog: http://www.stevensacks.net Omar Fouad wrote: If i get your explanation you are going to index the instance name of each childMc inside an array, to later delete mcArray[0], mcArray[1],mcArray[2] and so on as in: mcArray[0] = mc1.mc2; and so on... in this case try: unloadMovie(mcArray[0]); // will delete the mc2 inside mc1 Note that this will remove the movieclip visually only, so you'll have to add a delete statement after it as: //let's assume you have a button that does it mcArray = []; mcArray[0] = mc1.mc2; but.onRelease = function () { unloadMovie(mcArray[0]); trace(mcArray[0]); // traces _level0.mc1.mc2 delete mcArray[0]; // deletes the movieClip referred to the array index 0, not the value of the array element itself! trace(mcArray[0]); // traces undefined. } hope this helps... cheers On 9/4/07, Eduardo Barbosa [EMAIL PROTECTED] wrote: Hi Alexander, What I usually do is, at the same time that the child MCs are created, write them one after the other in an empty array that then you'll later call, run through it and delete all its contents. Makes sense? Let me know if you want me to copy paste some code I've written for your reference. Cheers! Eduardo ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How do you delete child movieclips?
var num:Number = 10; var refs:Array = new Array(); function createClips() { for(var i=0; inum; i++) { var mc:MovieClip = createEmptyMovieClip(dummy+i, getNextHighestDepth()); refs.push(mc); } trace(refs.length); } function removeClips() { for(var i=0; inum; i++){ refs.pop().removeMovieClip(); } trace(refs.length); } createClips(); removeClips(); - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Monday, September 10, 2007 1:00 AM Subject: Re: [Flashcoders] How do you delete child movieclips? If i get your explanation you are going to index the instance name of each childMc inside an array, to later delete mcArray[0], mcArray[1],mcArray[2] and so on as in: mcArray[0] = mc1.mc2; and so on... in this case try: unloadMovie(mcArray[0]); // will delete the mc2 inside mc1 Note that this will remove the movieclip visually only, so you'll have to add a delete statement after it as: //let's assume you have a button that does it mcArray = []; mcArray[0] = mc1.mc2; but.onRelease = function () { unloadMovie(mcArray[0]); trace(mcArray[0]); // traces _level0.mc1.mc2 delete mcArray[0]; // deletes the movieClip referred to the array index 0, not the value of the array element itself! trace(mcArray[0]); // traces undefined. } hope this helps... cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] How do you delete child movieclips?
That would be the best of all solutions. On 9/10/07, Muzak [EMAIL PROTECTED] wrote: var num:Number = 10; var refs:Array = new Array(); function createClips() { for(var i=0; inum; i++) { var mc:MovieClip = createEmptyMovieClip(dummy+i, getNextHighestDepth()); refs.push(mc); } trace(refs.length); } function removeClips() { for(var i=0; inum; i++){ refs.pop().removeMovieClip(); } trace(refs.length); } createClips(); removeClips(); - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Monday, September 10, 2007 1:00 AM Subject: Re: [Flashcoders] How do you delete child movieclips? If i get your explanation you are going to index the instance name of each childMc inside an array, to later delete mcArray[0], mcArray[1],mcArray[2] and so on as in: mcArray[0] = mc1.mc2; and so on... in this case try: unloadMovie(mcArray[0]); // will delete the mc2 inside mc1 Note that this will remove the movieclip visually only, so you'll have to add a delete statement after it as: //let's assume you have a button that does it mcArray = []; mcArray[0] = mc1.mc2; but.onRelease = function () { unloadMovie(mcArray[0]); trace(mcArray[0]); // traces _level0.mc1.mc2 delete mcArray[0]; // deletes the movieClip referred to the array index 0, not the value of the array element itself! trace(mcArray[0]); // traces undefined. } hope this helps... cheers ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] FLASH CMS
Yes, you're right. You can find it here http://flashblocks.com/ . That's exactly what I'm trying to do. I didn't find a trial version on site :( . http://www.10cms.com/ looks fine, but I don't think the project is active, since website says that trial registration are full and there's no price. Thanks to all of you reading this and specially anyone who could contribute. At this part, this is more a 'thinking out loud' and research, and all links, ideas from you guys help me a lot. I've found a .NET library that creates swf files. This could be the solution to 'save' the created files. So, I still need the GUI (in flash). But at this point I'm wondering if there is something more 'consistent', maybe using new adobe AIR? Can I create/write swf files in AIR? TIA __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike Sent: Sunday, September 09, 2007 3:05 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] FLASH CMS FlashBlocks is an example of this - don't know the URL - but it is not Open Source... Claudio M. E. Bastos Iorio wrote: Thanks for your response! As I see, Lenya and OpenCMS are both 'html' CMS. Now what I'm trying to do is flash based CMS. For example: Start CMS, select a template or start with a blank. Drag a textbox to stage, edit content, edit styles. Drag a picturebox to stage, set url image or upload the file. Insert an external movie file, drag the movie to a desired position. Save. And then, generates/writes swf file (possible?) or generate a template-like swf file linked to a file (XML - database) with information about content (images, movies, text, coordinates). Later, re-login and edit the contents or add 'user restrictions to page' module, whatever. What do you think? __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Wheeler Sent: Sunday, September 09, 2007 1:36 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] FLASH CMS OpenCMs and Lenya Claudio M. E. Bastos Iorio wrote: I'm currently doing some research on flash CMS. The idea is to build my own using Flash CS3. The backend will be ASP.NET(C#) and MSSQL. . I have many questions, the first one is: what do you think is the best approach? For example, suppose I need to edit some text (content) and properties (bold). So, this text, once edited, will be a html string like 'bthis text in bold/'. Should I store this value in a database or XML file associated with some 'template file' OR does flash allow me to create/generate a movie file (lets say 'movie_bold_text.swf') as a result? . Is any CMS out there (preferably open source) that I should see? I hope you guys could point me to any URL that you consider, tutorials, AS3 classes to see. TIA. __ Claudio M. E. Bastos Iorio http://www.blumer.com.ar/ http://www.blumer.com.ar ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] state array for combo box?
anyone have a simple state array for a combox i could steal? :) thanks! -- -cb ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com