Re: [Flashcoders] Flash 8 Trial
Hey, got the same problem recently... I've found a direct link that still works : https://www.adobe.com/cfusion/tdrc/index.cfm?product=flashpro 2007/4/17, John Dowdell [EMAIL PROTECTED]: Adrian Lynch wrote: Maybe it's just me, but I can't find any Flash trials on adobe.com. Are any available? My apologies... it looks like many of the older trial versions were removed from the main listing when the CS3 announcements arrived, but new trials of individual tools won't be on the site for a few weeks yet. I've escalated this internally, but have not yet received staff reply. Last week I heard that you can still access some of the older Macromedia Studio trials by going through the link for FreeHand MX, but I have not confirmed today that this path is still available. Worth a shot...? jd/adobe ___ 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 -- Julien Vignali ___ 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] Embed text Problem
Kamal, Best method I guess is to upgrade to flash 8 (at least publish your movies for flash 8 with MTASC for example if you can't buy the flash 8 upgrade), and use the advanced antialiasing system for fonts (see TextField.antiAliasType in the flash 8 API reference for more info). Another method if your text is only static, you may also create it in Photoshop and then export it to an image and load it up in your movie library... Regards Julien 2006/12/21, kamal Priyashantha [EMAIL PROTECTED]: *Hello Flashcoders,* is there any method for avoid letters looks fuzzy when embed the font in Text Fields IDE - MX2004 Font - Gill Sans Light Kamal ___ 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 -- Julien Vignali ___ 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] ActionScript switch/default syntax and interpretation
First, you have a typo in your switch(): you wrote switch(var) instead of switch(v). Second, to avoid any unpredictable result from a switch(), this statement should look like (according to the MM docs) : switch(condition){ case A: break; case B: break; default: // not mendatory but should always be the last statement break; } Moreover, another good practice is to type variables because the case: statement uses the strict equality (===) to evaluate the result of the condition. So, returning to your problem : var v:Number = 1; switch(v){ case 1: trace(case string 1); break; case 1: trace(case number 1); break; default: trace(default); break; } Obviously outputs : case number 1. What result do you have? 2006/12/21, strk [EMAIL PROTECTED]: Is this valid ActionScript ? var v = 1; switch (var) { default: trace(default); break; case 1: trace(1); break; } What is expected to be traced ? --strk; ___ 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 -- Julien Vignali ___ 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] Multiple MCs with the same name
Haydn, It seems that your code attaches the 'game' under the same instance name You should test the presence of a previous game and remove it before attaching a new one: if (_root.game != undefined) { _root.game.removeMovieClip(); } _root.attachMovie(gameMC, game, depth); Also, it's possible to have several mc with the same name, but you will only be able to control the first you've created... I guess the for..loop spits duplicate movieclip names because the internal mc key isn't its name. 2006/12/18, Haydn Ewers [EMAIL PROTECTED]: Hey all, I'm working on a game in Flash 8 using AS2. After the game plays through twice it appears to attach multiple copies of the 'game' MovieClip. (The 'game' MovieClip contains the actual gameplay and is shown after the user makes a selection in the menu.) If I run this code after the problem starts to occur: for (var i:String in _root) trace(_root[i]+\t+(typeof _root[i])); I get this output: MAC 8,0,22,0string _level0.gamemovieclip _level0.gamemovieclip _level0.gamemovieclip This doesn't make sense to me. How can there be multiple MovieClips with the same name? Does anyone know what could be causing this kind of behaviour? Thanks, Haydn. ___ 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 -- Julien Vignali ___ 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] listing children?
A quick way: // this = the parent MC for (var child:String in this){ if (child instanceof MovieClip) { // do your children mc manipulations... } } 2006/11/23, Wendy Richardson [EMAIL PROTECTED]: If I have a mc with some mc's attached, is there a quick way to list/access/manipulate the attached mc's without using their explicit names? Some kind of children thingy? Thanks Wendy ___ 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 -- Julien Vignali ___ 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] listing children?
Another way (maybe a smarter and cleaner one): create an array of children and fill it when you attach the children mc. var children:Array = []; function addChild(link:String, name:String, depth:Number){ var child:MovieClip = this.attachMovie(link, name, depth); children.push(child); } and then later in your code: for (var i:Number = 0; i children.length; i) { var child:MovieClip = children[i]; // do your child mc manipulations... } Hope it helps ;-) Regards 2006/11/23, Julien Vignali [EMAIL PROTECTED]: A quick way: // this = the parent MC for (var child:String in this){ if (child instanceof MovieClip) { // do your children mc manipulations... } } 2006/11/23, Wendy Richardson [EMAIL PROTECTED]: If I have a mc with some mc's attached, is there a quick way to list/access/manipulate the attached mc's without using their explicit names? Some kind of children thingy? Thanks Wendy ___ 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 -- Julien Vignali -- Julien Vignali ___ 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] Q;Pass an array as event object?
I've tried it and it works fine and as expected.. you must have an error somewhere else... Can you post more of your code ? 2006/11/22, [EMAIL PROTECTED] [EMAIL PROTECTED]: Anyone know why this doesn't work? a_presets1=[5,6,1,6,4,8,5,6]; this.dispatchEvent({target:this, type:Presets, o_presets:a_presets1}); //my listener function: function Presets(evtob){ var a_presets=evtob.o_presets; trace(a_presets); //a_presets traces out undefined } [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ 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 -- Julien Vignali ___ 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] Manually fire Stage resize event.
Julian, what about that: import mx.events.EventDispatcher; class StageListener { public var addEventListener:Function; public var removeEventListener:Function; private var dispatchEvent:Function; function StageListener(){ EventDispatcher.initialize(this); Stage.addListener(this); } public function resize():Void { onResize(); } private function onResize():Void { dispatchEvent({type:onResize, target:this}); } } var sl:StageListener = new StageListener(); var myClass:SomeClass = new SomeClass(); sl.addEventListener(onResize, myClass); sl.resize(); Julien. 2006/11/17, bayo [EMAIL PROTECTED]: Hi, I'd like to manually fire a Stage resize event without the Stage having actually been resized. Anyone know if this is possible? Thanks. Julian ___ 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 -- Julien Vignali ___ 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] why are my class property's strong typing being ignored?
Hi Rich, could you provide some sample code of your Settings class and your xml processing ? 2006/11/16, Rich Rodecker [EMAIL PROTECTED]: Hello, I've got a class named 'Settings' which has a number of properties. Those properties are strongly typed to various types...string, number, boolean, etc. I'm loading in xml in a separate Model class, and then parsing the xml and assigning the that various values in the xml to the properties of the Settings class. However, all the values are being set as a string (that part I expected since I am assigning the values of text nodes, which of course are strings, in the xml to the Setting's properties)...and I'm not getting any parse errors when I try and assign a string to a property that is strongly typed as a number, or boolean. I figure since I am trying to use myBranch.firstChild.nodeValue that flash, at compile time, can see I am trying to set a string to a property typed as a Number, so what's going on? ___ 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] why are my class property's strong typing being ignored?
Thanks Rich ;-) You don't have compiler errors because you're assigning values to your singleton by using the square brackets [ ] method. By doing this, at compile time the compiler doesn't know which property you're trying to modify... The property can be of any type or can even not exist at all, the compiler won't bother! ;-) To solve the problem you can use JSON as Eka previously said, or you can modify your Settings class and make your xml processing aware of Settings' property types. Here is a example: class com.mysite.model.Settings { private static var instance:MySettings; public var custom_color_3:String; public var background_image:Boolean; public var background_type:String; public var background_alpha:Number; public var title_mode:String; /* * Private constructor */ private function MySettings(){ init(); } /** * Set the defaults values * (otherwise properties are seen as 'undefined') */ private function init():Void { custom_color_3 = ; background_alpha = 0; background_image = false; background_type = ; title_mode = ; } // rest of class.. } function parseSettings(success:Boolean){ var settingsBranch:XMLNode = app_xml.firstChild; var name:String; // will store the current node name var value:String; // will store the current node string value var type:String; // will store Setting's property type var settingNodes:Array = settingsBranch.childNodes; // iterate through setting nodes for(var i:Number = 0; i settingNodes.length; i++){ var settingNode:XMLNode = settingNodes[i]; name = settingNode.nodeName; value = settingNode.firstChild.nodeValue; type = typeof(settings[name]); switch(type){ case number: settings[name] = Number(value); break; case boolean: settings[name] = (value == 1) ? true : false; break; default: settings[name]= value; break; } } } Hope it helps, Julien 2006/11/16, Rich Rodecker [EMAIL PROTECTED]: julien: sure here's a sample: class com.mysite.model.Settings { private static var instance = null; public var custom_color_3:String; public var background_image:Boolean; public var background_type:String; public var background_alpha:Number; public var title_mode:String; //rest of class } Here is the function where I parse the xml into the properties above, pretty simple: function parseSettings(){ var settingsBranch = app_xml.firstChild.firstChild; var c = settingsBranch.childNodes; var num = settingsBranch.childNodes.length; var nextBranch:XMLNode = settingsBranch.childNodes [0]; while(nextBranch){ var tagName = nextBranch.nodeName; settings[tagName] = nextBranch.firstChild.nodeValue; nextBranch = nextBranch.nextSibling; } } and here is what the xml looks like: settings custom_color_3#FF/custom_color_3 background_image1/background_image background_typejpg/background_type background_alpha100/background_alpha title_modePROFILE/title_mode /settings eka: - yeah, i know xml is only a string..my problem is that i am assigning a string to properties that are clearly typed as something other than a string, yet flash isnt complaining. On 11/16/06, eka [EMAIL PROTECTED] wrote: Hello :) a XML is only a String all properties (nodeValue) or attributes are strings... you must transform the type of your values with customs deserialize functions. For me it's better to use JSON for example : http://www.json.org/ (you keep the primitive types of your objects with the serialize/deserialize) You can try to use my openSource framework VEGAS who implement JSON and EDEN (the best solution to text format datas) Install VEGAS : http://vegas.riaforge.org/ (use the SVN or the zip link in this page to download my framework) Test the JSON examples in VEGAS in the vegas.string package : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/vegas/string/ Test the Eden examples (Burrrn library used in VEGAS) : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/buRRRn/eden/ Test JSON and Eden extension in ASGard (extension of VEGAS) : http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/net/ (JSONLoader, EdenLoader) Test my example of Config pattern and localization pattern in http://svn.riaforge.org/vegas/AS2/trunk/bin/test/asgard/config/ (and bin/test/system) For me ... XML is slow and don't keep the typing ! EKA+ :) 2006/11/16, Julien Vignali [EMAIL PROTECTED]: Hi Rich, could you provide some sample code of your Settings class and your xml processing ? 2006/11/16, Rich Rodecker [EMAIL PROTECTED]: Hello, I've got a class named 'Settings' which has a number of properties. Those properties are strongly typed to various types...string, number, boolean, etc. I'm loading in xml in a separate Model
Re: [Flashcoders] Can Flash determine which server it is being served from?
Have you tried to play with the _root._url property ? BOYD SPEER a écrit : Any ideas on how a Flash .swf could be aware of the server from which it has been loaded? I would like to somehow create a .swf that would only run if loaded from a certain server to prevent the database front end from being hijacked and installed in a different invironment... thanks for any insights! -Boyd ___ 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] [ot-ish] Screen recording software for Windows?
There's also VH Screen Capture Driver from Vladimir Hmelyoff's Software Lab. It's a directshow filter that is compatible with any capture software (such as VirtualDub, iuVCR, AMCap, VideoGhost...), and it's free for private use! Main features: * multimonitor support * great performance (screen capture optimization) * fast and highly optimized capture from screen * real-time scale (resize) captured images * output video size (dimensions) controlling * auto selection best optimization method * interactive window or region selection * realtime window position indication * manual region setup * align video dimensions by 4 feature * fill non-visible parts with border color * framerate controlling * capture mouse and show mouse clicks * full Flash and Windows Media Player support * multi-instance support * controlling and connection to any VHScrCap instance (for applications, which cannot show capture filter's properties) Check it out at : http://www.hmelyoff.com/index.php?section=4 Regards, Julien Vignali Robert r. Sanders a écrit : For years we've used HyperCam its about $40 - http://www.hyperionics.com/hc/ You might also try BB FlashBack the express version is cheap ($40), but lacks the editor that the full version has (but if you export to AVI from the recorder then you won't care). The 'native' compression format of the capture is a very high compression, but I believe, lossless, format based on the windows drawing apis. http://www.bbsoftware.co.uk/BBFlashBackExpress.aspx Josh Santangelo wrote: I'm usually a Mac guy and have lots of fun with SnapzProX, but I need something similar for recording on-screen interactions to video files in Windows. Preferably I'd like to be able to get big, uncompressed video files out of it for later editing. Does anyone have a favorite for this sort of thing? I've heard of Camtasia Studio, but it looks like it's $300. I think my limit would be about $100. thanks, -josh ___ 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] animationpackage library, onCallback ?
Wendy, I'm afraid I can't help you with AnimationPackage but, you may have a look at the Fuse Engine which is a powerful sequence animation engine, and what you asked can be so easily done with this cool tool (full AS2 and OOP support, event callbacks, sequence manipulation...) http://www.mosessupposes.com/Fuse Wendy Richardson a écrit : Animationpackage: That's a fun library, has taken me too many hrs to get to where I almost want to go. Now I have 2 animations on curves, want them to run one after each other, and trying to start a second animation at the completion of the first, and I am trying to use onCallback from said libraries. As directed, I add: /var myListener:Object = new Object(); APCore.addListener(myListener); / I add onCallback to the animationStyle line: /...code for first animation... works fine// myMOC.animationStyle(3000,Sine.easeInOut,onCallback); / / /and later try to trace at animation's end: myListener.onCallback = function(){ trace(onCallback); } I get no indication that I have reached the last function. ANyone got a working example, a few statements, of getting the onCallback working? Thanks Wendy - you should look into one of the animation engines/packages available out there: http://www.mosessupposes.com/Fuse/ http://www.alex-uhlmann.de/flash/animationpackage/ Here's an example of a movieclip animated along a curve: http://www.alex-uhlmann.de/flash/animationpackage/de/alex_uhlmann/animationpackage/animation/MoveOnCurve_01.html regards, Muzak - Original Message - From: Wendy Richardson [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, October 20, 2006 7:35 PM Subject: [Flashcoders] Re: drawing a ring - can I use as motion path Here's a bit of a digression - can I draw a ring programatically and use it as a motion path for another MC? Like say I want a planet orbit (and I do) and I want the planet to ride round and round the ring, can I do that with all script? Thanks in advance. Wendy -- ___ 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] push info from server to flash?
The only way to achieve that is to use a socket server and to have the possibility to run it somewhere (some providers offer that). You have plenty of choice regarding which server you need and some are free, some aren't. To name a few: Flash Data Services, Red5 (if I remember well), Oregano, Offbeat, ElectroServer, WebOrb... Regards Julien V. Millie Niss a écrit : Is there any way to push information from a server side script (PHP) to a flash client, rather than having the Flash ask for it by calling a PHP page? I want to create a virtual world whose state will be maintained in a MySQL database. Multiple users will be able to connect, view, and interact with the world. I need a way for the view (flash client) seen by one user to know when something another user has done has changed the world. I could poll the server regularly with a setInterval, but that seems wasteful of bandwidth. Most of the action in the world will be computed by the clients on their own; they just need to be informed when relatively rare events happen caused by other users. (The creatures who live in the world will keep moving around on their own according to a prescribed behavior, and will just need to be informed when someone does something to them.) Ideally, the creatures would do the same thing in all the users' views, but this would require constant back-and-forth communication with the server. I am debating whether to fake it by having them work independently (so that viewers won't really see the same world) except when they interact. Millie Niss [EMAIL PROTECTED] http://www.sporkworld.org ___ 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] Allow smoothing on imported jpeg:s
Hi Johan, Loading external Jpeg with LoadMovie or MovieClipLoader gives that nasty effects on rotated clips... The workaround is to use BitmapData (flash8) that will smooth the loaded images. I found a custom class that allows you to load images in a handy way. Take a look at: http://guepard.media-box.net/index.php?2006/09/30/10 It's in french but source, usage and example are provided. Hope it helps! Julien Johan Nyberg a écrit : Hi everybody, anybody know if there is a way to use the allow smoothing functionality on imported jpeg:s? I want to be able to rotate imported jpeg:s, but they look awful, and there doesn't seem to be a way to switch on allow smoothing with action script. Is there a work-around? ___ 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] Q: passing flash form data with NO server side scripting
I double Iv... You should really change your provider. A one-page script could do everything you're trying to achieve and even more... PHP is widely available at a very low cost ;-) Nevertheless, if you are really stuck to this provider, I'm afraid but your solution with the server log file doesn't make sense to me... How will be able to extract your form data from there? You'll have to post anything in a GET (what about special characters or long strings for exemple?). How will you know which line you need in the log file? There could be a lot of garbage in this file and its size is usually growing so you may run into performance problems too on the client side... Iv a écrit : Hello bitstreams, bmc I have an unusual flash form project in that the hosting provider bmc doesn't support ANY server side scripting. - change your provider. bmc My goal is to simply pass name value pairs from a form... - SharedObject possible? ___ 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] certificate problem in a desktop application
Céline, Take a look at the Nullsoft Installer (http://nsis.sourceforge.net) which is a powerful professional scriptable install system. I've been using it several times and it works like a charm. I'm almost sure that you can use it to deploy your .exe zinc app and silently install the certificate too ;-) Plus, you can use an eclipse-based environnement (EclipseNSIS) which will help you to test polish youur scripts before going to production! Good luck :) Julien Céline Nguyen a écrit : Yes I am trying to figure out how to do this. Any ideas ? Do you know why a browser window running the application displays the security pop-up windows whereas the flash player nor the zinc .exe does not displays the same security pop-up, and don't even reach the https server ? (I trace an httpStatus 100 meaning flash error) - Original Message - From: Kevin Aebig [EMAIL PROTECTED] To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com Sent: Tuesday, September 12, 2006 1:49 PM Subject: RE: [Flashcoders] certificate problem in a desktop application I'd look at doing an installer. That would probably be on of the easiest routes and would be guaranteed to work. !k -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Céline Nguyen Sent: Tuesday, September 12, 2006 10:11 AM To: Flashcoders mailing list Subject: [Flashcoders] certificate problem in a desktop application Hello, I have a strange certificate problem with Flash8. I am building a flash app that runs on local computers. The app uses LoadVars and sendAndLoad methods to send and load parameters to a distant php page in HTTPS. I have configured the global security panel of the flash player to add the entire folder of my flash application, and I have added a cross domain policy file on the https servers that says allow-access-from domain='*' When I run the application within a browser, the security pop-up appears asking to trust the https location and once it's done, but when I run the .exe file created with ZINC, no pop-up appears and the http status sends a flash error message. I have dicovered that I must install the certificate on my computer in order for my application to work properly. But can I ask every end user to manually install the certificate ? I think it's not really secure to let them know about the https adress nor elegant to make them do this. My questions then are : Is there a way in Actionscript to make the security pop-up appear within the exe application ? Or is there a way to build an installer with ZINC and configure it so that it installs a certificate (.cer) on the destination computer ? or is there a more simple solution ? Will the registration of the https location solve my problem ? Best, Celine ___ 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
Re: [Flashcoders] Populating Text Fields
CK You have a scope problem. elements_arr is defined within the onLoad handler so it won't be accessible from outside (i.e. from your assignText() function). You'd better use the static mx.utils.Delegate class to handle the onLoad event in an easier manner: import mx.utils.Delegate; var elements_arr:Array = []; var aquentDoc:XML = new XML(); aquentDoc.ignoreWhite = true; aquentDoc.onLoad = Delegate.create(this, this.onAquentDocLoad); aquentDoc.load(xml url here); function onAquentDocLoad(success:Boolean):Void { // ... check for success, XML validation parsing... // now fill your array (elements_arr is available) elements_arr = aquentDoc.firstChild.childNodes; for (var i = 0; i elements_arr.length; i++) { if (elements_arr[i].attributes[id] != null) { var headers = elements_arr[i].attributes[id]; } else { var content = elements_arr[i]; } } // the array is filled, you can call assignText() assignText(); } function assignText() { for (var p in this) { if (this[p] instanceof TextField) { trace(found +this[p]._name); } if(this[p]._name == header01_text){ this[p].text=elements_arr[i].attributes[id]; } } Hope it helps.. Julien CK a écrit : Hi, An attempt to dynamically assign text gathered from XML nodes has me stumped. I've the text field instances, but am at a loss how to proceed. Any help would be appreciated. Code: //Create XML Object var aquentDoc:XML = new XML(); aquentDoc.ignoreWhite = true; //event handler aquentDoc.onLoad = function(success:Boolean) { if (!success) { trace(Failure Loading aquentDoc XML); return; } //validating the xml file if (this.status != 0) { trace(This xmlObject is not well-formed: +this.status); return; } //Error check - xml data okay! if (this.firstChild.nodeName.toLowerCase() != aquentdoc) { trace(Unexpected XML data: +this.firstChild.nodeName); return; } //Extract header nodes into an array. var elements_arr = this.firstChild.childNodes; for (var i = 0; ielements_arr.length; i++) { //trace(elements_arr[i]); if (elements_arr[i].attributes[id] != null) { var headers = elements_arr[i].attributes[id]; //trace(headers); } else { var content = elements_arr[i]; //trace(content); } } }; Code: //Displays the text fields correctly. function assignText() { for (var p in this) { if (this[p] instanceof TextField) { //Show each field's name trace(found +this[p]._name); } } } Code: //Failed attempt at assigning text. //This should be called from inside the onLoad handler. function assignText() { for (var p in this) { if (this[p] instanceof TextField) { //Show each field's name trace(found +this[p]._name); } if(this[p]._name == header01_text){ this[p].text=elements_arr[i].attributes[id]; } }___ 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] vars with $
Another relatively useful use is for flash getters/setters: class MyClass{ // you can't call this property id // because of the name of the get/set functions private var $id:Number; public function get id():Number { return $id; } // use of p_xx for parametrical variables public function set id(p_id:Number):Void { $id = p_id; } } It's up to you to choose between $, p_, _, or mc, txt, or whatever prefix you like to distinguish things more easily in your code. For my part, I don't use any prefix except for ui elements ('mc' for MovieClip, 'txt' for TextField, etc...) Tom Lee a écrit : The real benefit to marking parameters is when you use variables within a function that are defined outside the function. You could make an argument that it's poor practice to do so, but there it is. I guess you could prefix every other kind of variable instead. Also, when you are choosing names for your parameters marking them with some universal prefix is an easy way to avoid naming collisions. Does anyone really port ActionScript to PHP and Perl or did you just mean working in both languages individually? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Keesey Sent: Friday, August 18, 2006 8:25 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] vars with $ I have seen others do it, or mark parameters with a p_. I prefer not to mark parameters in any special way. I mark private variables with _, so those are already distinct. And if I have a function that's so long that I can't see the top from somewhere in the body, it's well past time to cut it down into more manageable chunks. Plus, using $ makes it more confusing when switching between PHP or Perl (or another language that uses $ to mark all variables) and ActionScript. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lee Sent: Friday, August 18, 2006 1:38 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] vars with $ I've used it to indicate arguments in a function to clarify the origin of the variable, like this: function myFunc($arg1,$arg2){ trace($arg1+ : +$arg2); } I don't know where I picked that up, but for me it makes the code easier to read since you know immediately they are arguments. I've seen people use the underscore for the same purpose, but that can confuse things since ActionScript uses that for some native properties (_x,_y). Does anyone else do this, or am I just in my own little universe? ___ 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] scale9grid how to
Check the Flash docs... It's explained ;-) mcRoundedRect.scale9Grid = new Rectangle(x1, y1, x2, y2); Marcos Neves a écrit : How can I use programaticlly scale9grid to don´t deform a roundRect when scaled? I´know how it works at design time on flash. ___ 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] scale9grid how to
Marco, If I remember well, you must publish your fla in order to test your scale9 grid. You can't preview the results within the flash editor and the scale9 guides (the 4 black dashed lines) are just visual helpers. But, you can easily apply a scale9 grid to any movieclip at runtime, even if you haven't previously enabled scale9 in the movieclip properties... Here is a .fla file to illustrate this: http://www.vignali.net/julien/scale9.fla Hope it helps Julien Vignali Marcos Neves a écrit : That I did eric, how can I test to see if works? If I scale at the scene, It doesn´t works. When I export the swf, neither. On 7/20/06, eric dolecki [EMAIL PROTECTED] wrote: Make your rectangle a mc. In the Library, right-click on the mc, choose properties should be a checkbox @ bottom to enable scale9 you should see dashed rules appear in mc preview in Library 2x click into, drag the rules around to set up your scale9 On 7/20/06, Marcos Neves [EMAIL PROTECTED] wrote: Should someone give an example of how to use scale9grid in flash authoring? I bitmap fill a rectangle with a checker pattern. The corners should have no deformation, but it´s having. On 7/20/06, Marcos Neves [EMAIL PROTECTED] wrote: I used that two. You call the scale9 function when? How do you know when it need to be updated? On 7/20/06, Merrill, Jason [EMAIL PROTECTED] wrote: Well, what I did is make 9 parts to my graphic, topLeft_mc topCenter_mc topRight_mc centerLeft_mc center_mc etc. Then, put those in a movieClip with the respective instance names. Then pass that clip to a scale function, also pass width and height parameters. Then in the function, do some calculations. Something like this (this example attaches the scale 9 clip from the library): private function scale9():MovieClip { t = this.target_mc.attachMovie(scale9graphic , scale9graphic_mc, theDepth); t._x = x; t._y = y; x1 = 0; x2 = t.topLeft_mc._width; x3 = w-(t.topLeft_mc._width); y1 = 0; y2 = t.topLeft_mc._height; y3 = h-t.bottomLeft_mc._height; w1 = t.topLeft_mc._width; w2 = w-(t.topLeft_mc._width + t.topRight_mc._width); w3 = t.topRight_mc._width; h1 = t.topRight_mc._height; h2 = h-(t.topRight_mc._height+t.bottomRight_mc._height); h3 = t.bottomRight_mc._height; t.topLeft_mc._x = x1; t.topLeft_mc._y = y1; t.topCenter_mc._x = x2; t.topCenter_mc._y = y1; t.topCenter_mc._width = w2; t.topRight_mc._x = x3; t.topRight_mc._y = y1; t.centerLeft_mc._x = x1; t.centerLeft_mc._y = y2; t.centerLeft_mc._height = h2; t.center_mc._x = x2; t.center_mc._y = y2; t.center_mc._width = w2; t.center_mc._height = h2; t.centerRight_mc._x = x3; t.centerRight_mc._y = y2; t.centerRight_mc._height = h2; t.bottomLeft_mc._x = x1; t.bottomLeft_mc._y = y3; t.bottomCenter_mc._x = x2; t.bottomCenter_mc._y = y3; t.bottomCenter_mc._width = w2; t.bottomRight_mc._x = x3; t.bottomRight_mc._y = y3; return t; }; Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Marcos Neves Sent: Thursday, July 20, 2006 8:48 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] scale9grid how to And how it can be done? On 7/20/06, Merrill, Jason [EMAIL PROTECTED] wrote: If it gets too messy, you can also roll your own scale 9 function for graphics - that's what I did since I'm building for Flash 7. It's pretty easy actually. Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Marcos Neves Sent: Wednesday, July 19, 2006 4:34 PM To: Flashcoders mailing list Subject: [Flashcoders] scale9grid how to How can I use programaticlly scale9grid to don´t deform a roundRect when scaled? I´know how it works at design time on flash. ___ 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
Re: [Flashcoders] AS2 and watch ...
Well, I use it sometimes as an update broadcast mecanism. Let's say I have some value objects floating around, and when I change a property on any of these, I use the watch to broadcast an event if for example the value has changed (by testing the newValue and the oldValue). It can be sometimes useful for some little and simple tasks that don't rely on a heavy process, like applying watches on global vars. Of course, you can do all of this without using the watch function, it's just a matter of design, choice and code comfort :) Julien Stephen Ford a écrit : How often do you use 'watch' in your applications?. It seems pretty powerful to me, and I've only just discovered it. Any thoughts on this. Cheers, Stephen.___ 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] embedFonts vs. setTextFormat
Try using setNewTextFormat() instead.. Mendelsohn, Michael a écrit : Hi list... The embedFonts line seems to prevent the setTextFormat line from working. What am I missing? The font univ is in the library, and its linkage is univ. Thanks, - Michael M. private function createSlideWatcher():Void { var tf:TextFormat = new TextFormat(); tf.font = univ; tf.color = 0xFF; tf.size = 30; _root.createTextField(slideWatcher, _root.getNextHighestDepth(), 10, 10, 150, 150); _root.slideWatcher.background = true; _root.slideWatcher.backgroundColor = 0x66; _root.slideWatcher.embedFonts = true; _root.slideWatcher.setTextFormat(tf); _root.slideWatcher.text = hi; } ___ 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] AS2 and Singleton woes ...
Stephen, you're singleton implemention looks odd to me. I think it is confusing to access the singleton shared instance by using a new (which is normally used to create multiple instances of the same class...). I would advise you to follow the standard singleton implementation: class Sampler{ private static var dsInstance:Sampler; // private constructor private function Sampler(){ // some initialization code... } public static function getInstance():Sampler{ if (dsInstance == undefined) dsInstance = new Sampler(); return dsInstance; } } var sampler:Sampler = Sampler.getInstance(); -- Julien Stephen Ford a écrit : Hi, My singleton is throwing +256 levels of error. Below I will show the code from my .as file and from the .fla file: - DateShaper.as -class Sampler{private static var dsInstance:Sampler; // The master instance of this class public function Sampler(){getInstance();} public function getInstance():Sampler{trace(dsInstance: +dsInstance); if(dsInstance == null) {dsInstance = new Sampler(); } return dsInstance; } } - myFile.fla - var mySampler:Sampler = new Sampler(); If you can see what I am doing wrong, please let me know. Thanks, Stephen.___ 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] For...in counts backwards?
Well the order of your strings is something subjective... You should use Array.sort([function]) and create a custom sorting function that would sort your array the way you want: var array:Array = [seventy-four, ten, twelve]; function sortByStringLength(a:Object, b:Object):Number { if (String(a).length String(b).length) return 1; else if (String(a).length String(b).length) return -1; return 0; } array.sort(sortByStringLength); for(var i in array) { trace(array[i]); } outputs: seventy-four twelve ten Mendelsohn, Michael a écrit : Hi list... From the help on for...in: You can also iterate through the elements of an array: var myArray:Array = [one, two, three]; for (var i:String in myArray) { trace(myArray[i]); } This code outputs the following in the Output panel: three two One Why is the data output in reverse order and is there any way of ordering it one,two,three? Thanks, - Michael M. ___ 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] Drawing and resizing
Just use back_mc.clear() in your resize() method just before drawing it again. But, why don't you just draw it once outside of the resize method and then resize it with the _width and _height properties??? Julien Alexander Farber a écrit : Hello! I'd like to draw a green rectangle underneath 2 TextFields. As my flash app. will have WIDTH=100% in the HTML-page, I'd like to handle the eventual resizing of it. For that I've registered an onResize-listener at the Stage (see the resize() function below). While resizing works ok for the both TextFields (called area_txt and field_txt), it fails for the green rectangle: the old rectangle doesn't get erased. Does anybody please have an advice for me? I don't see any Stage.clear() method in the help-docs... I've prepared a complete test case below, please copy-paste it and resize the movie window and you'll see the problem I have: createEmptyMovieClip('back_mc', getNextHighestDepth()); createTextField('area_txt', getNextHighestDepth(), 5, 5, 5, 5); with (area_txt) { border = true; multiline = true; textColor = 0xFF; } createTextField('field_txt', getNextHighestDepth(), 5, 5, 5, 5); with (field_txt) { border = true; type = 'input'; textColor = 0xFF; } resize(); Stage.scaleMode = 'noScale'; var resizeListener:Object = new Object(); resizeListener.onResize = resize; Stage.addListener(resizeListener); function resize() { trace(Stage size: + Stage.width + x + Stage.height); var text_width:Number = 3 * Stage.width / 4; var text_left:Number = 10; // draw a rectangle with a cut-off corner with (back_mc) { _alpha = 50; moveTo(text_left + 8, 30); lineStyle(0, 0xFF, 100); beginFill(0x008000, 100); lineTo(text_left + text_width, 30); lineTo(text_left + text_width, 290); lineTo(text_left, 290); lineTo(text_left, 30 + 8); endFill(); } with (area_txt) { _x = text_left; _y = 30; _width = text_width; _height = 240; } with (field_txt) { _x = text_left; _y = 270; _width = text_width; _height = 20; } } Also I wonder, if there is a way to encapsulate the rectangle drawing code insided the back_mc MovieClip? Then I'd just have to position it and to change its _width and _height and wouldn't need to touch its drawing guts (i.e. OOP-encapsulation). I've tried create a MovieClip symbol and to put this code into its 1st frame, but that didn't work (nothing was drawn): _alpha = 50; moveTo(8, 0); lineStyle(0, 0xFF, 100); beginFill(0x008000, 100); lineTo(_width, 0); lineTo(_width, _height); lineTo(0, _height); lineTo(0, 8); endFill(); Thank you Alex ___ 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] Drawing and resizing
here is a quick custom class that would do the trick: class drawing.GreenRect extends MovieClip { private rect:MovieClip; private text1:TextField; private text2:TextField; public static var symbolName:String = __Packages.drawing.GreenRect; private static var link = Object.registerClass(symbolName, GreenRect); public function GreenRect(parent:MovieClip):Void {} draw(); Stage.addListener(this); } private function draw():Void { rect = createEmptyMovieClip(rectangle, 1); text1 = createTextField(text1, 2, 0, 0, 100, 20); text2 = createTextField(text2, 3, 0, 20, 100, 20); } private function onResize():Void { // do the resizing positionning stuff here... this._x = ... this._y = ... rect._width = ... rect._height = ... text1._width = ... [...] } } Just instanticiate it like this: var back:GreenRect = _root.attachMovie(GreenRect.symbolName, myRect, someDepth); back._x = ... back._y = ... Julien Alexander Farber a écrit : Hello! I'd like to draw a green rectangle underneath 2 TextFields. As my flash app. will have WIDTH=100% in the HTML-page, I'd like to handle the eventual resizing of it. For that I've registered an onResize-listener at the Stage (see the resize() function below). While resizing works ok for the both TextFields (called area_txt and field_txt), it fails for the green rectangle: the old rectangle doesn't get erased. Does anybody please have an advice for me? I don't see any Stage.clear() method in the help-docs... I've prepared a complete test case below, please copy-paste it and resize the movie window and you'll see the problem I have: createEmptyMovieClip('back_mc', getNextHighestDepth()); createTextField('area_txt', getNextHighestDepth(), 5, 5, 5, 5); with (area_txt) { border = true; multiline = true; textColor = 0xFF; } createTextField('field_txt', getNextHighestDepth(), 5, 5, 5, 5); with (field_txt) { border = true; type = 'input'; textColor = 0xFF; } resize(); Stage.scaleMode = 'noScale'; var resizeListener:Object = new Object(); resizeListener.onResize = resize; Stage.addListener(resizeListener); function resize() { trace(Stage size: + Stage.width + x + Stage.height); var text_width:Number = 3 * Stage.width / 4; var text_left:Number = 10; // draw a rectangle with a cut-off corner with (back_mc) { _alpha = 50; moveTo(text_left + 8, 30); lineStyle(0, 0xFF, 100); beginFill(0x008000, 100); lineTo(text_left + text_width, 30); lineTo(text_left + text_width, 290); lineTo(text_left, 290); lineTo(text_left, 30 + 8); endFill(); } with (area_txt) { _x = text_left; _y = 30; _width = text_width; _height = 240; } with (field_txt) { _x = text_left; _y = 270; _width = text_width; _height = 20; } } Also I wonder, if there is a way to encapsulate the rectangle drawing code insided the back_mc MovieClip? Then I'd just have to position it and to change its _width and _height and wouldn't need to touch its drawing guts (i.e. OOP-encapsulation). I've tried create a MovieClip symbol and to put this code into its 1st frame, but that didn't work (nothing was drawn): _alpha = 50; moveTo(8, 0); lineStyle(0, 0xFF, 100); beginFill(0x008000, 100); lineTo(_width, 0); lineTo(_width, _height); lineTo(0, _height); lineTo(0, 8); endFill(); Thank you Alex ___ 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] Is Object scope lost when using Delegate?
I'm afraid mike but you're wrong. The MovieClip.onRelease handler doesn't pass any parameter... From the help files : MovieClip.onRelease = function() {} What Jeff could do is using a Delegate alternative class that allows him to pass parameters to the handler, but he can also link his button movieclips to a class that would dispatch events: class MenuButton extends MovieClip { // EventDispatcher mix-in functions here public function MenuButton(){ EventDispatcher.initialize(this); } public function onRelease():Void { dispatchEvent({type:click, target:this}); } } class Menu extends MovieClip { private var btn1:MenuButton private var btn2:MenuButton public function Menu(){ btn1.addEventListener(click, Delegate.create(this, onMenuRelease); btn2.addEventListener(click, Delegate.create(this, onMenuRelease); } private function handleEvent(event:Object):Void { if (event.target == btn1) { // do some stuff... btn1.enabled = false; btn2.enabled = true; } if (event.target == btn2) { // do some stuff... btn2.enabled = false; btn1.enabled = true; } } } mike cann a écrit : ummm correct me if im wrong but onRelease you are passed an event object that contains the target of the event? so: funciton addChild( txt:String ):Void { // make new mc, with a text field and set the txt myNewMc.onRelease = Delegate( this, onMenuRelease ); { function onMenuRelease( event:Object):Void { event.target.myPropertyOfmyNewMc = somevalue; } I could be wrong however... Mike On 09/06/06, Jeff Jonez [EMAIL PROTECTED] wrote: This is exactly what I was looking for, cheers Mark and Morten! myNewMc.onRelease = Delegate( this, onMenuRelease, myNewMc ); Previously, I kept a reference to my class in mc variable, which wasn't so bad codewise... not sure if there are other side effects to doing that. Re: Matt can you not add your children in a loop? The children or menu items are added and removed dynamically by calling add/remove child ( and then I animate them on and off) from some other class that wants to use the menu ___ 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] Event dispatching, to use or not to use?
Hi Mike, You can easily achieve this with the EventDispatcher Delegate classes like this: import mx.events.EventDispatcher; class cMyMenu{ // let's declare static vars for menu states/options public static var OPTION1_EVENT:String = onOption1; public static var OPTION2_EVENT:String = onOption2; // mix-ins functions of EventDispatcher private function dispatchEvent:Function; private function removeEventListener:Function; public function addEventListener:Function; // menu buttons private var button1:MovieClip; private var button2:MovieClip; // constructor public function cMyMenu(){ // do the mix-in EventDispatcher.initialize(this); init(); } public function onLoad():Void { // let's wire buttons events with functions and proper scope button1.onRelease = Delegate.create(this, this.onButton1Click); button2.onRelease = Delegate.create(this, this.onButton2Click); } private function onButton1Click():Void { // do some menu graphic things like disabling button1, etc... button1.enabled = false; button2.enabled = true; dispatchEvent({type:OPTION1_EVENT, target:this}); } private function onButton2Click():Void { // do some menu graphic things.. button2.enabled = false; button1.enabled = true; dispatchEvent({type:OPTION2_EVENT, target:this}); } } import mx.utils.Delegate; class cMyGame { private var menu:cMyMenu; public function cMyMenu(){ // let's listen to menu events menu.addEventListener(cMyMenu.OPTION1_EVENT, this); menu.addEventListener(cMyMenu.OPTION2_EVENT, this); } // implements the default event handler called by EventDispatcher // but we could have create 2 functions named : // onOption1() for button1 menu event... // onOption2() for button2 menu event... private function handleEvent(event:Object):Void { var type:String = event.type; switch(type) { case cMyMenu.OPTION1_EVENT: // do some stuff here (disable or load a movie...) break; case cMyMenu.OPTION2_EVENT: // do some other stuff (play sound...) break; } } } For more options understandings : http://www.gskinner.com/blog/archives/23.html http://www.osflash.org/flashcoders/as2 http://www.person13.com/articles/proxy/Proxy.htm http://www.adobe.com/devnet/flash/articles/eventproxy.html http://www.actionscript.org/tutorials/beginner/the_delegate_class/index.shtml mike cann a écrit : Hi all, Im kinda new to the whole event dispatching and listening way of doing things that the v2 components have introduced me to and would like some advice on how to go about coding this situation: Suppose i have a game which is represented by a class cMyGame and within there i have have my main menu system called cMyMenu. Some code: class cMyGame { private var myMenu; function cMyGame() { myMenu = new cMyMenu(); } } class cMyMenu { function cMyMenu() { { } Okay now suppose that inside my menu class i have a load of button componants to represent the different menu options. When a user clicks one of the menu options i would like the game to then destroy the main menu (or atleast hide it) and then go to the option that the user clicked on. What i would like to know if how the menu system should tell the cMyGame what to do if the user clicked a button. As i see it there are a coupple of ways, i could pass a reference to the cMyGame into the constructor then just call it like so: class cMyMenu { private var myParent:cMyGame; function cMyMenu(parent:cMyGame) { myParent = parent; { function onMenuOption1Released() { myParent.doSomething(); } } Or the alternative is to use events and listeners so that the game can listen to events fired by the menu class. I know this seems like a very basic problem but it is at the core of my fundemental understanding of how you should scope your project. So if anyone could advise me on the best programming practice i should be using it would be greatly appreciated, thanks :) Mike ___ 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] callBack for Beginners ?
I would suggest to keep the loading of the parameter file simple and create a ParameterFilesLoader class that would handle a queue of urls to load in an array. The class would eventually dispatch state events that your main class would listen to, and show appropriate message to the user and handle the state of your app. Using mx.utils.Delegate and mx.events.EventDispatcher is a good practice ;) Ask me if you need some help building this stuff. jcanistrum a écrit : ok .. some of these solutions occurred to me, but are these solution the best OO design pratices ? Because depending on how deep this process goes it would be hard to detect or explict to some one else what your app does, I was expecting that would be possible, but I don´t know how to build some event like onAllXmlSucced or onInitializationSuccess that would be fired after all this XML reading using for example the Andre suggestion on having an array or queue of events, but how to build my own callBack function that would be fired after all the files were successfully read ??? PS: I´d like to use these approach inside an AS 2.0 class with MTASC static main style. João Carlos 2006/6/7, Nitin Gore [EMAIL PROTECTED]: Better way is you can use the recursion, If your XML files follows same tags. As below:- .. 1.. var myParameters:XML = new XML(); 2.. myParametersignoreWhite = true; 3.. myParameters.onLoad = function(success) 4.. { 5.. if ( success) 6..{ 7..// get the Paramenters from myParameters 8..// begin reading other XML files 9..// wait for them to succed myParameters.load(Other XML file); 10..// start app 11..} 12.. }; 13.. myParameters.load(parameters.xml); .. -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of eric dolecki Sent: Wednesday, June 07, 2006 4:54 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] callBack for Beginners ? you could daisy-chain function calls when xml documents get their onLoad( success:Boolean)... that would work pretty well. On 6/7/06, jcarlos [EMAIL PROTECTED] wrote: Hi All, I need help I trying to develop some small app that read a Parameters list from a XML file and then if succeded, read other XML files as specified by the Parameters file and only after these files were read and succeed the app would start, what is usually get with something like this .. 1.. var myParameters:XML = new XML(); 2.. myParametersignoreWhite = true; 3.. myParameters.onLoad = function(success) 4.. { 5.. if ( success) 6..{ 7..// get the Paramenters from myParameters 8..// begin reading other XML files 9..// wait for them to succed 10..// start app 11..} 12.. }; 13.. myParameters.load(parameters.xml); but I´m guessing how to do it in a clean way, because after some files it gets messy and hard to read and mantain, how could I make each XML loading dispatch some special event after it succed to the main app and only after all events of all files occurred it would start it ?? Should the main app be implemented as some kind of OBSERVER pattern where it stays listening to these events ? João Carlos Rio Brazil ___ 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
Re: [Flashcoders] MTASC to EXE ?
There are some programs that create .exe files from SWF such as : Zinc (www.multidmedia.com) Screenweaver (http://www.osflash.org/screenweaver) ... and many others that you can find by googleing around ;) jcarlos a écrit : What is the way, if there is one, for going from MTASC compiled SWF app and an .EXE ? Thanks, João Carlos ___ 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] Animation Engine
It seems to me that you looked at an old version of Moses's Fuse tweening engine. Its official homepage is now at http://mosessupposes.com/Fuse. The released version (1.0) offers you the option to use prototype or pure actionscript 2 tweenings (just imports and use the Fuse class, look at the http://www.mosessupposes.com/Fuse/normal.html for usage). The upcoming version will be 100% as2 and is almost ready... Julien Nick Weekes a écrit : Dear all, Im trying to use the native AS tween classes, but its becoming a real pain when I want to tween, say, _x + _y + _xscale + _yscale all at the same time for the same MC, and control the onMotionFinished events for each tween. So, Ive been looking into actionscript 2 animation/tweening engines (such as the http://laco.wz.cz/tween//Moses classes), but am looking for a pure Actionscript 2 class based engine. From what I can tell the Laco tween is protoype based, and not proper OOP (correct me if im wrong). It looks like moses is working on a really powerful animation engine (Fuse), but its not available yet. Any other options out there? Thanks, Nick ___ 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] TextField using s hared font is not showing character such ã ,á,ç...
Marcelo, Strange...I am using fonts in a shared library too and it can display accentuated characters without any problems... Are you sure that the font you're using initially contains those characters ? And have you correctly imported the shared font in your library and set your textfields' font to it ? I always export my fonts to __Fontname so they always appear at the top of my font list like this : __HelveticaNeue* __MyriadPro* ... Marcelo de Moraes Serpa a écrit : The used fonts are packaged into a shared library that is pre-loaded at the beginning of the application. The embedding works, I´ve testing rotating and changing dynamic textfields and they show the correct fonts. However, character such as á,é,ç,ã that I need to use don´t show! Why!? Thanks in advacne, ___ 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] FDT question.
Hi Aaron, It's probably because you need to add your source folder in FDT's classpath. Do a right-click on the root folder of your classes and select Source Folder - Add to classpath. Now all your features should work... Hope it helps, Julien aaron smith a écrit : I decided to start using FDT because of all the features. I recently worked with a guy who used it and was able to show me all the capabilities of it. I got eclipse and installed FDT. but some of the features don't seem to work. for example the task list. The parser error notifications dont work either. like it will tell you that your missing semicolons and what not.. http://www.actionscript.com/Article/tabid/54/ArticleID/Optimizing-Your-Workflow-with-Eclipse-and-FDT/Default.aspx that is an article I was reading to test the features out. but a lot of them don't work. These also don't work, Quick Type Hierarchy, Quick Outline, f5, f4, f3. And also the outline pane doesn't do anything when I have a class open. does anyone have any idea what is going on? shouldn't I just be able to install FDT and use all these features. By the way I installed the demo. I'm wondering if that is why it's not working.. I also noticed that when I try to do a quick type hierarchy ( ctrl + t) it says : 'could not perform operation' in the lower left in red. is that because it's a demo? I don't need anything that FAME uses right? except mtasc of course. thanks ___ 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] Event listeners and memory waste...
Hi guys, I am getting memory problems when I remove and recreate all my objects several times (the flash player eats up RAM, and I have to minimize it and maximize to force the garbage collector).There must be something wrong in the way I destroy my objects :-( So I am wondering what is the best way to handle event listeners and to be able to remove the listeners afterwards in order to avoid memory waste... I've seen on some page that using Delegate (or Lott's Proxy class) is a good practice, but how do you properly remove the listener when you're done with the object ? For example in class A (see below), how do you remove this from listening to every elements' myevent event in the destroy() method ? Thanks! Julien public classA extends MovieClip { public function addElement(data:Object):Void { var elt:CustomMC = attachMovie(Test, test+data.id, getNextHighestDepth()); elt.addEventListener(myevent, Delegate.create(this, this.onMyEvent)); elements[data.id] = elt; } public function destroy():Void { for(var i:String in elements){ var elt:CustomMC = elements[i]; // remove listener object... ??? elt.removeMovieClip(); elements[i] = null; } } private function onMyEvent(event:Object):Void { // handle the event... } } ___ 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] Using ARP without Forms?
Hi ARP developers, I was wondering if it was easy to use ARP in a non-form flash application... After reading ARP documentation, it seems to be well-suited for form-enabled flash apps, but what about the applications completely created from scratch with MTASC for example? What do you use in replacement of Forms? Custom components/movieclips? Can someone provide a short example or some guidelines? Thanks, Julien ___ 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] Using ARP without Forms?
Thanks Lee, I've found Grant's post about his ARPX extension and that seems pretty nice indeed ;-) I'm going to try it! By the way, my project is an intranet kiosk app that will only communicate via xml sockets instead of remoting or web services, do you think it will be easy to adapt this to ARP/X design ? Julien Lee McColl-Sylvester a écrit : A form in the ARP context is typically just a MovieClip extended class. If your application uses MovieClips as container objects, then ARP is fine as it is. If, however, you don't want to use MovieClips as your base object, you can still make use of things like System events and the like. At least, that's if they're in the base ARP package. I use the ARPX extended version written by Grant Davies. Top bloke! :-) Lee -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Vignali Sent: 18 April 2006 09:22 To: Flash Coders Subject: [Flashcoders] Using ARP without Forms? Hi ARP developers, I was wondering if it was easy to use ARP in a non-form flash application... After reading ARP documentation, it seems to be well-suited for form-enabled flash apps, but what about the applications completely created from scratch with MTASC for example? What do you use in replacement of Forms? Custom components/movieclips? Can someone provide a short example or some guidelines? Thanks, Julien ___ 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] Using ARP without Forms?
hey that's cool :-) I don't know much about .NET Fluorine because my company is more java-oriented. I am developping the flash client from scratch (well no MM components, but intensive use of several frameworks) with the flash IDE (just for fonts and assets such as basic objects/tweens), and eclipse/FDT + MTASC (-keep power!) For the socket communication, I use the Offbeat server (Oregano would have done the job as well) but just as a proxy between clients and the server, which is a custom j2ee webapp... I don't know about the number of lines I wrote, but as the project grows, I think it needs more structure and flexibility (especially when it comes to event management) so that's why I was looking to ARP... Regards, Julien Lee McColl-Sylvester a écrit : What a coinsidence. That happens to be my main app, using Flash and .NET. I was using XML transfers, though I quickly switched to Fluorine once I realised the possibilities. The Flash side of my application uses ARPX and is around 6000 lines of ActionScript now. I use FlashDevelop, so the actual asset side is very very minimal. I find ARPX provides me with a great solid framework that reflects well in the .NET side of my applications. What are you using for the XML Sockets? Did you develop your own system or are you using something like Oregano? Regards, Lee -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Vignali Sent: 18 April 2006 09:52 To: Flashcoders mailing list Subject: Re: [Flashcoders] Using ARP without Forms? Thanks Lee, I've found Grant's post about his ARPX extension and that seems pretty nice indeed ;-) I'm going to try it! By the way, my project is an intranet kiosk app that will only communicate via xml sockets instead of remoting or web services, do you think it will be easy to adapt this to ARP/X design ? Julien Lee McColl-Sylvester a écrit : A form in the ARP context is typically just a MovieClip extended class. If your application uses MovieClips as container objects, then ARP is fine as it is. If, however, you don't want to use MovieClips as your base object, you can still make use of things like System events and the like. At least, that's if they're in the base ARP package. I use the ARPX extended version written by Grant Davies. Top bloke! :-) Lee -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Vignali Sent: 18 April 2006 09:22 To: Flash Coders Subject: [Flashcoders] Using ARP without Forms? Hi ARP developers, I was wondering if it was easy to use ARP in a non-form flash application... After reading ARP documentation, it seems to be well-suited for form-enabled flash apps, but what about the applications completely created from scratch with MTASC for example? What do you use in replacement of Forms? Custom components/movieclips? Can someone provide a short example or some guidelines? Thanks, Julien ___ 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
Re: [Flashcoders] Using ARP without Forms?
Actually, my project was almost structured like an ARP project but I needed some guidelines because the project tends to grow in several directions at the same time :-) In other words, I need more discipline! LOL My flash clients display real time incoming data. AFAIK, flash remoting (I mean OpenAMF, not Flex Data Services) doesn't provide server push... The realtime data is in fact filtered parsed on my project server and relayed to the appropriate flash clients thanks to the socket server. I agree that there are probably other ways to design the application, but well, my chief had to choose for one. Regards, Julien Lee McColl-Sylvester a écrit : That's good. The issue I have with Flash (at least I used to) was knowing where all my coding was. Because of the way Flash is structured, many developers tend to stuff AS into MovieClips instead of keeping a series of root clips / classes. Using ARPX, I can create completely reusable custom controls, while feeding all core functionality back through to the base class using events. It really does make for much cleaner code and makes management of the application far simpler. I'm surprised, though, by your usage of an XML Socket server. Do you have a need for persistent data that session handling won't provide? You should look at OpenAMF for Java remoting. It's what many of the other remoting frameworks were developed against. Regards, Lee -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Vignali Sent: 18 April 2006 12:14 To: Flashcoders mailing list Subject: Re: [Flashcoders] Using ARP without Forms? hey that's cool :-) I don't know much about .NET Fluorine because my company is more java-oriented. I am developping the flash client from scratch (well no MM components, but intensive use of several frameworks) with the flash IDE (just for fonts and assets such as basic objects/tweens), and eclipse/FDT + MTASC (-keep power!) For the socket communication, I use the Offbeat server (Oregano would have done the job as well) but just as a proxy between clients and the server, which is a custom j2ee webapp... I don't know about the number of lines I wrote, but as the project grows, I think it needs more structure and flexibility (especially when it comes to event management) so that's why I was looking to ARP... Regards, Julien Lee McColl-Sylvester a écrit : What a coinsidence. That happens to be my main app, using Flash and .NET. I was using XML transfers, though I quickly switched to Fluorine once I realised the possibilities. The Flash side of my application uses ARPX and is around 6000 lines of ActionScript now. I use FlashDevelop, so the actual asset side is very very minimal. I find ARPX provides me with a great solid framework that reflects well in the .NET side of my applications. What are you using for the XML Sockets? Did you develop your own system or are you using something like Oregano? Regards, Lee -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Vignali Sent: 18 April 2006 09:52 To: Flashcoders mailing list Subject: Re: [Flashcoders] Using ARP without Forms? Thanks Lee, I've found Grant's post about his ARPX extension and that seems pretty nice indeed ;-) I'm going to try it! By the way, my project is an intranet kiosk app that will only communicate via xml sockets instead of remoting or web services, do you think it will be easy to adapt this to ARP/X design ? Julien Lee McColl-Sylvester a écrit : A form in the ARP context is typically just a MovieClip extended class. If your application uses MovieClips as container objects, then ARP is fine as it is. If, however, you don't want to use MovieClips as your base object, you can still make use of things like System events and the like. At least, that's if they're in the base ARP package. I use the ARPX extended version written by Grant Davies. Top bloke! :-) Lee -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Vignali Sent: 18 April 2006 09:22 To: Flash Coders Subject: [Flashcoders] Using ARP without Forms? Hi ARP developers, I was wondering if it was easy to use ARP in a non-form flash application... After reading ARP documentation, it seems to be well-suited for form-enabled flash apps, but what about the applications completely created from scratch with MTASC for example? What do you use in replacement of Forms? Custom components/movieclips? Can someone provide a short example or some guidelines? Thanks, Julien ___ 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] French Characters in dynamic textarea
Yes, solved the same issue by encoding/converting the XML file into UTF-8, but also by embedding also the Basic Latin and Latin I caracters in the textarea... Éric Thibault a écrit : Save your XML in utf-8 and embed the font inside your dynamic text field. A+ Wade Arnold wrote: I have a client that is trying to place french characters in a a dynamic text box. The text is drawn from XML. The textarea is rendering html text. Is this just a font issue? Has anyone had this issue before or with other languages that could point me in the right direction for a resolution. Thanks; Wade ___ 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] Multiuser A/V Chat ? Which Server?
You may try the open source Red 5 stream server : Red5 is a server that not only streams content to the Flash plugin, but it can push calls and information to the Flash client! It can also receive video/audio/data from a flash client and either save or rebroadcast that content. http://osflash.org/red5 Be careful, AFAIK it's still in alpha stage ... Yehia Shouman a écrit : Dear Coders, I have to create an Audio/Video Flash multiuser Chat, with text messaging. What are my options as for the server ? I don't want to use any of Macromedia's Servers. I would love to hear there is an open source dotNet server as well. Are there any ? Please advice me on which way to go ___ 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] Multiuser A/V Chat ? Which Server?
Hmm sorry, it's monday morning, I hadn't read yet your next coding-style posts ( serverName != red5)... so ignore my previous post ;-) Yehia Shouman a écrit : Dear Coders, I have to create an Audio/Video Flash multiuser Chat, with text messaging. What are my options as for the server ? I don't want to use any of Macromedia's Servers. I would love to hear there is an open source dotNet server as well. Are there any ? Please advice me on which way to go ___ 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] Object.watch overhead?
Hi list, I am playing around with the Object.watch() function in my custom UI components classes... I wanted to know if having 8-10 watches in a class would create some CPU overhead, or does it just work like an internal classic Delegate (which also requires an unwatch() upon object deletion)? Note that I don't watch get and set functions, just simple private members of the class... Thanks for the reply, Julien ___ 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 to liesten XML onLoad Event?
here is the infamous scope problem... I use Joey Lott proxy class (http://www.person13.com/articles/proxy/Proxy.htm) to solve that problem when it comes to create an xml parsing class : import ascb.util.Proxy; class MyParser{ private var xml:XML; function MyParser(url:String){ xml = new XML(); xml.ignoreWhite = true; xml.onLoad = Proxy.create(this, this.onXMLLoaded); xml.load(url); } private function onXMLLoaded(success:Boolean):Void { if (success){ var rootNode:XMLNode = xml.firstChild; trace(rootNode.toString()); // now you can do the parsing, call any method of your class here... } else { // ... } } } zikey Han a écrit : The problem is that : In doc.onLoad function assigment , I want to transfer function of showType witch is outside of onLoad assigment! But it can't work! It can't catch Varibles from outside of onLoad. doc.onLoad = function (ok) { trace(type_str+.. ); if (ok) { var str = this.firstChild.childNodes; len = str.length; while (len --) { album_arr.push ({path : str [len].firstChild.nodeValue, url : str [len].attributes.url, name : str [len].firstChild.name}); } showType(); } else { throw new Error (xml document is not found); } } } -- 亲爱的朋友,祝你天天快了! http://www.flashpixy.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]
2 things: - your for loop is erroneous... your dt variable isn't used as expected (increment it in the for statement) and your i variable is unused and shouldn't be here ;-). - you should prefix all your textfields with _root as they are created on _root level. Change your code as below, and you'll see plenty of textfields :) for (var dt:Number = 0; dt = 70; dt++) { dtd = var+dt; trace (dtd); trace (dt); _root.createTextField (dtd, dt, 50+dt, 50+dt, 200, 100); _root[dtd].text=dr; _root[dtd].border = true; _root[dtd].background = true; } CARABUS plus a écrit : Hello, I create dynamic textfield with functions and I try to field them without success, Have you got an idea ? Thank you var dt:Number = 0; var dtd; for (var dt:Number = 0; dt = 70; i++) { dtd = var+dt; trace (dtd); trace (dt); _root.createTextField (dtd, dt, 50+dt, 50+dt, 200, 100); dtd.text=dr; dtd.border = true; dtd.background = true; dt += 1; } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] interfaces and objects
Well, you can't instanciate an interface, you need first a concrete class that implements the interface... Your code should be: interface IWorldPart {} class SomeWorldPartSubclass implements IWorldPart {} var myPart:SomeWorldPartSubclass = new SomeWorldPartSubclass(); myCollection.addItem(myPart); j.c.wichman a écrit : Hi, i'm using a collection, which requires items of type Object to be added. I've declared an interface which gives me something like: - interface IWorldPart - a class implementing WorldPart now somewhere else i do: var myPart:IWorldPart = new SomeWorldPartSubclass(); myCollection.addItem (myPart); The last statement gives a type error, if i replace the first with var myPart:WorldPart = new ... all goes well. From what I can remember from Java (which I admit, seems ages ago ;)), this first should be no problem at all. Does anyone know why this is not allowed in Flash? thanks in advance. Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] interfaces and objects
Yup, sorry it was my mistake... (I read the message too fast) ;-) j.c.wichman a écrit : Hi, I know u can't instantiate an interface, which wasn’t what I was trying to do ;), I was declaring a variable to be of type SomeInterface (instantiating it with SomeConcreteClass), which apparently is not regarded by flash then of being of type Object as well. Got it figured out now ;) Thanks H -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Julien Vignali Sent: Wednesday, February 01, 2006 12:49 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] interfaces and objects Well, you can't instanciate an interface, you need first a concrete class that implements the interface... Your code should be: interface IWorldPart {} class SomeWorldPartSubclass implements IWorldPart {} var myPart:SomeWorldPartSubclass = new SomeWorldPartSubclass(); myCollection.addItem(myPart); j.c.wichman a écrit : Hi, i'm using a collection, which requires items of type Object to be added. I've declared an interface which gives me something like: - interface IWorldPart - a class implementing WorldPart now somewhere else i do: var myPart:IWorldPart = new SomeWorldPartSubclass(); myCollection.addItem (myPart); The last statement gives a type error, if i replace the first with var myPart:WorldPart = new ... all goes well. From what I can remember from Java (which I admit, seems ages ago ;)), this first should be no problem at all. Does anyone know why this is not allowed in Flash? thanks in advance. Hans ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Changing hue/saturation brightness of black clips... ?
Hello coders, I have some black movieclips in my components that I'd like to skin (i.e. adjust their hue/saturation brightness) with just one given color... Let's say I pass 0xFF to a method that will tint my clips to red but with some difference in brightness and saturation.. Something like : function setSkinColor(color:Number):Void { header_txt.textColor = color; // less saturation brighter var cmf1:Array = [ /* some magic numbers */ ]; // more saturation darker var cmf2:Array = [ /* some magic numbers */ ]; headerBackground_mc.filters = [new ColorMatrixFilter(cmf1)]; background_mc.filters = [new ColorMatrixFilter(cmf2)]; } Unfortunately, matrixes aren't my cup of tea so instead of playing around with each parameters, I wanted to know if someone had already done this or could give me some advices/examples. Thanks in advance :) Julien ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Q: Best tweening engine for Flash 8 filters
If you only need to tween filters, you can take a look at the Filter Managing Prototypes german project (http://www.flash-fmp.de). AFAIK, it's in the process of beeing integrated in Fuse by Moses. Julien [EMAIL PROTECTED] a écrit : Hi I was wondering what everyone is using to tween flash filters. The built in tween in Flash, or some third party tweening engine. Thanks in advance Jim Bachalo [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] How to use DispatchEvent in AS2.0 class
Look at Grant Skinner article on using EventDispatcher: http://www.gskinner.com/blog/archives/23.html Basically you can use EventDispatcher in three ways. Here are a simple example: // create an Action instance var action:Action = new Action(); // create the listeners var listener1:Listener1 = new Listener1(); var listener2:Listener2 = new Listener2(); var listener3:Listener3 = new Listener3(); // add listeners to the action action.addEventListener(done, listener1); action.addEventListener(done, listener2); action.addEventListener(done, listener3.onDoneEvent); // trigger events by calling the perform() method action.perform(); The trace should look like: Action.perform() called Listener3.onDoneEvent() : event 'actionDone' received Listener2.handleEvent(): event 'actionDone' received Listener2.actionDone(): event 'actionDone' received Listener1.actionDone() : event 'actionDone' received - import mx.events.EventDispatcher; class Action { public var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; private var classname:String; public function Action(){ // enable class A to dispatch events // and handle listeners EventDispatcher.initialize(this); classname = Action; } public function get name():String { return this.classname; } public function perform():Void { // do some stuff trace(Action.perform() called); // then dispatch the 'done' event to listeners dispatchEvent({target:this, type:actionDone}); } } - /* * Method 1: event is handle by a method whose name is * the same as the event name. */ class Listener1 { // Event handler for event of type 'done' public function actionDone(event:Object):Void { var type:String = String(.type); trace(Listener1.actionDone(): event '+type+' received); } } - /* * Method 2: use of the generic method handleEvent(), which is called by * default by the EventDispatcher. This method can be useful to catch * any received events. * Note that the doneAction() method is also called. */ class Listener2 { public function handleEvent(event:Object):Void { var type:String = String(event.type); trace(Listener2.handleEvent(): event '+type+' received); } public function actionDone(event:Object):Void { var type:String = String(event.type); trace(Listener2.actionDone(): event '+type+' received); } } - /* * Method 3: The event is handle by a custom method. */ class Listener3 { public function onDoneEvent(event:Object):Void { var type:String = String(event.type); trace(Listener3.onDoneEvent(): event '+type+' received); } } hidayath q a écrit : can anyone tell me.How to use DispatchEvent in AS2.0 class. Iike to to dispath an event from one class to another class which will have addEventListener to handle the event. Can anyone give a small example and explanation. Regards. S.Hidayath ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] /**** Fuse Question - WTF? ****/
Ryan, Your code works only if you drag-and-drop an instance of the Fuse Component on Stage. You'd better ask Moses about that behaviour... Regards, Julien. Ryan Potter a écrit : Is there a way to step back and forth through animations in Fuse? I created a simple animation (code below) to test this. I am new to Fuse. Problem: I am trying to make it so that I can click a button (the two lower clips) and launch an animation action in fuse. So far I can't get it to work properly. When the clip moves to the right, it automatically moves back. It shouldn't do that. It should move to the right by clicking the green square, and move back by clicking the blue one. It doesn't work. First, if you look at the trace statements, both of the x parameters are showing up as 110. The second x prop should be 10. Weird. The second problem is that I can't get the fuse action to stop after running 1 action. I am using version 1.0 of Fuse. Please help I'm stumped. /* Trow the code below into a movie and run it. */ stop(); import com.mosesSupposes.fuse.Fuse; init(); function init(){ drawFuse(); buildClips(); } /* draw three clips */ function buildClips(){ var clip1 = drawClip(this, clip, this.getNextHighestDepth(), 50, 50, 0xff); clip1._x = 10; clip1._y = 10; var clip2 = drawClip(this, clip, this.getNextHighestDepth(), 50, 50, 0x00ff00); clip2._x = 10; clip2._y = 70; clip2.onPress = function(){ this._parent.amimateItem(0);}; var clip3 = drawClip(this, clip, this.getNextHighestDepth(), 50, 50, 0xff); clip3._x = 10; clip3._y = 130; clip3.onPress = function(){ this._parent.amimateItem(1);}; var moveRight = {target:clip1, x:clip1._x+100, ease:easeInOutExpo, seconds:1, trigger:false}; var moveLeft = {target:clip1, x:clip1._x, ease:easeInOutExpo, seconds:1, trigger:false}; /* do a little tracing to see what props are getting set */ for(prop in moveRight){ trace(prop+ :: +moveRight[prop]); } trace(***); for(prop in moveLeft){ trace(prop+ :: +moveRight[prop]); } /* add the actions to fuse */ addAnimation(moveRight); addAnimation(moveLeft); } function drawFuse(){ f = new Fuse(); } function addAnimation(obj){ f.push(obj); } function amimateItem(id){ trace(animate item called); f.skipTo(id); // f.start(); } function drawClip(target, clip, depth, w, h, color){ var c = target.createEmptyMovieClip(clip+depth, depth); c.beginFill(color, 100); c.moveTo(0,0); c.lineTo(w,0); c.lineTo(w,h); c.lineTo(0,h); c.lineTo(0,0); c.endFill(); return c; } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Decompile swf to get your own classes
Franto, You may have a look also to KinesicFusion at www.kinesissoftware.com... It saves me several times ;-) Julien. franto a écrit : Thanks Campbell and John for your help sure, i've tried recovery software, today i will try another 2 softs, because 1st one, has predefined file types, and there is no .as, so it has recovered just few .as as TXT files, but my main classes are not recovered... i got ASV as well, and i will try it, Sothink decompiles classes to correct folder structure, hopefully ASV will does it in same way... I will try it now... I appreciate your help, guys Franto On 12/20/05, John Grden [EMAIL PROTECTED] wrote: Hey Franto, I'm not sure that ASV does it any better, but without a doubt, it's a MUCH stronger decompiler than Sothink (light years IMHO) www.buraks.com/asv/ It might not show you your classes any cleaner than SOThink, but it's worth a shot. I just looked at a couple of my SWF's and I could reconstruct the classes with out a problem from ASV's output. hth, John On 12/19/05, franto [EMAIL PROTECTED] wrote: HEEELP... today i lost my 1 year project, im totally dumb... i just move my project to my Eclipse worskpace directory, and then create Project with same name as folder i got all my work inside and guess what :( Eclipse, or FDT plugin, do not know which one, deleted all my files... 3GB of data, thousands of files :( I've recovered almost all now, but do not know why, my 15 classes, are not recovered :( just main 15 files from all of thousands files :( usre, i got backups, but older ones, and i think it will be no problem, but i'm in a hurry with project, you know, Xmas I've tried to decompile swf's with Sothink Decompiler, i got all my classes back, but in dirty way, awful variables names, and such stuff... Does anybody knows, if there is a way to get .as back in a way, they were before? And i got also .aso files for all my classes, so anoter question, is it possible to convert .aso files to origin .as files? Thank you all, please help me Sd Franto :( http://blog.franto.com http://www.flashcoders.sk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- John Grden - Blitz ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- - Franto http://blog.franto.com http://www.flashcoders.sk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Decompile swf to get your own classes
Yes it's a decompiler... Browse to your SWF file in the file explorer, and choose Decompile SWF in the right-click context menu. It should recreate your repository structure of .as files and a actionscript 1 dump in a xml-like .RVML file. Anyway, each time I tried to recover .as files with all the swf tools I could find, the result wasn't perfect and sometimes structure content wasn't exactly like the original and needed some manual editing tweaking, but still better than nothing ;-) Good luck! Julien franto a écrit : Julien, is it decompiler? or what? On 12/20/05, Julien Vignali [EMAIL PROTECTED] wrote: Franto, You may have a look also to KinesicFusion at www.kinesissoftware.com... It saves me several times ;-) Julien. franto a écrit : Thanks Campbell and John for your help sure, i've tried recovery software, today i will try another 2 softs, because 1st one, has predefined file types, and there is no .as, so it has recovered just few .as as TXT files, but my main classes are not recovered... i got ASV as well, and i will try it, Sothink decompiles classes to correct folder structure, hopefully ASV will does it in same way... I will try it now... I appreciate your help, guys Franto On 12/20/05, John Grden [EMAIL PROTECTED] wrote: Hey Franto, I'm not sure that ASV does it any better, but without a doubt, it's a MUCH stronger decompiler than Sothink (light years IMHO) www.buraks.com/asv/ It might not show you your classes any cleaner than SOThink, but it's worth a shot. I just looked at a couple of my SWF's and I could reconstruct the classes with out a problem from ASV's output. hth, John On 12/19/05, franto [EMAIL PROTECTED] wrote: HEEELP... today i lost my 1 year project, im totally dumb... i just move my project to my Eclipse worskpace directory, and then create Project with same name as folder i got all my work inside and guess what :( Eclipse, or FDT plugin, do not know which one, deleted all my files... 3GB of data, thousands of files :( I've recovered almost all now, but do not know why, my 15 classes, are not recovered :( just main 15 files from all of thousands files :( usre, i got backups, but older ones, and i think it will be no problem, but i'm in a hurry with project, you know, Xmas I've tried to decompile swf's with Sothink Decompiler, i got all my classes back, but in dirty way, awful variables names, and such stuff... Does anybody knows, if there is a way to get .as back in a way, they were before? And i got also .aso files for all my classes, so anoter question, is it possible to convert .aso files to origin .as files? Thank you all, please help me Sd Franto :( http://blog.franto.com http://www.flashcoders.sk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- John Grden - Blitz ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- - Franto http://blog.franto.com http://www.flashcoders.sk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- - Franto http://blog.franto.com http://www.flashcoders.sk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Swtich Statement issue!?
Dan, I'm also using the switch with static attributes from other class without any problems. I guess you have a type error problem. Check the trace of a strict equality test: trace(currItem.getMediaType() === VideoVO.SWF_STATE); If it returns true, then the switch should evaluate properly. If not, the switch will branch to the default case because the condition and the case aren't of the same type. Dan Thomas a écrit : I have a method that returns a number which I know to be of value 1 I have a static number variable in another class (SWF_STATE) which I also know to be 1. In an if() statement they evaluate to equal the same, however in the following switch statement it will not evaluate? trace(TYPE:+currItem.getMediaType()+ COMPARED TO: + VideoVO.SWF_STATE); // this traces TYPE:1 COMPARED TO:1 if(currItem.getMediaType() == VideoVO.SWF_STATE) { trace(wtf?!);//this evaluates and traces } switch(currItem.getMediaType()) // this switch always traces the error (default branch) { case VideoVO.FLV_STATE: this.currentPlayer = swfPlayer; break; case VideoVO.SWF_STATE: this.currentPlayer = swfPlayer; break; case VideoVO.MP3_STATE: this.currentPlayer = swfPlayer; break; case sometest==VideoVO.JPG_STATE: this.currentPlayer = swfPlayer; break; default: trace(ERROR: NO MEDIA TYPE!); } trace(sometest); // traces 1 trace(VideoVO.SWF_STATE); // traces 1 Any help on this very much appreciated! Dan This message and any attachments should only be read by those persons to whom it is addressed and be used by them for its intended purpose. It must not otherwise be reproduced, modified, distributed, published or actioned. If you have received this e-mail in error, please notify us immediately by telephone on 01202 237000 and delete it from your computer immediately. This e-mail address must not be passed to any third party or be used for any other purpose. Every reasonable precaution has been taken to ensure that this e-mail, including attachments, does not contain any viruses. However, no liability can be accepted for any damage sustained as a result of such viruses, and recipients are advised to carry out their own checks. Moov2 Ltd cannot accept liability for statements made which are clearly the senders own and not made on behalf of the Moov2 Ltd. An e-mail reply to this address may be subject to interception or monitoring for operational reasons or for lawful business purposes. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Function
It doesn't work because of the infamous scope problem. the this in the function refers to the erase_btn, and var2 is not an attribute of the button. You need to use the Delegate: import mx.utils.Delegate; erase_btn.onPress = Delegate.create(this, eraseTF); function eraseTF(){ var2.text = ; } Check http://www.osflash.org/flashcoders/as2 to see the different ways to handle events and for other implementations of the Delegate. CARABUS mobile+ a écrit : I done this action : There is a dynamic textfield (var2), a button (erase_btn) I want to erase a text, with the onPress action, it doesn¹t erase_btn.onPress = function() { this.var2.text = ; }; And it doesnt work, have U got an idea ? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Eclipse/FDT/Subclipse weirdness
Jim, The only files that you don't need to put in version controls are binaries that you can regenerate. You can safely put any other files including .project, .as2_classpath files. I've been doing this since last summer without any problems with SVN subclipse. Have you tried to clean the project with the Project - Clean menu option and/or closing/reopening the project and eclipse? I've had some weird compilation problems once in a while, but I could always recover by cleaning my projects or restarting eclipse (maybe a cache needs to be cleaned). Hope it helps. Julien Jim Kremens a écrit : I have all the latest versions... Here's a question - are there files that I should not put in version control? Like Eclipse's .project file and FDT's .as2_classpath? I've done it both ways and still had the same problems, so I don't think that's the solution. Just curious... Jim Kremens On 11/14/05, Tomas Lehuta [EMAIL PROTECTED] wrote: Jim, I'm using Subclipse in both Eclipse/FDT and Flex Builder 2 and everything goes ok. Which version of Eclipse/FDT/Subclipse do you have? I'm running the latest versions: Eclipse SDK 3.1.0 FDT 1.0.4 Subclipse 0.9.37 Tomas Lehuta [http://lharp.net] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Kremens Sent: Monday, November 14, 2005 4:54 PM To: [EMAIL PROTECTED] Figleaf. Com Subject: [Flashcoders] Eclipse/FDT/Subclipse weirdness This might be slightly OT, as it doesn't directly deal with code. But it does concern tools of the trade, so here goes... I'm using Eclipse, FDT and Subclipse. Occasionally, a project just 'goes bad.' It seems like something is getting corrupted, and I don't know what it is. Here are the symptoms: Use project for a while - all is fine. Click refresh. Get 'An error occurred during Refresh' message with *no additional information*. (yay error handling!) From this point on, the project is completely shot - you can't do much if you can't refresh... Checking it out again from the repository doesn't work. The only way I can fix the project is to: 1. Detach it and all of its linked libraries from SVN control (and delete SVN information from the system). 2. Delete the project and the libraries it links to from the Eclipse workspace (without deleting all of the files from the system). 3. Re-import the project and various linked libraries, thereby rebuilding the project. Of course, I then lose all of my SVN history. Needless to say, this is really a bummer Anyone experienced anything like this? The key would be the meaningless 'An error occurred during refresh' message. Thanks, Jim Kremens ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders