[Flashcoders] sendAndLoad()ing Content-Encoding: gzip

2006-01-04 Thread Alexander Farber
Hello flashcoders, I'm new to Flash, but plan to develop an web-chat-alike Apache module which would communicate with a Flash client through sendAndLoad() (i.e. exchanging short messages in application/x-www-form-urlencoded format). From the docs/books I've understood that SSL communication is

[Flashcoders] sendAndLoad() and If-Modified-Since

2006-01-05 Thread Alexander Farber
Ok, thanks. And what about the If-Modified-Since header? Is it honored by Flash's sendAndLoad()? Does anybody please have an AS-code snippet using that header? Regards Alex On 1/4/06, Weyert de Boer [EMAIL PROTECTED] wrote: What I always understood about the working of the Flash player is that

Re: [Flashcoders] sendAndLoad() and If-Modified-Since

2006-01-05 Thread Alexander Farber
Hi, On 1/5/06, Weyert de Boer [EMAIL PROTECTED] wrote: // disable the caching... highscoreXml .sendAndLoad( highscorephp?timestamp= + new Date().getTime(), highscoreXml ); thanks however I mean something different than your trick with the changing URL: 1) Can you sendAndLoad() from a flash

[Flashcoders] Drawing and resizing

2006-06-18 Thread Alexander Farber
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

[Flashcoders] LoadVars - sending an array

2006-08-04 Thread Alexander Farber
Hello, I'm working on a flash game sending data to an Apache module through the LoadVars.sendAndLoad() (i.e. I use neither XML, nor AMF, but send the application/x-www-form-urlencoded strings around). I wonder, how do the other folks send arrays, since you unfortunately can't send a key more

[Flashcoders] this['box_ratio'] works but this.box_ratio or just box_ratio does not

