Re: [Flashcoders] Creating a button class entirely in 2.0 with no symbol association, possible?
No thats no a problem, you can do like this: public function set _x(value:Number):Void { mc._x = value; } 2005/11/24, Boon Chew [EMAIL PROTECTED]: Thanks Janis. The problem with doing it below is that you cannot change _x, _y directly on the mc like you can with a regular movieclip. var b = new myButton(); b._x = 200; -- won't work Janis Radins [EMAIL PROTECTED] wrote: I'm doing this all the time I've made tonns of different inputs fro diferent projects and finally I am planing to code some fullscale AS2 only UI collection. Thats done like this: class myButton { private var mc:MovieClip; function myButton(host:MovieClip, level:Number){ mc= host.createEmptyMovieClip(myButton+level, level); } } In this case all drawing is done by variable mc. 2005/11/23, Ian Thomas : Oops, last line should be: var button:MyButton=MyButton(myTimeline.attachMovie(MyButton.symbolName, somRandomButton, myTimeline.getNextHighestDepth())); Assuming myTimeline is whatever you're trying to attach the button to... Ian On 11/23/05, Ian Thomas wrote: Hi Boon, Can't remember where I got this solution - definitely not mine - but here's how to create a MovieClip-derived class that doesn't need an associated library symbol: -- class net.something.MyButton extends MovieClip { static var symbolName:String = __Packages.net.something.MyButton ; static var symbolOwner:Function = MyButton; public function MyButton() { } static var symbolLinked=Object.registerClass(symbolName, symbolOwner); } -- To create it, use attachMovie: import net.something.MyButton; var button:MyButton=MyButton(myTimeline.attachMovie(MyButton.symbolName, somRandomButton,getNextHighestDepth())); HTH, Ian ___ 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 - Yahoo! Music Unlimited - Access over 1 million songs. Try it free. ___ 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] Creating a button class entirely in 2.0 with no symbol association, possible?
On 11/24/05, Boon Chew [EMAIL PROTECTED] wrote: Thanks Janis. The problem with doing it below is that you cannot change _x, _y directly on the mc like you can with a regular movieclip. var b = new myButton(); b._x = 200; -- won't work Boon, You're quite correct - however the solution I posted will work. It lets you use the class in all cases like a normal MovieClip object. HTH, Ian ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] _x and _y repositioning for child, child, child mc (Flash MX 6.0)
Hello, I have a very complex form with many mc\childMc1\childMc2\childMc3\childMc4\childMc5... Type clips within it. I often have a need to line up the _x and _y of a deeply nested childMC with one of the other earlier childMC's For instance if the mc8 is the last child _level0.mc1.mc2.mc3.mc4.mc5.mc6.mc7.mc8 And I need it to be repositioned at say mc4's x,y position what is the best technique. The linked .FLA file makes it obvious if you wish to download it: www.flashbomb.com/files/localToGlobal_test.fla In that example, I want to press the button and have the clips line up at the top. I have spent all day today trying to come up with a quick solution using localToLocal and a variety of other relative positioning techniques and functions but have failed. It's 1:32AM on Thanksgiving Eve! In case of emergency, call the flashcoders group! What sayeth the group? Jay FlashBOMB.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] _x and _y repositioning for child, child, child mc (Flash MX 6.0)
I have a very complex form with many mc\childMc1\childMc2\childMc3\childMc4\childMc5... Type clips within it. I often have a need to line up the _x and _y of a deeply nested childMC with one of the other earlier childMC's For instance if the mc8 is the last child _level0.mc1.mc2.mc3.mc4.mc5.mc6.mc7.mc8 And I need it to be repositioned at say mc4's x,y position what is the best technique. Without trying it, I'd say: find localToGlobal(mc4's pos). Then find GlobalToLocal(this value) in mc7's reference frame, and move mc8 to it. Best Danny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re[2]: [Flashcoders] _x and _y repositioning for child, child, child mc (Flash MX 6.0)
senocular rules :) http://proto.layer51.com/d.aspx?f=630 Thursday, November 24, 2005, 11:53:54 AM, you wrote: I have a very complex form with many mc\childMc1\childMc2\childMc3\childMc4\childMc5... Type clips within it. I often have a need to line up the _x and _y of a deeply nested childMC with one of the other earlier childMC's For instance if the mc8 is the last child _level0.mc1.mc2.mc3.mc4.mc5.mc6.mc7.mc8 And I need it to be repositioned at say mc4's x,y position what is the best technique. DK Without trying it, I'd say: find localToGlobal(mc4's pos). Then find DK GlobalToLocal(this value) in mc7's reference frame, and move mc8 to it. DK Best DK Danny DK ___ DK Flashcoders mailing list DK Flashcoders@chattyfig.figleaf.com DK http://chattyfig.figleaf.com/mailman/listinfo/flashcoders www.iashido.com www.itseveryday.ro ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Distort bitmap in flash 8?
try search google distortImage flash some french made DistordImage class... it can be done byt Matrix math... also DisplacementMapFilter as well if you will not find anything, i can send you my soruces for this, I have made this already (going on lunch now :) maybe try www.senocular.com there as flash 8 examples and i think there is distortion with source :) I hope it helps Franto ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Distort bitmap in flash 8?
Brilliant! That's what I'm after. Thanks Franto. Here's the link for any others that are interested: http://dev.media-box.net/sandy/index.php/2005/11/01/7-distordimage-the-way-to-distord-bitmaps-by-code franto wrote: try search google distortImage flash some french made DistordImage class... it can be done byt Matrix math... also DisplacementMapFilter as well if you will not find anything, i can send you my soruces for this, I have made this already (going on lunch now :) maybe try www.senocular.com there as flash 8 examples and i think there is distortion with source :) I hope it helps Franto ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- *Mark Burvill* Interactive designer www.eyegas.com http://www.eyegas.com *Work:* 0117 953 0100 *Mobile*: 07780 608498 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Attaching combobox inside of class
On 23 Nov 2005, at 22:11, Dan Wade wrote: It seems like the component is currupted in what way? If you are seeing the first item only, and it doesn't drop down, I'd suggest the problem may be that you are attempting to set the dataprovider before the combobox has initialised. (A 'setinterval' method of waiting for initialisation to complete is described in Chpt13 of Essential ActionScript 2.0 : Colin Moock) another pointer... http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2003-April/ 070222.html Having said that, I would have thought both your samples would fail. Paul -- [ http://www.creative-cognition.co.uk/ ] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Distort bitmap in flash 8?
yes, this is the link I wanted to give you :) You're welcome. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Spinning wheel
Here's a google link you might find some useful info at: http://int.cysd.k12.pa.us/mummert/wof/wof.swf http://int.cysd.k12.pa.us/mummert/wof/wof.fla - Original Message - From: quinrou . [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, November 24, 2005 5:01 AM Subject: Re: [Flashcoders] Spinning wheel u could even use the motion tween prototypes (http://laco.wz.cz/tween/) or fuse (http://www.mosessupposes.com/Fuse/) to get the rotation motion and use one of the robert pernner easing equation in order to ease out the rotation of the wheel. mind u motion tween will bump up ur file size by 6k straight away and fuse will bump it up by ~14k. check out those 2 packages they are pretty handy. good luck On 11/24/05, Eric E. Dolecki [EMAIL PROTECTED] wrote: Don't think I need Flade to pull this off. Although its nice. What I whipped up so far: import Timer; function randomize( min:Number, max:Number ):Number { var generator = Math.random()*(max-min); generator = Math.round(min+generator); return generator; } function spin():Void { // Spinning time between 10 and 20 seconds var nTime = randomize( 1, 2 ); var newTimer = new Timer(); var friction = nTime/200; wheel.onEnterFrame = function(){ this._rotation += friction; friction -= friction/30; if (!newTimer.end){ newTimer.wait( nTime ); } else { //trace( nTime/1000 + secs passed!); trace(this._rotation); delete this.onEnterFrame; } } } spin(); Now, the divisions are merely magic numbers - they seem to work fairly well... but I don't think this is the right way to do it. Also, if I pick random points on the circle surface, how do I know which is closest to the top (say the little pointer as centered top above the wheel)? edolecki On Nov 23, 2005, at 8:01 PM, Alias wrote: Check out Flade: http://www.cove.org/flade/default.aspx HTH Alias On 11/23/05, Eric E. Dolecki [EMAIL PROTECTED] wrote: before i code one up myself - does anyone have the basic math for a wheel of fortune type of spinning wheel? if it had a flapper that would be a bonus. otherwise i can just randomize the total time of spin, and let er rip, slowing the rotation down over time. random number of possible hits on the wheel. edolecki ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] EVENT DISPATCHER BUG IN FLASH 8 - MACROMEDIA SHOULD FIX THIS
I thought I better post this incase someone else is having similar issues, awhile ago I made a post that flash 8 was crashing on FLV events in Flash 8. Finally I tracked it down, its not the media crashing it, its event dispatcher, I'm listening for the same event in my super class, like this... Im just putting the methods in here... addEventListener(onVideoComplete, this); public function onVideoComplete (e:Object) :Void { } pretty standard stuff, but then Im also doing this... private function addVideoHandler (label:String, method:Function) :Function { var handler:Function = Delegate.create(this, method); eventHandlers[label] = handler; addEventListener(onVideoComplete, handler); return handler; } private function removeVideoHandler (label:String) :Boolean { if (eventHandlers[label] == undefined) { return false; } else { var handler:Function = eventHandlers[label]; delete eventHandlers[label]; removeEventListener(onVideoComplete, handler); return true; } } this is done so I can just add and remove handlers, actually later I found an even better way of doing this, but i wont go into that now. these methods get called from the child class, it seems in flash 8, because its a lot faster these can both be called concurrently, causing intermittent crashing. I'd just like to thank macromedia for the hell ive been through, and for absolutly no technical support. You should really look into asynchronous locking. goodnight :) MaTT ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] flow chart layout issue
Ok, i'm tired and my head hurts, and this problem is making me itch horribly. I have a bit of xml in this format: node text plainText=First topic/ node text plainText=Subtopic/ node node text plainText=Subtopic/ node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node node text plainText=Subtopic/ node node text plainText=Subtopic/ node /node In short, there's one topic at the bottom of the tree, which branches out into 4 sub-topics. Then one of those subtopics has 4 subtopics under that again, and any one of those subtopics could branch further. The problem here is that the vertical scale of the visual representation of one of these topics grows with every addition to any tree under them. So for instance the second subtopic, which has 4 more topics nested, would push the first, third and fourth subtopic up and down by about half the height of its own tree. For an illustration, check out http://andreas.rayon.no/temp/tree.jpg Now how the hell do i get the scale of a tree like that. The first topic could be 20 px high, but has 2 topics nested, making it 40 px tall (since they spread vertically and horizontally). Then one of those topics again could have 3 topics nested, and one of those could have one nested, and then that could have 8 nested again. How do i go through the tree to get the height and align like that? I've never had to work with xml with this depth before and it's really tearing at my head. Anyone done anything like this before? - Andreas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] local swf access to network
As far as I know, you should be able to read data from network, if y ou run it locally. But this I've never tried. I have opposite problem. Load local file from network. Best luck Franto ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] flow chart layout issue
hi Andreas, recursion is your friend. this isn't tested, so let me know if there are any problems: var countSubNodes = function ( node:XMLNode ):Number { var children:Array = node.childNodes; var numSubNodes:Number = 0; for( var i:String in children ) { if( children[ i ].nodeName == node ) { // recursion: call the same function on each childnode, add their children // to the number of subchildren of the current one before returning numSubNodes += arguments.callee( children[ i ] ); } } node.attributes[ numSubNodes ] = numSubNodes; node.attributes[ isLeafNode ] = numSubNodes ? false : true; return numSubNodes; } just pass it the root node, after that they all should have an attribute with the total number of sub nodes. hth, mark On 11/24/05, Andreas Rønning [EMAIL PROTECTED] wrote: Ok, i'm tired and my head hurts, and this problem is making me itch horribly. I have a bit of xml in this format: node text plainText=First topic/ node text plainText=Subtopic/ node node text plainText=Subtopic/ node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node node text plainText=Subtopic/ node node text plainText=Subtopic/ node /node In short, there's one topic at the bottom of the tree, which branches out into 4 sub-topics. Then one of those subtopics has 4 subtopics under that again, and any one of those subtopics could branch further. The problem here is that the vertical scale of the visual representation of one of these topics grows with every addition to any tree under them. So for instance the second subtopic, which has 4 more topics nested, would push the first, third and fourth subtopic up and down by about half the height of its own tree. For an illustration, check out http://andreas.rayon.no/temp/tree.jpg Now how the hell do i get the scale of a tree like that. The first topic could be 20 px high, but has 2 topics nested, making it 40 px tall (since they spread vertically and horizontally). Then one of those topics again could have 3 topics nested, and one of those could have one nested, and then that could have 8 nested again. How do i go through the tree to get the height and align like that? I've never had to work with xml with this depth before and it's really tearing at my head. Anyone done anything like this before? - Andreas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://snafoo.org/ jabber: [EMAIL PROTECTED] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] local swf access to network
Brilliant it works, thanks so very much James At 12:51 24/11/2005, you wrote: You shouldn't have a problem if you're setting the SWF as network-only. The key, as you've pointed out is the crossdomain.xml file. Here's the file you would need: ?xml version=1.0? !DOCTYPE cross-domain-policy SYSTEM http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd; cross-domain-policy allow-access-from domain=* / /cross-domain-policy You have to allow for * domain (all domains). Based on MM docs. Derek Vadneau -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Sent: Thursday, November 24, 2005 7:32 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] local swf access to network Hi /*(I've had a brief look through the list archive and can't find anything on this, but am really pushed for time, so many apologies if I missed it..also apologies for the stupidity of this idea, it wasn't mine)*/ I am trying to create a .swf file which will be emailed as an attachment. Thus. it will be run *locally* on the end users machine. and the swf must access some online data about oil prices, which will be on *my webserver*. so, it works unless in flash player 8. 1. What I have already done: set the Local Playback Security to Network Only (in publish settings) 2. What I can't figure out: if I have to write a cross-domain-policy file, and how can I permit from any potential user. I'm hoping someone has done this if not I am going to tell the client it can't be done in 2 days!!! Thanks in advance, and Thanks even if you don't know but read this far.. James ___ 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] Better flash to Learn
Am a flex developer..started back using 1.0 when it first came out beautiful framework verywell done. But alot of things are abstracted.. i don't really have an idea of the lower workings of Flash.. So i took it upon myself to start learning flash... Which should i learn flash 8 or Flash mx2004 Professional Regards -- Kenlie Browne Software Developer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] localtoglobal/globaltolocal and getBounds
Hi Coders. As you see in the subject.. that is what I want to learn more about. I have been in the help and read about it, but it is still very confusing how they work. Are there any great pages that you have spotted somewhere, online, in which really can describe them and how they can be used and so on? I have googled, but these are not so oftenly used, though they really should be handy sometimes. Thanks. / martin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] flow chart layout issue
hi again, thinking about it some more, it wouldn't work that way. first of all, i forgot to increment numSubNodes in the loop (so it always will be 0). but that's not really the problem, because it's the number of leaf nodes (nodes without children) that interests you. you could get that information if you modify return numSubNodes; to return Math.max( numSubNodes, 1 ); then change everything numSubNodes to numSubLeafNodes, to get the naming corrected. if you base your layout on that, every leaf node is at a distinct row. this isn't the most space efficient layout possible, but it's a start, about like the example image you posted. being more efficient would make it pretty complicated, but maybe somebody here has some ideas. mark On 11/24/05, Mark Winterhalder [EMAIL PROTECTED] wrote: hi Andreas, recursion is your friend. this isn't tested, so let me know if there are any problems: var countSubNodes = function ( node:XMLNode ):Number { var children:Array = node.childNodes; var numSubNodes:Number = 0; for( var i:String in children ) { if( children[ i ].nodeName == node ) { // recursion: call the same function on each childnode, add their children // to the number of subchildren of the current one before returning numSubNodes += arguments.callee( children[ i ] ); } } node.attributes[ numSubNodes ] = numSubNodes; node.attributes[ isLeafNode ] = numSubNodes ? false : true; return numSubNodes; } just pass it the root node, after that they all should have an attribute with the total number of sub nodes. hth, mark On 11/24/05, Andreas Rønning [EMAIL PROTECTED] wrote: Ok, i'm tired and my head hurts, and this problem is making me itch horribly. I have a bit of xml in this format: node text plainText=First topic/ node text plainText=Subtopic/ node node text plainText=Subtopic/ node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node text plainText=SubSubtopic/ /node node node text plainText=Subtopic/ node node text plainText=Subtopic/ node /node In short, there's one topic at the bottom of the tree, which branches out into 4 sub-topics. Then one of those subtopics has 4 subtopics under that again, and any one of those subtopics could branch further. The problem here is that the vertical scale of the visual representation of one of these topics grows with every addition to any tree under them. So for instance the second subtopic, which has 4 more topics nested, would push the first, third and fourth subtopic up and down by about half the height of its own tree. For an illustration, check out http://andreas.rayon.no/temp/tree.jpg Now how the hell do i get the scale of a tree like that. The first topic could be 20 px high, but has 2 topics nested, making it 40 px tall (since they spread vertically and horizontally). Then one of those topics again could have 3 topics nested, and one of those could have one nested, and then that could have 8 nested again. How do i go through the tree to get the height and align like that? I've never had to work with xml with this depth before and it's really tearing at my head. Anyone done anything like this before? - Andreas ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://snafoo.org/ jabber: [EMAIL PROTECTED] -- http://snafoo.org/ jabber: [EMAIL PROTECTED] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] _x and _y repositioning for child, child, child mc (Flash MX 6.0)
I usually use something like this: function getY(mc:MovieClip):Number { var y:Number = mc._y; if (mc._parent != undefined) y += this.getY(mc._parent); return y; } but of course that takes it all the way back to _root. shouldn't be too hard to check against another movie clip instead of undefined. andreas Jay Lepore wrote: Hello, I have a very complex form with many mc\childMc1\childMc2\childMc3\childMc4\childMc5... Type clips within it. I often have a need to line up the _x and _y of a deeply nested childMC with one of the other earlier childMC's For instance if the mc8 is the last child _level0.mc1.mc2.mc3.mc4.mc5.mc6.mc7.mc8 And I need it to be repositioned at say mc4's x,y position what is the best technique. The linked .FLA file makes it obvious if you wish to download it: www.flashbomb.com/files/localToGlobal_test.fla In that example, I want to press the button and have the clips line up at the top. I have spent all day today trying to come up with a quick solution using localToLocal and a variety of other relative positioning techniques and functions but have failed. It's 1:32AM on Thanksgiving Eve! In case of emergency, call the flashcoders group! What sayeth the group? Jay FlashBOMB.com ___ 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] Flash jobs in london
Atticmedia requires a good Actionscript 2 developer for cutting edge work on new BBC projects. Atticmedia is one of the leading new media suppliers to the BBC and has a number of large, high profile interactive BBC projects in progress. You will be working on cutting edge multimedia alongside some of the best programmers and designers in the industry. Your portfolio will never look the same again! And you'll be working in a friendly, exciting, team-centred and challenging environment. We like to think we're one of the best agencies to work for and this is borne out by the fact employees hang around or come back after leaving. We are looking for someone who has a minimum of 3 years Actionscripting experience and can hit the ground running. The successful candidate will be solid in the following areas: - In-depth knowledge of Actionscript 2 - Object oriented code (OOP) - Server interaction via XML - Game programming If you think this sounds an exciting opportunity then contact [EMAIL PROTECTED] (with FLASHCODERS in the subject line) with examples of your work and a full CV. Applications will not be considered without examples of your work. Contract status: Permanent or contract position. Location: London - near Angel tube station. Must work on site. Salary: Generous and negotiable depending on experience. No agencies should respond. Atticmedia is an Equal Opportunity Employer. Please reply to [EMAIL PROTECTED] (with FLASHCODERS in the subject line). ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Swfs embedded in an email
A friend of mine is trying to send a Flash christmas card in an email and is finding that everyone's Outlook is blocking it for security reasons. I know this is generally considered a no-no anyway, but his company want to do it and it's for internal emails anyway, so can anyone recommend a reliable way to embed a swf in a mail? If it needs to be included as an attachment, that's fine, but reading it off the server would be better, obviously. Best Danny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Swfs embedded in an email
Bad idea whichever way you look at it. Flash on PC = ActiveX = disabled by default, and there aint nuthin you can do about it. Standard practice is to put a link in the email pointing to the swf. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Danny Kodicek Sent: 24 November 2005 15:17 To: Flashcoders mailing list Subject: [Flashcoders] Swfs embedded in an email A friend of mine is trying to send a Flash christmas card in an email and is finding that everyone's Outlook is blocking it for security reasons. I know this is generally considered a no-no anyway, but his company want to do it and it's for internal emails anyway, so can anyone recommend a reliable way to embed a swf in a mail? If it needs to be included as an attachment, that's fine, but reading it off the server would be better, obviously. Best Danny ___ 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] Swfs embedded in an email
The most reliable way to have the recipient actually view the Christmas card (only if he/she wants to) is to have a link to it. I had to do it like so last Christmas, and I believe most companies that use flash for their email greeting cards do it this way. Daniel On 11/24/05, Danny Kodicek [EMAIL PROTECTED] wrote: A friend of mine is trying to send a Flash christmas card in an email and is finding that everyone's Outlook is blocking it for security reasons. I know this is generally considered a no-no anyway, but his company want to do it and it's for internal emails anyway, so can anyone recommend a reliable way to embed a swf in a mail? If it needs to be included as an attachment, that's fine, but reading it off the server would be better, obviously. Best Danny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Swfs embedded in an email
Bad idea whichever way you look at it. Flash on PC = ActiveX = disabled by default, and there aint nuthin you can do about it. Thought so, but I had to ask. Standard practice is to put a link in the email pointing to the swf. Except that in my experience, no one ever clicks on them. Hey ho, thanks anyway. Best Danny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Swfs embedded in an email
include a gif in the e-mail. design it right and perhaps you can get a few more clicks than from a regular text link. andreas Danny Kodicek wrote: Bad idea whichever way you look at it. Flash on PC = ActiveX = disabled by default, and there aint nuthin you can do about it. Thought so, but I had to ask. Standard practice is to put a link in the email pointing to the swf. Except that in my experience, no one ever clicks on them. Hey ho, thanks anyway. Best Danny ___ 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] Swfs embedded in an email
Same as folks... Put a link. But if you're friends can abolutly not do that, try to embed the swf publish in flash 5 format. Cunning. I'll suggest it to him, thanks. Danny ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] emoticons in a chat component
On 11/22/05, Karina Steffens [EMAIL PROTECTED] wrote: 1. Unembedded, it looks nice and crispy, but embedded there's a fuzziness to it, even with anti-aliasing switched off (in fact that looks even worse). Verdana didn't produce any better results. Should I use a different font, perhaps? I know that up until MX 2004, pixel fonts have to be perfectly aligned with the pixel grid not to anti-alias. This means that your textfield should be positioned on an integer pixel position, as seen from _root (ie x300 y400 and not x299.5 y400.2). When your textfield is buried deep inside other symbols, trying to get this figured out can be tricky, the solution that works best for me is to dynamically create all text fields that need exact positioning. In Flash 8, this problem no longer exists, thankfully. -- Toon Van de Putte ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Swfs embedded in an email
Cunning. I'll suggest it to him, thanks. Not sure its work... You know it some kind of Somebody say to me that somebody say to him that it try that -- Flapflap[at]sans-facon.net -- DevBlog : http://www.kilooctet.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Swfs embedded in an email
On 11/24/05, Danny Kodicek [EMAIL PROTECTED] wrote: Standard practice is to put a link in the email pointing to the swf. Except that in my experience, no one ever clicks on them. Hey ho, thanks anyway. That depends entirely on the rest of the copy of the e-mail. If you can incorporate a personalised message into the swf file and hint at that in your text mail, you'll get a lot more clickthroughs. The more personal and 'unspanny' it looks and feels, the more clicks you'll get -- Toon Van de Putte ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Flvs fail to stream on an older pc
Hi List, I'm on the last stages of development of an educational CD-Rom in FlashMX 2004. The application uses a v2 media component loads flvs from the CD-Rom. It's been developed on a pc (XP) and then zipped over and burned on the Mac (OSX) and set to the client. The client has an old mac and an even older PC (which still uses windows 98...). The CD-Rom loads on both, but the flvs seem to work on her mac but not on the pc (except for one or two). She also says that an earlier version of the CD-Rom that I sent her does work, which is puzzling. Also, there is a little test utility just for the Flvs on the CD-Rom, and that also works. My application loads various swfs into a base swf file, and the flvs are loaded to that, so it could be a memory thing. I can't run any of the tests myself, because I'm based in Dublin and she is in London, so I don't know what to do. I tried to tell her that her PC is just too old for the software, and I still haven't got any data from her about how much memory it has. She's not very technical. Does anyone have any ideas, solutions or minimum specs for this problem? Thanks, Karina Karina Steffens | Neo-Archaic creative technical new media design http://www.neo-archaic.net/ www.neo-archaic.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] AS 3.0 - stage.focus and keyboard event scopes
What's the 'right' way to handle keyboard input in AS 3? I can see how one class at a time can handle keyboard events as long as stage.focus is set to it, but what happens when that object loses focus? Is there a way to ensure all keyboard events are going to make it to an object? An Object that isn't descended from Sprite and clan? (I'm putting together a keymapping utility for a few games -- all input, mouse and keyboard, needs to filter through it, where it figures out what command was meant. Then it calls the appropriate factory method to build the command blah blah blah.) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Cutting an image up into tiles using masks
duplicateMovie will not duplicate any loaded images or stuffd drawn throuh the api. basically you'd have to load the image lots of times as well. At 04:58 PM 11/24/2005, Paul Steven wrote: I am trying to make a Slider Puzzle (game whereby an image is cut up into tiles and one tile is removed then the tiles are rearranged and the aim is to rearrange the pieces of the picture) Anyway I was trying to do this using purely code and nothing in the library. So what I have done is create several empty movie clips i.e the tile, the mask and a movie clip to load the image in I then wanted to duplicate this tile but it does not seem to work. Here is what I have tried Tile_Size = 55; How_Many_Tiles_Across = 4; How_Many_Tiles_Down = 4; createEmptyMovieClip(tile_mc, 10); tile_mc.moveTo(0,0); tile_mc.beginFill(0xFF); tile_mc.lineTo(Tile_Size,0); tile_mc.lineTo(Tile_Size,Tile_Size); tile_mc.lineTo(0,Tile_Size); tile_mc.lineTo(0,0); tile_mc.endFill(); tile_mc.createEmptyMovieClip(loader_mc, 2); createEmptyMovieClip(mask_mc, 3); mask_mc.moveTo(0,0); mask_mc.beginFill(0x00); mask_mc.lineTo(Tile_Size,0); mask_mc.lineTo(Tile_Size,Tile_Size); mask_mc.lineTo(0,Tile_Size); mask_mc.lineTo(0,0); mask_mc.endFill(); tile_mc.setMask(mask_mc); loadMovie(sugababes_1.jpg, tile_mc.loader_mc); tile_mc.duplicateMovieClip(tile1_mc,11); tile1_mc._x = Tile_Size; tile1_mc._y = 0; The second tile appears but it does not appear to show the image. Any help would be much appreciated. I will obviously run through a loop to do all 16 tiles once I have worked this mask malarkey out. Thanks in advance Paul btw this needs to be published flash 7 as2 max so can't use Flash 8 features. ___ 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] emoticons in a chat component
Hi Toon, Thanks for the advice. I tried to move everything to integer pixels, but there was no change. It's probably because I'm using TextArea instead of a TextField, and it's possible that the component itself is not very well aligned. Thanks, Karina -Original Message- From: Toon Van de Putte [mailto:[EMAIL PROTECTED] Sent: 24 November 2005 15:54 To: Flashcoders mailing list Subject: Re: [Flashcoders] emoticons in a chat component On 11/22/05, Karina Steffens [EMAIL PROTECTED] wrote: 1. Unembedded, it looks nice and crispy, but embedded there's a fuzziness to it, even with anti-aliasing switched off (in fact that looks even worse). Verdana didn't produce any better results. Should I use a different font, perhaps? I know that up until MX 2004, pixel fonts have to be perfectly aligned with the pixel grid not to anti-alias. This means that your textfield should be positioned on an integer pixel position, as seen from _root (ie x300 y400 and not x299.5 y400.2). When your textfield is buried deep inside other symbols, trying to get this figured out can be tricky, the solution that works best for me is to dynamically create all text fields that need exact positioning. In Flash 8, this problem no longer exists, thankfully. -- Toon Van de Putte ___ 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] localtoglobal/globaltolocal and scale issue
I got my thing to work now with localToGLobal/globalToLocal. As long as the clip is at 100% in _yscale and _xscale, then it all works. But when those values are modified, the localToGlobal will not be accurate any longer. Is there an easy fix for this? / martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Flashbordon Sent: den 24 november 2005 17:02 To: FlashCoders @ figleaf. com Subject: VS: [Flashcoders] localtoglobal/globaltolocal and getBounds Hi, It really is annoying methods _root.createEmptyMovieClip(somecontainer,0) somecontainer.createEmptyMovieClip(mc1,0); somecontainer.mc1.createEmptyMovieClip(mc2,0); _root.somecontainer._x = 100; _root.somecontainer._y = 50; _root.somecontainer.mc1._x = 10; _root.somecontainer.mc1._y = 20; _root.somecontainer.mc1.mc2._x = 50; _root.somecontainer.mc1.mc2._y = 40; //localToGlobal: //I want the coordinates of mc2 in the global space: var p:Object = {x: _root.somecontainer.mc1.mc2._x, y: _root.somecontainer.mc1.mc2._y}; _root.somecontainer.mc1.localToGlobal(p); trace(p.x); // 160 (100 + 10 + 50) trace(p.y); // 110 (50 + 20 + 40) //globalToLocal: //i want the global coordinates 300,300 in local mc2-coordinates. var p:Object = {x: 300, y: 300}; _root.somecontainer.mc1.mc2.globalToLocal(p); trace(p.x); // 140 (300 - 100 - 10 - 50) trace(p.y); // 190 (300 - 50 - 20 - 40) I don't know about getBounds -martin -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne af Martin Klasson Sendt: 24. november 2005 15:17 Til: Flashcoders mailing list Emne: [Flashcoders] localtoglobal/globaltolocal and getBounds Hi Coders. As you see in the subject.. that is what I want to learn more about. I have been in the help and read about it, but it is still very confusing how they work. Are there any great pages that you have spotted somewhere, online, in which really can describe them and how they can be used and so on? I have googled, but these are not so oftenly used, though they really should be handy sometimes. Thanks. / martin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.7/180 - Release Date: 23-11-2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.7/180 - Release Date: 23-11-2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.7/180 - Release Date: 23-11-2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.7/180 - Release Date: 23-11-2005 ___ 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] Cutting an image up into tiles using masks
Thanks for the reply Hans You say that duplicateMovie will not duplicate stuff drawn through the API However the following code appears to do just that. Tile_Size = 55; Number_Of_Rows = 4; Number_Of_Columns = 4; // -- // Create Tile and fill it in with solid fill // -- createEmptyMovieClip(tile_mc, 1); tile_mc.moveTo(0,0); tile_mc.beginFill(0xFF); tile_mc.lineTo(Tile_Size,0); tile_mc.lineTo(Tile_Size,Tile_Size); tile_mc.lineTo(0,Tile_Size); tile_mc.lineTo(0,0); tile_mc.endFill(); Tile_ID = 1; // // Create the grid of tiles // for (var vRow_Index = 1; vRow_Index Number_Of_Rows+1; vRow_Index++) { for (var vColumn_Index = 1; vColumn_Index Number_Of_Columns+1; vColumn_Index++) { var vClip_Ref = tile_mc.duplicateMovieClip(tile + Tile_ID + _mc,100+Tile_ID); Tile_ID++; } } There does however seem to be a problem using the same mask on duplicated movie clips. Or perhaps I am misunderstanding ? Thanks Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Hans Wichman Sent: 24 November 2005 16:29 To: Flashcoders mailing list; Flashcoders mailing list Subject: Re: [Flashcoders] Cutting an image up into tiles using masks duplicateMovie will not duplicate any loaded images or stuffd drawn throuh the api. basically you'd have to load the image lots of times as well. At 04:58 PM 11/24/2005, Paul Steven wrote: I am trying to make a Slider Puzzle (game whereby an image is cut up into tiles and one tile is removed then the tiles are rearranged and the aim is to rearrange the pieces of the picture) Anyway I was trying to do this using purely code and nothing in the library. So what I have done is create several empty movie clips i.e the tile, the mask and a movie clip to load the image in I then wanted to duplicate this tile but it does not seem to work. Here is what I have tried Tile_Size = 55; How_Many_Tiles_Across = 4; How_Many_Tiles_Down = 4; createEmptyMovieClip(tile_mc, 10); tile_mc.moveTo(0,0); tile_mc.beginFill(0xFF); tile_mc.lineTo(Tile_Size,0); tile_mc.lineTo(Tile_Size,Tile_Size); tile_mc.lineTo(0,Tile_Size); tile_mc.lineTo(0,0); tile_mc.endFill(); tile_mc.createEmptyMovieClip(loader_mc, 2); createEmptyMovieClip(mask_mc, 3); mask_mc.moveTo(0,0); mask_mc.beginFill(0x00); mask_mc.lineTo(Tile_Size,0); mask_mc.lineTo(Tile_Size,Tile_Size); mask_mc.lineTo(0,Tile_Size); mask_mc.lineTo(0,0); mask_mc.endFill(); tile_mc.setMask(mask_mc); loadMovie(sugababes_1.jpg, tile_mc.loader_mc); tile_mc.duplicateMovieClip(tile1_mc,11); tile1_mc._x = Tile_Size; tile1_mc._y = 0; The second tile appears but it does not appear to show the image. Any help would be much appreciated. I will obviously run through a loop to do all 16 tiles once I have worked this mask malarkey out. Thanks in advance Paul btw this needs to be published flash 7 as2 max so can't use Flash 8 features. ___ 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
RE: [Flashcoders] Flvs fail to stream on an older pc
Hmm...Windows 98 is a bit scary, but it depends if a) you want to play the 'minimum specs' card, or b) try and do a bit of handholding to get to the bottom of the problem. If A), then show her this: http://www.macromedia.com/software/flashplayer/productinfo/systemreqs/ If B) do you dispose of each flv once its been used? Or are there objects hanging around in memory that could cause an old PC to crumble? Can you create version6 or 7 fla's (without the v2 component) to see if it's anthing to do with the component? Are the flv's large (in file size)? And last question, what is the behaviour of 'not working'? Hangs? Crashes? One other thing, on your XP machine check how much virtual memory is being used by the SAFlashPlayer.exe in task manager (assuming it is the standalone flash player that's rendering your swf/flv's and not an IE window). Could be a useful number to compare against the Win98 memory available. Cheers, Nick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karina Steffens Sent: 24 November 2005 16:26 To: 'Flashcoders mailing list' Subject: [Flashcoders] Flvs fail to stream on an older pc Hi List, I'm on the last stages of development of an educational CD-Rom in FlashMX 2004. The application uses a v2 media component loads flvs from the CD-Rom. It's been developed on a pc (XP) and then zipped over and burned on the Mac (OSX) and set to the client. The client has an old mac and an even older PC (which still uses windows 98...). The CD-Rom loads on both, but the flvs seem to work on her mac but not on the pc (except for one or two). She also says that an earlier version of the CD-Rom that I sent her does work, which is puzzling. Also, there is a little test utility just for the Flvs on the CD-Rom, and that also works. My application loads various swfs into a base swf file, and the flvs are loaded to that, so it could be a memory thing. I can't run any of the tests myself, because I'm based in Dublin and she is in London, so I don't know what to do. I tried to tell her that her PC is just too old for the software, and I still haven't got any data from her about how much memory it has. She's not very technical. Does anyone have any ideas, solutions or minimum specs for this problem? Thanks, Karina Karina Steffens | Neo-Archaic creative technical new media design http://www.neo-archaic.net/ www.neo-archaic.net ___ 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] Cutting an image up into tiles using masks
Sorry I missed a couple of lines of code But if you cut and paste this into a new flash movie, it will create a 4 by 4 grid of tiles. Each tile being drawn using the drawing API Tile_Size = 55; Number_Of_Rows = 4; Number_Of_Columns = 4; // -- // Create Tile and fill it in with solid fill // -- createEmptyMovieClip(tile_mc, 1); tile_mc.moveTo(0,0); tile_mc.beginFill(0xFF); tile_mc.lineTo(Tile_Size,0); tile_mc.lineTo(Tile_Size,Tile_Size); tile_mc.lineTo(0,Tile_Size); tile_mc.lineTo(0,0); tile_mc.endFill(); Tile_ID = 1; // // Create the grid of tiles // for (var vRow_Index = 1; vRow_Index Number_Of_Rows+1; vRow_Index++) { for (var vColumn_Index = 1; vColumn_Index Number_Of_Columns+1; vColumn_Index++) { var vClip_Ref = tile_mc.duplicateMovieClip(tile + Tile_ID + _mc,100+Tile_ID); tile_mc._x = (vColumn_Index - 1) * Tile_Size; tile_mc._y = (vRow_Index - 1) * Tile_Size; Tile_ID++; } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] [structure] Automatic callback
You could have modules aware of their peers (like a graph or linked list structure) and eliminate TestSequence entirely...but it would be kind of odd. Otherwise you could have modules dispatch a notification when complete, and have TestSequence observing the modules. This would make the most sense...and I wouldn't consider it an explicit callback, since the modules will have no knowledge of the sequence's existence. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of erixtekila Sent: Thu 11/24/2005 12:33 PM To: Flashcoders mailing list Cc: Subject:[Flashcoders] [structure] Automatic callback Hi all, I need an advice. How could one create a structure that permit to automatically call a method based on the result of a process ? Imagine that example : I have a TestSequence which is a container of TestModules Each TestModule has his special way to test a certain behavior. There are black boxes of tests implementations. I just want to batch sequentially each TestModule, and to get a callback called on TestSequence whenever the test is done. Each one after the preceding : like a FIFO. Is it possible to create this structure without calling explicitely TestSequence ? I thought of Object.watch… but there must be other (design) pattern ? Thanks for your help. --- erixtekila http://blog.v-i-a.net/ ___ 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] [structure] Automatic callback
Le 24 nov. 05, à 19:39, Scott Hyndman a écrit : You could have modules aware of their peers (like a graph or linked list structure) and eliminate TestSequence entirely...but it would be kind of odd. Otherwise you could have modules dispatch a notification when complete, and have TestSequence observing the modules. This would make the most sense...and I wouldn't consider it an explicit callback, since the modules will have no knowledge of the sequence's existence. Yes, that's what I was thinking of. But I still have to call the callback. Here is what I was thinking of : - TestSequence is composed with an FIFO Array, linked list, whatever… - TestModule is a base class with only one method : endTest (b:Boolean) - Each Test have to subclass it in order to call endTest when the implementing test is achieved. The endTest method is not derived by the subclass (it should declared as final, but…) - ITestElement is an interface that each Test have to implement in order to force 1 method : startTest() Sequentially, TestSequence call each entry of its stack. Each TestElement do its stuff and, when finishing or failing, calls endTest on the superclass. endTest only do one stuff : calls the callback of TestSequence. When receiving this message, TestSequence only has to go one stpe further. And so on… My goal is to abstract as much as possible the test implementation. I'd like to be able to batch as much test as I want. But, as I am lazy (!), I'd like not to call endTest at all. Because I am not sure that I will remember that need in months. So, it would be pretty better for me to find an automatic way of being called. Follow me ? Any idea ? Thanks by advance. --- erixtekila http://blog.v-i-a.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Cutting an image up into tiles using masks
Sorry paul, i was wrong, apparently duplicating clips with drawn code is possible. Somehow i tried this in a project sometime ago and it failed, but still... loaded images wont.. im sure.. really ;)) And you are right the mask cant be shared as well, so you have to duplicate the mask as well. greetz Hans At 05:52 PM 11/24/2005, Paul Steven wrote: Sorry I missed a couple of lines of code But if you cut and paste this into a new flash movie, it will create a 4 by 4 grid of tiles. Each tile being drawn using the drawing API Tile_Size = 55; Number_Of_Rows = 4; Number_Of_Columns = 4; // -- // Create Tile and fill it in with solid fill // -- createEmptyMovieClip(tile_mc, 1); tile_mc.moveTo(0,0); tile_mc.beginFill(0xFF); tile_mc.lineTo(Tile_Size,0); tile_mc.lineTo(Tile_Size,Tile_Size); tile_mc.lineTo(0,Tile_Size); tile_mc.lineTo(0,0); tile_mc.endFill(); Tile_ID = 1; // // Create the grid of tiles // for (var vRow_Index = 1; vRow_Index Number_Of_Rows+1; vRow_Index++) { for (var vColumn_Index = 1; vColumn_Index Number_Of_Columns+1; vColumn_Index++) { var vClip_Ref = tile_mc.duplicateMovieClip(tile + Tile_ID + _mc,100+Tile_ID); tile_mc._x = (vColumn_Index - 1) * Tile_Size; tile_mc._y = (vRow_Index - 1) * Tile_Size; Tile_ID++; } } ___ 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] AS3 - parse file
how to parse? would you mind sharing that? 2005/11/24, franto [EMAIL PROTECTED]: yes I know Jesse, but there is no source :) I've already ask Andre about sharing sources.. but I've already know how to parse file (ByteArray), now the only problem is 3ds file format :)) On 11/23/05, JesterXL [EMAIL PROTECTED] wrote: http://blog.andre-michelle.com/2005/as3-perspective-texturemapping/ - Original Message - From: franto [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, November 23, 2005 9:58 AM Subject: [Flashcoders] AS3 - parse file Hi, i'm trying new AS3 features, and want to try parse file... e.g 3ds (3dmax) file but have no clue, how to do it im try URLLoader, URLStream, but do not know, what on which event I should listen. Can someone help me? Thanks - 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 -- t.E.l : +8605513602273 m.o.B : +8613855184110 q.Q : 7387905 B.L.o.G : http://old9.wordpress.com E.m.A.i.L : qi.jiahui⊕gmail.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [structure] Automatic callback
and have TestSequence observing the modules. I don't like to use an observing scheme since I must validate a sequence of tests. Observer make a 1 to many relation but asynchronisaly (…!) BTW it was a good point. Thanks. --- erixtekila http://blog.v-i-a.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] dynamic accordion header text
How do I allow a user to dynamically change the label in the header of an accordion component? I've used the labelPath.text property but this does not allow me to adjust for text width so the number of characters in the new label has to be = to the old label or it will get truncated in the header display. I cannot set the width with labelPath.width either. Is this the best way to change a label through user input? myAccordion.header0.labelPath.text = myNewLabel; Thanks for any help. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] flash settings JSFL ?
Hi, is there a way to make all my graphics symbols to play once instead of the loop default. Maybe with JSFL ? Where can I learn about this? Also, I'd really like to make all my bitmap images to automatically not smooth on stage. That smooth option is so useless... What's it for anyway? Ive never used it, I always uncheck it. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] [structure] Automatic callback
Le 24 nov. 05, à 20:27, Ian Thomas a écrit : Why not just pass each module a callback function to call when it's done? Then TestSequence can do all the work. For example: class TestModule { public function runTest(callback:Function) { // Do some testing... // When done... callback(); } Good point. But I will be more lazy :) class TestModule { public function runTest (callback:Function) { // Call an implemented method on subclass interface beginSubclassTest (); // OK launch the TestSequence callback (); } } BTW this process is only available for the stack sequence of functions. Imagine that I need an asynchrone test in my sequence. Something like evualuating the time for example and need to call the callback later… Le 24 nov. 05, à 20:59, Scott Hyndman a écrit : class ModuleBase { public function startTest() { runTest(); endTest(); } public function runTest() { throw new Exception(implemented in subclasses); } public function endTest() { dispatchEvent({type:end}); } } Same here. Thanks for you both. --- erixtekila http://blog.v-i-a.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] flash settings JSFL ?
Hi, is there a way to make all my graphics symbols to play once instead of the loop default. Maybe with JSFL ? Where can I learn about this? Yes here is the sample from the help documentation under symbolInstance.loop fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].loop = 'single frame'; Also, I'd really like to make all my bitmap images to automatically not smooth on stage. That smooth option is so useless... What's it for anyway? Ive never used it, I always uncheck it. Yes, but if you use Flash 8 they import with smoothing set to false by default. Look under BitmapItem in the JSFL help documentation here is an example fl.getDocumentDOM().library.items[0].allowSmoothing = true; I have a panel that really helps in setting multiple bitmap properties to multiple bitmaps in the library at once. You can download it here http://blog.fuelindustries.com/extensions/LibraryItems.mxp Hope that helps Julian Dolce Senior Creative Technologist Fuel Industries, INC [ p ] 613-224-6738 x241 -Original Message- From: Patrick Matte [mailto:[EMAIL PROTECTED] Sent: Thursday, November 24, 2005 3:52 PM To: Flashcoders mailing list Subject: [Flashcoders] flash settings JSFL ? Hi, is there a way to make all my graphics symbols to play once instead of the loop default. Maybe with JSFL ? Where can I learn about this? Also, I'd really like to make all my bitmap images to automatically not smooth on stage. That smooth option is so useless... What's it for anyway? Ive never used it, I always uncheck it. ___ 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] Flvs fail to stream on an older pc
Hi Karina I have had similar problems like you. My cd-rom in question had 2 videos (both external flvs to profit f7's smaller memory footprint advantage over f6 regarding videos) Both videos was rather big in pixel size and approx 3 mins length (about 30 megabytes each). So i knew they would demand a bit of 'juice'. When testing with a 'raw' video test both a mac g4 500mhz (os9 and osx) and a p3 600mhz (both win2k + win 98) worked fine with no performance problems playing from a cd. But my version with the final design was demanding quite alot more cpu to perform well. What i found out was that the pure presence of bitmap graphics with alpha information was decreasing the performance (demanding more cpu) - even though the bitmap wasn't moving or something was moving over or under it. I still couldn't optimize it fully to fit my 'raw' tests - but it put down the performance needs to a acceptable level. My minimum specs ended up at mac: g4 800mhz pc: p3 800mhz (both 64mb ram) I had other strange problems like sound issues with some pcs - some dell configurations with sound blaster live soundcards and a certain motherboards and cd-rom drive for some reason distorted the sound. (similar to the sound issues with flash 5 and soundblaster pci 64 and 128) but thing like this is out of your hands. But well with cd-rom productions there always are some odd hw configurations that just give problems (although in theory it shouldn't). Using director would just giver other issues (and make the production a lot more expensive due to the lack of cross platform projector exporting back then). Flash gave us the unique feature to distribute video cross platform without being dependent of 3rd party media players. All in all the cd-rom was a success and went into its 2 edition with a total of 70.000 units. Cheers, B) Søren DESIGN // INTERACTIVITY // MOTION // VISUALS +34 667 812 329 (ES) // +45 3694 8614 (DK) www.RGBAZ.com // www.DESILENCE.net On 24/11/05 17:26, Karina Steffens [EMAIL PROTECTED] wrote: Hi List, I'm on the last stages of development of an educational CD-Rom in FlashMX 2004. The application uses a v2 media component loads flvs from the CD-Rom. It's been developed on a pc (XP) and then zipped over and burned on the Mac (OSX) and set to the client. The client has an old mac and an even older PC (which still uses windows 98...). The CD-Rom loads on both, but the flvs seem to work on her mac but not on the pc (except for one or two). She also says that an earlier version of the CD-Rom that I sent her does work, which is puzzling. Also, there is a little test utility just for the Flvs on the CD-Rom, and that also works. My application loads various swfs into a base swf file, and the flvs are loaded to that, so it could be a memory thing. I can't run any of the tests myself, because I'm based in Dublin and she is in London, so I don't know what to do. I tried to tell her that her PC is just too old for the software, and I still haven't got any data from her about how much memory it has. She's not very technical. Does anyone have any ideas, solutions or minimum specs for this problem? Thanks, Karina Karina Steffens | Neo-Archaic creative technical new media design http://www.neo-archaic.net/ www.neo-archaic.net ___ 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] how to access Print from flash context menu?
any way to access Print from flash contextual menu without to right click on flash and choose print from there? www.iashido.com www.itseveryday.ro ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Dynamic variables in as3
Does anybody know of a way to create and reference dynamic variables in as3. Specifically movie clips, but if there's a difference between them and any other type of variables, that'd be good to know. In as2 this would be for(var i:Number =0; i acRate; i++){ this.createEmptyMovieClip('p'+i,this.getNextHighestDepth()) this['p'+i]._x = i*10 this['p'+i]._y = i*10 } However in as3 it would need to be something like for(var i:Number =0;i acRate; i++){ var ['p'+i]:MovieClip = new MovieClip() this['p'+i].x = i*10 this['p'+i].y = i*10 } Which doesn't work of course. Does anybody have a work around for this, or is it no longer possible to create undeclared variables at run time. Thanks all Phil ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Dynamic variables in as3
push it into an array. myArr.push(new MovieClip()); On 11/24/05, Phil Douglas [EMAIL PROTECTED] wrote: Does anybody know of a way to create and reference dynamic variables in as3. Specifically movie clips, but if there's a difference between them and any other type of variables, that'd be good to know. In as2 this would be for(var i:Number =0; i acRate; i++){ this.createEmptyMovieClip('p'+i,this.getNextHighestDepth()) this['p'+i]._x = i*10 this['p'+i]._y = i*10 } However in as3 it would need to be something like for(var i:Number =0;i acRate; i++){ var ['p'+i]:MovieClip = new MovieClip() this['p'+i].x = i*10 this['p'+i].y = i*10 } Which doesn't work of course. Does anybody have a work around for this, or is it no longer possible to create undeclared variables at run time. Thanks all Phil ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- j:pn ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] OOP newbie question
Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method handleIncoming can not access () or maybe even find) the method parseMessages. If I give the complete path to the instance of the OSC class (made in my fla - for example _root.OSC_Obj.parseMessages (xmlIn); ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OOP newbie question
import mx.utils.Delegate; class OSC { var mySocket : XMLSocket; public function OSC () { connect (); } function connect () { mySocket = new XMLSocket (); mySocket.onXML = Delegate.create(this,handleIncoming); } function handleIncoming (xmlIn){ parseMessages (xmlIn); } function parseMessages (node){ } } Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method handleIncoming can not access () or maybe even find) the method parseMessages. If I give the complete path to the instance of the OSC class (made in my fla - for example _root.OSC_Obj.parseMessages (xmlIn); ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ 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] OOP newbie question
Just create reference to your class. You will need that a lot ... function connect () { mySocket = new XMLSocket (); var _obj = this; mySocket.onXML = function () { _obj.handleIncoming(); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Friday, 25 November 2005 2:27 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] OOP newbie question Hi, The problem here is scope. When you call parseMessages, you doing it in the scope of the mySocket object (where the method doesn't exist.) There's a pretty simple workaround for this using the Delegate utility that comes with Flash. At the top of your class file, do this : import mx.utils.Delegate; Change this line: mySocket.onXML = handleIncoming; To this: mySocket.onXML = Delegate.create(this,handleIncoming); And that should solve your problem. Basically you're creating a proxy function on the XMLSocket object that then invokes the handleIncoming function on your OSC object. There are other ways to do this, but I think the Delegate method is generally considered the best practice. Hope that helps, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hbruyere Sent: Thursday, November 24, 2005 10:19 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OOP newbie question Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method handleIncoming can not access () or maybe even find) the method parseMessages. If I give the complete path to the instance of the OSC class (made in my fla - for example _root.OSC_Obj.parseMessages (xmlIn); ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ 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
RE: [Flashcoders] OOP newbie question
Thanks for all your helps. The Delegate class makes it works like a charm... On the other hand the self referencing is not working. Would it work that way (The Delegate class solution) is an other OOP language like Java or C++ ? //h -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Thursday, November 24, 2005 10:41 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] OOP newbie question I never have a use for self refencing.. maybe thats just me, feels like a dirty hack. Just create reference to your class. You will need that a lot ... function connect () { mySocket = new XMLSocket (); var _obj = this; mySocket.onXML = function () { _obj.handleIncoming(); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Friday, 25 November 2005 2:27 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] OOP newbie question Hi, The problem here is scope. When you call parseMessages, you doing it in the scope of the mySocket object (where the method doesn't exist.) There's a pretty simple workaround for this using the Delegate utility that comes with Flash. At the top of your class file, do this : import mx.utils.Delegate; Change this line: mySocket.onXML = handleIncoming; To this: mySocket.onXML = Delegate.create(this,handleIncoming); And that should solve your problem. Basically you're creating a proxy function on the XMLSocket object that then invokes the handleIncoming function on your OSC object. There are other ways to do this, but I think the Delegate method is generally considered the best practice. Hope that helps, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hbruyere Sent: Thursday, November 24, 2005 10:19 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OOP newbie question Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method handleIncoming can not access () or maybe even find) the method parseMessages. If I give the complete path to the instance of the OSC class (made in my fla - for example _root.OSC_Obj.parseMessages (xmlIn); ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] OOP newbie question
http://www.javaworld.com/javaworld/javaqa/2001-09/01-qa-0914-delegate.html Thanks for all your helps. The Delegate class makes it works like a charm... On the other hand the self referencing is not working. Would it work that way (The Delegate class solution) is an other OOP language like Java or C++ ? //h -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Thursday, November 24, 2005 10:41 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] OOP newbie question I never have a use for self refencing.. maybe thats just me, feels like a dirty hack. Just create reference to your class. You will need that a lot ... function connect () { mySocket = new XMLSocket (); var _obj = this; mySocket.onXML = function () { _obj.handleIncoming(); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Friday, 25 November 2005 2:27 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] OOP newbie question Hi, The problem here is scope. When you call parseMessages, you doing it in the scope of the mySocket object (where the method doesn't exist.) There's a pretty simple workaround for this using the Delegate utility that comes with Flash. At the top of your class file, do this : import mx.utils.Delegate; Change this line: mySocket.onXML = handleIncoming; To this: mySocket.onXML = Delegate.create(this,handleIncoming); And that should solve your problem. Basically you're creating a proxy function on the XMLSocket object that then invokes the handleIncoming function on your OSC object. There are other ways to do this, but I think the Delegate method is generally considered the best practice. Hope that helps, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hbruyere Sent: Thursday, November 24, 2005 10:19 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OOP newbie question Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method handleIncoming can not access () or maybe even find) the method parseMessages. If I give the complete path to the instance of the OSC class (made in my fla - for example _root.OSC_Obj.parseMessages (xmlIn); ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ 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 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] OOP newbie question
Nothing is wrong with it. Just seems an ugly way to deal with differences in scope. Why what's wrong about it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Johnston Sent: Friday, 25 November 2005 2:41 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] OOP newbie question I never have a use for self refencing.. maybe thats just me, feels like a dirty hack. Just create reference to your class. You will need that a lot ... function connect () { mySocket = new XMLSocket (); var _obj = this; mySocket.onXML = function () { _obj.handleIncoming(); } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Phelan Sent: Friday, 25 November 2005 2:27 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] OOP newbie question Hi, The problem here is scope. When you call parseMessages, you doing it in the scope of the mySocket object (where the method doesn't exist.) There's a pretty simple workaround for this using the Delegate utility that comes with Flash. At the top of your class file, do this : import mx.utils.Delegate; Change this line: mySocket.onXML = handleIncoming; To this: mySocket.onXML = Delegate.create(this,handleIncoming); And that should solve your problem. Basically you're creating a proxy function on the XMLSocket object that then invokes the handleIncoming function on your OSC object. There are other ways to do this, but I think the Delegate method is generally considered the best practice. Hope that helps, Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hbruyere Sent: Thursday, November 24, 2005 10:19 PM To: Flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] OOP newbie question Hi, Here is a OOP newbie question. I have a class (see below).. Everything works fine. but the method handleIncoming can not access () or maybe even find) the method parseMessages. If I give the complete path to the instance of the OSC class (made in my fla - for example _root.OSC_Obj.parseMessages (xmlIn); ) it works. How should I code this to make it works ? class OSC { var mySocket : XMLSocket; // // public function OSC () { connect (); } // // function connect () { mySocket = new XMLSocket (); mySocket.onXML = handleIncoming; } // // function handleIncoming (xmlIn) { parseMessages (xmlIn); } // function parseMessages (node) { actions.. } } Thanks for your attention, //h ___ 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 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] Loading multiple images inside dynamic text field
Hi, I was surprised to see this result. I have a Dynamic text field on stage. I am loading some XML data which contains HTML formatted text inside CDATA tag. The content of CDATA is something like: img alt=kp.jpg src=http://www.ssdesigninteractive.com/blog/archives/kp.jpg; width=450 height=348 / p img alt=amit.jpg src=http://www.ssdesigninteractive.com/blog/archives/amit.jpg; width=450 height=348 / Now when I run the movie, the two images load BUT the spacing between the two images is just a line break given by p. Also the images overlap each other. I expected the two images to load in line one fter another. Anyone faced this problem before? *** note: If you want to look at the actual problem, try this URL. Scroll down a bit to the post called FRIENDS AT MACROMEDIA . http://www.ssdesigninteractive.com/flashblog.html This is my flash frontend for Wordpress, The archives and search links are not working currently but you can explore otherwise. Thanks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] browsing Flashcoders archives on local PC
Hello Flashcoders, I'm preparing for MM certification and would like to refresh my Flash MX 2004 knowledge by reading Flashcoders archives (2003-2005). They are downloadable as huge (4-5mb per month) text files. Does someone have experience/tricks/ideas of how to browse them on local PC (or Mac)? -- Best regards, Gregory_GOusable http://GOusable.com Flash components development. Usability services. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] browsing Flashcoders archives on local PC
Download Google Desktop search. Its the best way to search your PC as far as I know. --Sajid On 11/25/05, Gregory_GOusable [EMAIL PROTECTED] wrote: Hello Flashcoders, I'm preparing for MM certification and would like to refresh my Flash MX 2004 knowledge by reading Flashcoders archives (2003-2005). They are downloadable as huge (4-5mb per month) text files. Does someone have experience/tricks/ideas of how to browse them on local PC (or Mac)? -- Best regards, Gregory_GOusable http://GOusable.com Flash components development. Usability services. ___ 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