2006-09-11 Thread Alexander Farber
Hello, I have an mc which loads an external image file (a user avatar) using MovieClipLoader.loadClip and while doing so displays percentage of currently loaded bytes in a TextField loaded_txt: class User extends MovieClip { private var loaded_txt:TextField; private var

Re: [Flashcoders] this['box_ratio'] works but this.box_ratio or just box_ratio does not

2006-09-12 Thread Alexander Farber
Hello John, On 9/12/06, John Axel Eriksson [EMAIL PROTECTED] wrote: You could look into Delegate or Proxy... makes these I've looked up the Delegate and it is for Components and I don't use them. And the Proxy is a bad keyword for searching - could you please give me an URL? I have put my

Re: [Flashcoders] this['box_ratio'] works but this.box_ratio or just box_ratio does not

2006-09-12 Thread Alexander Farber
Thank you John, the Delegate has been just what I needed - I've just replaced the 2 lines and it works: listener.onLoadProgress = Delegate.create(this, display_progress); listener.onLoadInit = Delegate.create(this,

[Flashcoders] Scaling image to fit into a box - can't find the bug

2006-09-14 Thread Alexander Farber
Hello, I have written an mc to load an external image and to fit it into an 80 x 60 container and it works fine the 1st time I call my load_avatar() method. On the repeated load_avatar() calls however the image gets distorted. Does anybody have an idea how to fix this? I've reduced my code to

[Flashcoders] Re: Addressing several mc instances in auth. env. through an array

2006-09-14 Thread Alexander Farber
Hello again and sorry for the typos in my original mail. I am listing my actual and working code at the bottom. Still my question is: is it possible to replace private var user0_mc:MovieClip; private var user1_mc:MovieClip; private var user2_mc:MovieClip; by an array, if

[Flashcoders] Addressing several mc instances in auth. env. through an array

2006-09-14 Thread Alexander Farber
Hi, I'm trying to create a playing table mc, which would act as a button (you click it in order to sit down and play cards at that table), with 3 player mc's attached to it. The player mc works fine for me - I call something like: user_mc.update('3,Alex,avatar3.jpg'); and it will turn

[Flashcoders] Can't get buttons and mouse wheel working in an mc

2006-09-23 Thread Alexander Farber
Hello, I had a chat consisting of a text field, a text area and 2 buttons to scroll the text area up and down. It worked fine. Then I've decided to put all that stuff together inside of 1 mc, the AS 2.0 style. Unfortunately the buttons and the mouse wheel have stopped working and I haven't

Re: [Flashcoders] Video chat

2006-09-23 Thread Alexander Farber
Search for FMS on Google On 9/23/06, Batista Mihai [EMAIL PROTECTED] wrote: Hello! Where can I find a tutorial about how to make a video chat using Flash? Regards Alex -- http://preferans.de ___ Flashcoders@chattyfig.figleaf.com To change your

[Flashcoders] A button-like MC with TextField on it - my_txt.text disappears

2006-09-28 Thread Alexander Farber
Hello, I'm trying to create an MC which acts as a Button and additionally has a text label on the top of it. For that I have created 3 Frames: _up, _over, _down and a dummy onRelease() method. This works ok. I have also a TextField my_txt on the top of my MC and a method setText(str:String) to

Re: [Flashcoders] A button-like MC with TextField on it - my_txt.text disappears

2006-09-28 Thread Alexander Farber
Thank you for your comments Julien and Helen. I'll try it out (it always takes me some time, because I do Flash on evenings only, when the kid shuts up ;-) The invisible layer to prevent button-flipping makes sense too, I'll add it. Also I think there is a 3rd method - to use a variable bound

Re: [Flashcoders] LoadVars+php

2006-11-30 Thread Alexander Farber
On 11/20/06, Andrea Maran [EMAIL PROTECTED] wrote: PHP : ip.php ? $ip=$_SERVER['REMOTE_ADDR']; $vars =; $vars = ip_num= . $ip ; echo $vars; ? And don't forget the X-Forwarded-For inserted by some proxies (Squid) Regards Alex -- http://preferans.de

[Flashcoders] A v2 Window with a Checkbox and a Button

2007-01-17 Thread Alexander Farber
Hi, I've drawn a red rectangle, then pulled a v2 Checkbox and a Button inside of it, named them my_checkbox and my_button and then converted all of that into a MovieClip which I called Settings and removed from the stage. Finally I've pulled a Window on the stage and called it my_win. While

[Flashcoders] Which components are used at spiegel.de?

2007-02-23 Thread Alexander Farber
Hello, does anybody please know, which Flash components are used at http://www.spiegel.de/static/flash/flashvideo-420-7.swf I've recognized the toolbars and a v2 DataGrid with custom cells, but what are the rest (some tabs)? Are they available anywhere? Regards Alex -- http://preferans.de

[Flashcoders] Editing .as files with vim editor (non-english chars broken)

2007-02-28 Thread Alexander Farber
Hello, is anybody using the Vim editor on Windows for editing ActionsScript files? My problem is that the cyrillic letters which are being displayed ok by Macromedia Flash IDE appear broken in Vim 7.0. The russian text is displayed twice as long as it should be and there are repeatable P and C

[Flashcoders] clearInterval(0);

2007-03-04 Thread Alexander Farber
Hello, is it maybe safe to call clearInterval(0) (same way as calling free(NULL) in C language) or should I better not rely on this? Here is my web chat function and I wonder if I could get rid of the very first line in it: var intervalID:Number = 0; var resp_lv:LoadVars = new LoadVars(); var

[Flashcoders] Inspectable parameters ignored in my 1st component

2007-03-14 Thread Alexander Farber
Hello Flash coders, I'm trying to create a component representing a comic-like chat bubble and while it mostly functions fine, I have a problem, that the 2 parameters here are ignored (full source code: http://preferans.de/flash/Bubble.as ): class Bubble extends UIComponent { ...

Re: [Flashcoders] Site Check

2007-03-14 Thread Alexander Farber
Works for me, nice fotos On 3/14/07, white song [EMAIL PROTECTED] wrote: it's ok it's working :) On 3/14/07, Adrian Lynch [EMAIL PROTECTED] wrote: Could I get some of you to check this site: http://www.simon-mills.co.uk/test/ Some people are saying that it gets stuck at 1% or 2%. Can

Re: [Flashcoders] Inspectable parameters ignored in my 1st component

2007-03-18 Thread Alexander Farber
Hello Nel and others, On 3/14/07, Johannes Nel [EMAIL PROTECTED] wrote: [Inspectable(defaultValue=8, type=Number)] On 3/14/07, Alexander Farber [EMAIL PROTECTED] wrote: I'm trying to create a component representing a comic-like chat bubble and while it mostly functions fine, I have

Re: [Flashcoders] Inspectable parameters ignored in my 1st component

2007-03-18 Thread Alexander Farber
Thanks, I see - On 3/18/07, Michael Boski [EMAIL PROTECTED] wrote: what you want to do is add an inittext varible to hold the param until you finish initializing you text box and then push it in. this code works/ I tested it. the lines I added are 3 and have // line added MOB at the end of

[Flashcoders] Entering hex number (a color) as component parameter

2007-03-20 Thread Alexander Farber
Hello flash coders, I have a mostly working component (please see Bubble.* in http://preferans.de/flash/ ), but wonder how to make the background color to be a parameter. Currently I have: class Bubble extends UIComponent { [Inspectable(defaultValue=0x66, type='Number')]

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-21 Thread Alexander Farber
Thank you and sorry - I've missed the Color type in Flash help. But what is the role of __hasInitialized in your example? Why can't I just: [Inspectable(defaultValue=#66,type=Color)] public function get bgcolor():Number { return __bgcolor; }

Re: [Flashcoders] Entering hex number (a color) as component parameter

2007-03-22 Thread Alexander Farber
Looks wrong to me because the drawing code (the setBgColor()) is called outside of the draw() method. Flash Help says to call invalidate() from the set methods instead... On 3/21/07, Johannes Nel [EMAIL PROTECTED] wrote: he checks if the component is init'd On 3/21/07, Alexander Farber [EMAIL

[Flashcoders] createClassObject(OwnComponent) displays nothing on stage

2007-03-22 Thread Alexander Farber
Hello, I have written my own component (please see Bubble.* in http://preferans.de/flash/ ) which works ok - but only if I pull its instance onto the stage manually. If I try to instantiate it during runtime with - bubble_mc = createClassObject(Bubble, 'bubble_mc', 10, { _width: 80,

[Flashcoders] How to find dimensions of my own component, resized in auth. env.?

2007-03-23 Thread Alexander Farber
Hello, I have a simple component, it is a multiline TextField with wordWrap switched on and with a yellow rectangle drawn underneath: http://preferans.de/flash/ - the files Bubble.* I'd like the users of my component to be able to resize its width in the authoring environment, so that they

Re: [Flashcoders] Flash crashing dilemna - when adding an input textfield

2007-03-23 Thread Alexander Farber
Hello, here an idea from a total newbie - do you catch any keystrokes (like for controlling your player character)? On 3/22/07, Paul Steven [EMAIL PROTECTED] wrote: Basically the game crashes if I type into a text input field. If I do not then it doesn't. Regards Alex -- http://preferans.de

[Flashcoders] Re: How to find dimensions of my own component, resized in auth. env.?

2007-03-23 Thread Alexander Farber
width=160, 100 On 3/23/07, Alexander Farber [EMAIL PROTECTED] wrote: I have a simple component, it is a multiline TextField with wordWrap switched on and with a yellow rectangle drawn underneath: http://preferans.de/flash/ - the files Bubble.* I'd like the users of my component to be able

Re: [Flashcoders] OT - Installing PHP, MySQL?

2007-03-27 Thread Alexander Farber
Hello Dave, my advice (and I have to deal with RH Linux 80% of my work time) to you and other designer guys here is: don't fall for Linux hype, go with OpenBSD. You install the core system, which already has Apache 1 with many security improvements (compared to the original Apache code) and

[Flashcoders] import own class (use SOME_CONST instead of MyUtils.SOME_CONST)

2007-04-04 Thread Alexander Farber
Hi, I'd like to move few constants and functions my project is using into a separate class, called Util. How could I please make them importable, i.e. so that I could write just import Util; trace(SOME_CONSTANT); instead of always prepending Util. in front of the variables:

[Flashcoders] Compiler chokes when using a class method as event handler

2007-04-19 Thread Alexander Farber
Hello, I'm trying to create a v2 component representing a deck of playing cards and I have a problem, which I believe is very common, but I can't find a solution on the net yet. My code is simple and is listed completely at the bottom. And the problem is, that when I assign an event handler to

Re: [Flashcoders] Compiler chokes when using a class method as event handler

2007-04-19 Thread Alexander Farber
Hello Robert, On 4/19/07, Robert Brisita [EMAIL PROTECTED] wrote: The compiler says: **Error** Deck.as: There is no method with the name 'setDepthTo'. this.setDepthTo(DepthManager.kTop); And from your code I don't see it either: this.setDepthTo or this.filters. When you say it

Re: [Flashcoders] Compiler chokes when using a class method as event handler

2007-04-19 Thread Alexander Farber
Found my error - was missing _parent.evt_obj in the last line below: On 4/19/07, Alexander Farber [EMAIL PROTECTED] wrote: PS: Below is my almost working code (the card event doesn't dispatch yet for some reason, but the rest works - card can be dragged etc.): function

Re: [Flashcoders] Compiler chokes when using a class method as eventhandler

2007-04-19 Thread Alexander Farber
Hello Muzak, On 4/19/07, Muzak [EMAIL PROTECTED] wrote: Because each card instance now uses the EventDispatcher class you can easily determine which card instance was pressed/released through the argument passed to the event handler. your suggestion is excellent as always - I'll try that!

[Flashcoders] _parent and _root in custom component have same dimensions as the latter?

2007-04-20 Thread Alexander Farber
Hello, I have a probably very stupid problem: I'm trying to create a custom v2 component representing a playing card (full source code at the bottom). It works mostly ok, but when I try to get _parent's _width and _height in its onPress handler in order to restrict dragging: private

Re: [Flashcoders] setInterval woes

2007-04-20 Thread Alexander Farber
Are you missing a stop(); maybe? On 4/20/07, Michael King [EMAIL PROTECTED] wrote: The problem is, when I use setInterval as documented, it waits the first minute, does its thing, but then it ignores the interval after that, pulling the data every time that frame comes up. Regards Alex --

Re: [Flashcoders] PLEASE help with advanced dataset issues

2007-04-20 Thread Alexander Farber
Hello Don, maybe a totally wrong idea, but do you send an updateAll event? http://www.flash-communications.net/technotes/mappingSharedObjectsToArrays/ On 4/20/07, Gaia-Tek [EMAIL PROTECTED] wrote: So I tried to fill the dataset manually, by populating it with an array... This works fine,

[Flashcoders] TransitionManager type Fly breaks coordinates of my MovieClips

2007-04-30 Thread Alexander Farber
Hello, I have a v2 component displaying up to 12 playing cards at the bottom of the stage and slightly rotating them from left to right: private function placeCards(new_array:Array):Void { var gap:Number = 40; for (var i:Number = 0,

[Flashcoders] Re: TransitionManager type Fly breaks coordinates of my MovieClips

2007-04-30 Thread Alexander Farber
The funny thing is that it only happens with Fly: On 4/30/07, Alexander Farber [EMAIL PROTECTED] wrote: //TransitionManager.start(card_mc, {type:Fly, direction:Transition.IN, // duration:3, easing:Strong.easeOut, startPoint:(1 + i % 3)}); When I take some other

[Flashcoders] Re: TransitionManager type Fly breaks coordinates of my MovieClips

2007-05-03 Thread Alexander Farber
the static method start() for the 2nd or 3rd time... On 4/30/07, Alexander Farber [EMAIL PROTECTED] wrote: I have a v2 component displaying up to 12 playing cards at the bottom of the stage and slightly rotating them from left to right: private function placeCards(new_array:Array):Void

[Flashcoders] There is no method with the name 'createClassChildAtDepth'.

2007-05-29 Thread Alexander Farber
Hello Flashcoders, is there please a way to use DepthManager from a MovieClip-based class? I have prepared this short test code which compiles fine: import mx.core.UIComponent; import mx.events.EventDispatcher; import mx.managers.DepthManager; class TestCase extends UIComponent {

[Flashcoders] External preloader using loadClip() - is it a good idea?

2007-06-18 Thread Alexander Farber
Dear flash coders, I wonder, if it is a good idea at all and surprisingly can't find any related discussions in the archive - I have a bigger Main.swf (224 KB, because of playing card pictures + v2 components) and for preloading it I've created this (only 400 bytes small) Load.swf of the same

[Flashcoders] Re: External preloader using loadClip() - is it a good idea?

2007-06-18 Thread Alexander Farber
Sorry, a small copy-paste typo - the function below is onLoadProgress On 6/18/07, Alexander Farber [EMAIL PROTECTED] wrote: function onLoadInit(target_mc:MovieClip, loaded:Number, total:Number):Void { load_txt.text = Math.ceil(loaded * 100 / total

Re: [Flashcoders] Re: External preloader using loadClip() - is it a good idea?

2007-06-18 Thread Alexander Farber
Thank you, but unfortunately this: On 6/18/07, Digg Yeah [EMAIL PROTECTED] wrote: [to prevent cacheing, ToolsInternet optionstemporary internet files settingscheck every visit to page ] won't clear the flash cache for me: I don't see my preloader Load.swf anymore, I see the Main.swf

Re: [Flashcoders] Re: External preloader using loadClip() - is it a good idea?

2007-06-18 Thread Alexander Farber
Hello all again, I've solved my problem of the loadClip('Main.swf', ...) delivering the same old version of the Main.swf by the standard trick of appending a random string. The minor problem left is that I have to copy my authentication variables manually by doing: target_mc.userid =

Re: [Flashcoders] converting .mov to .flv

2007-06-18 Thread Alexander Farber
Maybe you could do it with mencoder? http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html Available for all systems, incl. Win + Mac From: Jim Greiner I'm looking for an easy, inexpensive way to convert my .mov QuickTime movies ( 2 to 10 minutes long) to .flv in order for me to put them on

Re: [Flashcoders] attachMovie from library - fails to work with preloader

2007-06-19 Thread Alexander Farber
Hello John and others, On 6/16/07, John VanHorn [EMAIL PROTECTED] wrote: you must force those movieclips to load before you use have access to them. what i usually do is to set the export frame for classes to 2, and then go through the library and uncheck 'export in first frame' for all

Re: [Flashcoders] Re: External preloader using loadClip() - is it a good idea?

2007-06-19 Thread Alexander Farber
Hi, one more small comment: On 6/18/07, Alexander Farber [EMAIL PROTECTED] wrote: I've solved my problem of the loadClip('Main.swf', ...) delivering the same old version of the Main.swf by the standard trick of appending a random string. I've realized, that an external preloader doesn't work

Re: [Flashcoders] Confused by preloading sounds and components

2007-06-19 Thread Alexander Farber
Sorry, but what will that change? I don't see a big difference On 6/19/07, Muzak [EMAIL PROTECTED] wrote: Place everything in frame 10. - Original Message - From: Alexander Farber [EMAIL PROTECTED] 1) Why are the Components and MovieClips placed in frame 20 displayed

Re: [Flashcoders] Re: External preloader using loadClip() - is it agood idea?

2007-06-19 Thread Alexander Farber
Hello Danny, On 6/19/07, Danny Kodicek [EMAIL PROTECTED] wrote: On 6/18/07, Alexander Farber [EMAIL PROTECTED] wrote: It should send an If-Modified-Since request to the web server and serve the .swf file only if the web server has replied with a 304 Not Modified. But instead the flash

Re: [Flashcoders] AS2.0 Class Question

2007-06-19 Thread Alexander Farber
Maybe by setting classpath in Publish settings-Flash ? On 6/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I don't really want to drop Class A into the folder where Class B is as there are about 15 other class files and SWF(A)/Class A doesn't really need them to run. Is there a way to avoid

[Flashcoders] Take movieclips from one mc and attach to another

2007-08-23 Thread Alexander Farber
Hello! I've found a nice code (pasted at the bottom of this mail) to display a rotating set of movieclips. One problem with it is though that it assumes a hardcoded set of 7 movieclips in the library, called 0, 1, ... 6 and attaches them to the stage by calling attachMovie(i, mc+i, i); I'd like

Re: [Flashcoders] Take movieclips from one mc and attach to another

2007-08-23 Thread Alexander Farber
in AS2. You could make your class control arbitrary MovieClips as if they were reparented with a lot of math and localToGlobal() calls, though. Probably not a great idea, though. On 8/23/07, Alexander Farber [EMAIL PROTECTED] wrote: MovieClip-based class which would take an arbitary array

[Flashcoders] How do you delete child movieclips?

2007-08-30 Thread Alexander Farber
Hello flash coders, what is your usual method for deleting child movieclips (which were previously attached by attachMovie)? I suspect, that the method I'm using: public function reset():Void { for (var key:String in this) if (typeof(this[key]) ==

[Flashcoders] Re: How do you delete child movieclips?

2007-08-30 Thread Alexander Farber
Here you can see my problem: http://preferans.de/flash/Ellipse.gif Sorry for a bit chaotic mail. I get ghost movieclips, but can't localize why it's happenning :-( Regards Alex On 8/27/07, Alexander Farber [EMAIL PROTECTED] wrote: I suspect, that the method I'm using: public

[Flashcoders] Re: How do you delete child movieclips?

2007-08-30 Thread Alexander Farber
I think I've figured it out now - I was assigning negative depth to some of the attached movies... On 8/27/07, Alexander Farber [EMAIL PROTECTED] wrote: I get ghost movieclips, but can't localize why it's happenning :-( ___ Flashcoders

Re: [Flashcoders] How do you delete child movieclips?

2007-09-12 Thread Alexander Farber
Thank you - a good idea! On 9/3/07, Steven Sacks [EMAIL PROTECTED] wrote: I highly recommend putting all your child clips into a container clip and then just remove the container clip rather than iterate through it and remove the child clips one by one.

[Flashcoders] Graphical resources in a v2 component - not visible

2008-01-07 Thread Alexander Farber
Hello, I'm programming a small card game, where most of the objects are packed as custom v2 components: playing cards, playing table, user avatars. And I have a very frustrating issue with the graphical resources. For example the Card component has a folder in its library, holding the card

Re: [Flashcoders] Graphical resources in a v2 component - not visible

2008-01-07 Thread Alexander Farber
Message - From: Alexander Farber [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, January 07, 2008 9:43 AM Subject: [Flashcoders] Graphical resources in a v2 component - not visible I'm programming a small card game, where most of the objects

Re: [Flashcoders] Graphical resources in a v2 component - not visible

2008-01-07 Thread Alexander Farber
Message - From: Alexander Farber [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Monday, January 07, 2008 10:57 AM Subject: Re: [Flashcoders] Graphical resources in a v2 component - not visible Hello Muzak, On Jan 7, 2008 10:13 AM, Muzak [EMAIL

Re: [Flashcoders] Is Key Object Changed With New Plugin Update?

2008-01-08 Thread Alexander Farber
On MSIE, don't you need to click the flash lugin first? On Jan 8, 2008 9:43 AM, [EMAIL PROTECTED] wrote: It works fine in Firefox, but this is related to IE 7,and it's fairly new. This is on Windows XP, I have not been able to test any other configs. It has to be something updated in IE7 or

[Flashcoders] Making a flash game safe for work

2008-01-08 Thread Alexander Farber
Hello flashcoders, I'm developing a small multiplayer card game in AS2 (and embedded in a phpBB 3 forum). I'd like to target corporate users too and have spent extra efforts to keep the game playable through proxies+firewalls. Additionally I'd like to offer an option to the users, so that they

[Flashcoders] AS3: non-latin characters not displayed

2008-12-22 Thread Alexander Farber
Dear flash coders, I'm porting a small russian card game from AS2 to AS3 and currently struggle with the problem that the playing card (which is a sprite) indices (which are TextFields) do not display cyrillic letters (for jack, queen, king, ace). The digits (7,8,9,10) are displayed just fine.

Re: [Flashcoders] AS3: non-latin characters not displayed

2008-12-22 Thread Alexander Farber
Thanks but neither On Mon, Dec 22, 2008 at 2:18 PM, Cor c...@chello.nl wrote: Change the indexN_txt.defaultTextFormat = BLACK; into indexN_txt.setTextFormat(BLACK); nor Quick guess: set indexN_txt.embedFonts = true; right after the ... NewTextField(); have worked for me. I've ended up

[Flashcoders] Scope of variables declared in for loop

2008-12-23 Thread Alexander Farber
Hello, has anybody else noticed, that the code like: stop(); for (var i:Number = 0; i 10; i++) { trace('1st loop: ' + i); } for (var i:Number = 0; i 10; i++) { trace('2nd loop: ' + i); } won't be accepted by compiler? Is there an explanation for that? The other languages

Re: [Flashcoders] Scope of variables declared in for loop

2008-12-23 Thread Alexander Farber
Hello, yes in AS3, but I think AS2 had the same irritating issue. Sure you can put var i:int above. But in many other languages (like C++, Java, Perl) you write something like for (my $i = 0; $i 10; $i++) { # XXX } an the scope of variable is limited to the loop only. Regards Alex On

Re: [Flashcoders] Scope of variables declared in for loop

2008-12-23 Thread Alexander Farber
How do you define a code section then? Regards Alex On Tue, Dec 23, 2008 at 11:25 AM, Paul Andrews p...@ipauland.com wrote: Is there an explanation for that? Flash doesn't scope the variables to the loop block, but to the code section. ___

[Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-23 Thread Alexander Farber
Hello, I have 2 classes: PlayingCard and PlayingTable. The PlayingCard listens on MOUSE_UP, DOWN and MOVE to call startDrag() and stopDrag(). I do not want to introduce custom events, so I try to subscribe the PlayingTable to MOUSE_MOVE and MOUSE_UP events of each PlayingCard, so that the table

Re: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-28 Thread Alexander Farber
Hello, may I please rephrase my question, maybe someone will have a hint for me? By my PlayingCard objects I'd like to dispatch 2 events: Event.CHANGE and MouseEvent.CLICK I do it because in my game you can drag cards, but also you can select them from a list and click a button. So I could use

[Flashcoders] AS3: Rotating menu - looking for advice with 3 issues

2009-01-09 Thread Alexander Farber
Hello guys, I'm struggling with my rotating menu and have prepared a short test case - please see http://pastebin.com/m40cf66ec and I'll also paste the code at the bottom of this mail. In my rotating menu I'd like to rotate button like objects in an ellipse. 1) I'd like to stop rotating if the

[Flashcoders] Re: AS3: Rotating menu - looking for advice with 3 issues

2009-01-10 Thread Alexander Farber
); } private function handleMouseOut(event:MouseEvent):void { addEventListener(Event.ENTER_FRAME, handleEnterFrame); } On Sat, Jan 10, 2009 at 7:45 PM, Alexander Farber set a variable on mouse click and stop rotating. ___ Flashcoders mailing list

[Flashcoders] Re: AS3: Rotating menu - looking for advice with 3 issues

2009-01-10 Thread Alexander Farber
I've figured out how to sort depths (added an Array for them) + set a variable on mouse click and stop rotating. Here is my rotating menu for the archives (one thing I still don't like is that because the objects on the bottom are scaled down the angle between them seems too big) package {

[Flashcoders] AS3: Custom button with text label not working perfectly

2009-01-17 Thread Alexander Farber
Dear flash coders, I'm struggling since a week already with several elements in my application not acting as I want them to do. And they all could be reduced to a rectangle button which has a TextField on top of it and which should lighten up on a mouse over and scale down on a mouse down event.

Re: [Flashcoders] AS3: Custom button with text label not working perfectly

2009-01-17 Thread Alexander Farber
Wow that was the missing piece, I've just fixed a lot of annoyances in my program :-) On Sat, Jan 17, 2009 at 1:55 PM, Cor c...@chello.nl wrote: MyButton.mouseChildren= false; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com

Re: [Flashcoders] AS3: Custom button with text label not working perfectly

2009-01-17 Thread Alexander Farber
Thank you Cor that was it! On Sat, Jan 17, 2009 at 1:55 PM, Cor c...@chello.nl wrote: MyButton.mouseChildren= false; ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

[Flashcoders] AS3: accessing loaderInfo.parameters.XXX from non-document class

2009-01-21 Thread Alexander Farber
Hello flash coders, in my document class I check loaderInfo.parameters.debug: public class MyGame extends Sprite { public static const DEBUG:Boolean = loaderInfo.parameters.debug; public static const SERVER:String = DEBUG ? 'http://192.168.111.43' : 'http://preferans.de';

Re: [Flashcoders] AS3: accessing loaderInfo.parameters.XXX from non-document class

2009-01-21 Thread Alexander Farber
= this.stage.loaderInfo.url; if ( -1 != _url.indexOf(file://)) { _path = . + _path; } _inited = true; } } Alexander Farber wrote: in my document class I check loaderInfo.parameters.debug: public class MyGame

[Flashcoders] updateAll event to notify List that dp changed - gone in AS3?

2009-01-23 Thread Alexander Farber
Hello, I'm porting a webchat-like application from AS2 to AS3 with a list of usernames displayed in a List component. In AS2 I had to save those usernames into an Array and then send an event updateAll to the List component to let it know that its dataProvider (an Array with webchat-usernames)

[Flashcoders] Adding a property to an AS3-component

2009-01-24 Thread Alexander Farber
Hello, is it actually possible to add a new property to an AS3-component, like button? I try: import fl.controls.Button; var button:Button = new Button(); button['old_item'] = 42; //button.old_item = 42; addChild(button); but get the run-time error: ReferenceError: Error #1056:

Re: [Flashcoders] Adding a property to an AS3-component

2009-01-26 Thread Alexander Farber
Thanks Dave, I've read up on it and understand this now. Too bad Flash docs do not mention which class is dynamic Regards Alex On Sat, Jan 24, 2009 at 6:14 PM, Dave Watts dwa...@figleaf.com wrote: is it actually possible to add a new property to an AS3-component, like button? In AS3,

Re: [Flashcoders] advice to ms word/xml

2009-03-05 Thread Alexander Farber
vim user here (I use :set encoding=utf8) On Thu, Mar 5, 2009 at 11:54 PM, Nate Beck n...@tldstudio.com wrote: . emacs ;) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

[Flashcoders] AS3: Troubles styling the List

2009-03-14 Thread Alexander Farber
Hello, I'm trying to change the font size in a fl.controls.List: private static const SMALL:TextFormat = new TextFormat('Arial', 18, 0x00); list = new List(); list.setStyle('textFormat', SMALL); but the size of the font in the List doesn't seem to change. Has

[Flashcoders] AS3: How to check if an URLVariables contains a field?

2009-03-31 Thread Alexander Farber
Hello, I have the following function called repeatedly: private function handleComplete(event:Event):void { var urlvars:URLVariables = event.target.data; . if (urlvars.lobby) { . } else if (urlvars.bids) {

[Flashcoders] AS3: if (urlvars.bids != null) trace(urlvars.bids); still prints null?

2009-04-09 Thread Alexander Farber
Hello, does anybody please have an idea, why would this code: private function handleComplete(event:Event):void { var urlvars:URLVariables = event.target.data; .. if (urlvars.bids != null urlvars.bids != 0) { trace(urlvars.bids); .

[Flashcoders] AS3: for-loop in a static initializer - Access of undefined property i

2009-04-12 Thread Alexander Farber
Hello, I have a static initializer in my class and it works ok: private static var BLACK:TextFormat = new TextFormat('Arial', 24, 0x00, true); private static var RED:TextFormat = new TextFormat('Arial', 24, 0xFF, true); // place 1 closer to 0 in the 10 string {

Re: [Flashcoders] AS3: for-loop in a static initializer - Access of undefined property i

2009-04-12 Thread Alexander Farber
On Sun, Apr 12, 2009 at 11:46 AM, Karl DeSaulniers k...@designdrumm.com wrote: //for (var i:uint = 0; i 10; i++) for (var i:int = 0; i 10; i++) Nope this doesn't change anything and also { var i:int; for (var i:int = 0; i 10; i++) trace(i); } won't work Regards

Re: [Flashcoders] AS3: for-loop in a static initializer - Access of undefined property i

2009-04-12 Thread Alexander Farber
Oops a typo: On Sun, Apr 12, 2009 at 11:58 AM, Alexander Farber alexander.far...@gmail.com wrote: Nope this doesn't change anything and also {      var i:int;      for (i = 0; i 10; i++)            trace(i); } won't work ___ Flashcoders

Re: [Flashcoders] AS3: for-loop in a static initializer - Access of undefined property i

2009-04-13 Thread Alexander Farber
and calling it seems a bit cleaner if you need some static initialization logic. Cheers Juan Pablo Califano 2009/4/12 Alexander Farber alexander.far...@gmail.com Hello, I have a static initializer in my class and it works ok: private static var BLACK:TextFormat = new TextFormat('Arial', 24

[Flashcoders] stop() not working

2009-05-24 Thread Alexander Farber
Hello, if I create a new Flash file (AS3), press F9 and enter stop(); trace(-); then it will print that line just once as expected. But if I enter: stop(); trace(-); var user:User = new User(); addChild(user); user.x = user.y = 200; user.userid = 53; user.username = 'Алекс';

Re: [Flashcoders] stop() not working

2009-05-24 Thread Alexander Farber
Thank you. Yes, I should investigate more myself. I was just hoping that maybe it's some known issue ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

[Flashcoders] No MOUSE_UP event when dragged under another sprite

2009-07-11 Thread Alexander Farber
Good day, I have a class representing draggable playing cards: public dynamic class Card extends Sprite { public function Card() { addEventListener(MouseEvent.MOUSE_DOWN, handleDown);

Re: [Flashcoders] No MOUSE_UP event when dragged under another sprite

2009-07-13 Thread Alexander Farber
Thank, that was it - stage.addEventListener(...) Found a good tutorial too: http://www.flashandmath.com/basic/dragdroptour/dd_tour2.html Regards Alex On Sun, Jul 12, 2009 at 2:59 AM, Andrei Thomazandreitho...@gmail.com wrote: on mouse down, you could add a listener to stage to MOUSE_UP event,

[Flashcoders] Sending 2 HTTP requests from a webchat-like app

2009-08-16 Thread Alexander Farber
Hello, I have a Flash+Perl/C multiplayer card game which works as a web chat on its backend: my Flash app sends a HTTP request every 15 seconds to the backend Apache module or earlier - if the user submits some action. All works solid, but of course a bit sluggish, because new infos come in only

[Flashcoders] Re: Sending 2 HTTP requests from a webchat-like app

2009-08-16 Thread Alexander Farber
Ok I had to enter about:config in Firefox and increase network.http.max-persistent-connections-per-server ( - that is at my development server. At my prod. server I will use multiple hostnames) Now I'm few steps further, but any good experiences/advices on 2 HTTP requests setups (1 blocking + 1

Re: [Flashcoders] CLICK event not getting fired

2009-08-18 Thread Alexander Farber
On Tue, Aug 18, 2009 at 6:22 AM, Sajid Saiyedsajid.fl...@gmail.com wrote: I should have given a bit more background. I am trying to detect a CLICK anywhere on the (blank) stage. Only when the user clicks somewhere on stage, I want to show something. How can I do this? Do I still need to

Re: [Flashcoders] Re: Sending 2 HTTP requests from a webchat-like app

2009-08-18 Thread Alexander Farber
On Mon, Aug 17, 2009 at 10:36 AM, Mick Gmix...@gmail.com wrote: You might want to think about using something more robust like smartfoxserver so you can not have the restrictions of http requests. I've been using is on a chat/whiteboard app for a while and it's an enormous performance increase

[Flashcoders] Missing wait(), notify(), sleep() in AS3

2009-08-21 Thread Alexander Farber
Hello, I have an AS3 app which continuously send HTTP requests to a server. If there is a HTTP request in progress already and it's not important (kind of I am alive event) I would like to cancel it. But if the ongoing request is important, I'd like to wait its completion before I send another

  1   2   >