[Flashcoders] Declaring Function Variables
What's the best practice for declaring reused variables within a function in AS3? For example, if you use "count" several times in your function, if you declare it at the start of your function, "var count:Number;" it makes it harder to cut and paste your code for use elsewhere but you get errors if redeclare it (like you could in AS2) throughout your script. David Benman Interactive Developer d...@dbenman.com http://www.dbenman.com (508) 954-1202 (cell) (315) 637-8487 (home office) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Declaring Function Variables
Declaring it within a function will make the variable LOCAL (= usage in that function only). You only declare it outside, once and (re)use it as often as you like. HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Benman Sent: vrijdag 8 januari 2010 12:16 To: Flash Coders List Subject: [Flashcoders] Declaring Function Variables What's the best practice for declaring reused variables within a function in AS3? For example, if you use "count" several times in your function, if you declare it at the start of your function, "var count:Number;" it makes it harder to cut and paste your code for use elsewhere but you get errors if redeclare it (like you could in AS2) throughout your script. David Benman Interactive Developer d...@dbenman.com http://www.dbenman.com (508) 954-1202 (cell) (315) 637-8487 (home office) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 08:35:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Declaring Function Variables
David Benman wrote: What's the best practice for declaring reused variables within a function in AS3? For example, if you use "count" several times in your function, if you declare it at the start of your function, "var count:Number;" it makes it harder to cut and paste your code for use elsewhere but you get errors if redeclare it (like you could in AS2) throughout your script. It's better towards the start, though I often declare them inline in loops (slapped wrist, probably). Since counts are whole numbers, it would really be better to use int or uint.. Paul David Benman Interactive Developer d...@dbenman.com http://www.dbenman.com (508) 954-1202 (cell) (315) 637-8487 (home office) ___ 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] Declaring Function Variables
Cor wrote: Declaring it within a function will make the variable LOCAL (= usage in that function only). You only declare it outside, once and (re)use it as often as you like. I would advise that it's best to avoid doing that. Most of the time it won't give you a problem, but then you'll spend some time trying to find out why that function call is messing up the loop count of the code it's called in. HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Benman Sent: vrijdag 8 januari 2010 12:16 To: Flash Coders List Subject: [Flashcoders] Declaring Function Variables What's the best practice for declaring reused variables within a function in AS3? For example, if you use "count" several times in your function, if you declare it at the start of your function, "var count:Number;" it makes it harder to cut and paste your code for use elsewhere but you get errors if redeclare it (like you could in AS2) throughout your script. David Benman Interactive Developer d...@dbenman.com http://www.dbenman.com (508) 954-1202 (cell) (315) 637-8487 (home office) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 08:35:00 ___ 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] Declaring Function Variables
Mmmm, I have never experienced any problems with it. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: vrijdag 8 januari 2010 12:47 To: Flash Coders List Subject: Re: [Flashcoders] Declaring Function Variables Cor wrote: > Declaring it within a function will make the variable LOCAL (= usage in that > function only). > You only declare it outside, once and (re)use it as often as you like. > I would advise that it's best to avoid doing that. Most of the time it won't give you a problem, but then you'll spend some time trying to find out why that function call is messing up the loop count of the code it's called in. > HTH > Cor > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Benman > Sent: vrijdag 8 januari 2010 12:16 > To: Flash Coders List > Subject: [Flashcoders] Declaring Function Variables > > What's the best practice for declaring reused variables within a > function in AS3? For example, if you use "count" several times in your > function, if you declare it at the start of your function, "var > count:Number;" it makes it harder to cut and paste your code for use > elsewhere but you get errors if redeclare it (like you could in AS2) > throughout your script. > > > David Benman > Interactive Developer > d...@dbenman.com > http://www.dbenman.com > (508) 954-1202 (cell) > (315) 637-8487 (home office) > > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 > 08:35:00 > > ___ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 08:35:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Declaring Function Variables
Cor wrote: Mmmm, I have never experienced any problems with it. It just means you havent used the same variable in a loop with nested functions that are also using the variable. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: vrijdag 8 januari 2010 12:47 To: Flash Coders List Subject: Re: [Flashcoders] Declaring Function Variables Cor wrote: Declaring it within a function will make the variable LOCAL (= usage in that function only). You only declare it outside, once and (re)use it as often as you like. I would advise that it's best to avoid doing that. Most of the time it won't give you a problem, but then you'll spend some time trying to find out why that function call is messing up the loop count of the code it's called in. HTH Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Benman Sent: vrijdag 8 januari 2010 12:16 To: Flash Coders List Subject: [Flashcoders] Declaring Function Variables What's the best practice for declaring reused variables within a function in AS3? For example, if you use "count" several times in your function, if you declare it at the start of your function, "var count:Number;" it makes it harder to cut and paste your code for use elsewhere but you get errors if redeclare it (like you could in AS2) throughout your script. David Benman Interactive Developer d...@dbenman.com http://www.dbenman.com (508) 954-1202 (cell) (315) 637-8487 (home office) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 08:35:00 ___ 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 08:35:00 ___ 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] Declaring Function Variables
OOOh, indeed, that would be a bad choice. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews Sent: vrijdag 8 januari 2010 13:16 To: Flash Coders List Subject: Re: [Flashcoders] Declaring Function Variables Cor wrote: > Mmmm, I have never experienced any problems with it. > It just means you havent used the same variable in a loop with nested functions that are also using the variable. > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews > Sent: vrijdag 8 januari 2010 12:47 > To: Flash Coders List > Subject: Re: [Flashcoders] Declaring Function Variables > > Cor wrote: > >> Declaring it within a function will make the variable LOCAL (= usage in >> > that > >> function only). >> You only declare it outside, once and (re)use it as often as you like. >> >> > I would advise that it's best to avoid doing that. Most of the time it > won't give you a problem, but then you'll spend some time trying to find > out why that function call is messing up the loop count of the code it's > called in. > >> HTH >> Cor >> >> -Original Message- >> From: flashcoders-boun...@chattyfig.figleaf.com >> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David >> > Benman > >> Sent: vrijdag 8 januari 2010 12:16 >> To: Flash Coders List >> Subject: [Flashcoders] Declaring Function Variables >> >> What's the best practice for declaring reused variables within a >> function in AS3? For example, if you use "count" several times in your >> function, if you declare it at the start of your function, "var >> count:Number;" it makes it harder to cut and paste your code for use >> elsewhere but you get errors if redeclare it (like you could in AS2) >> throughout your script. >> >> >> David Benman >> Interactive Developer >> d...@dbenman.com >> http://www.dbenman.com >> (508) 954-1202 (cell) >> (315) 637-8487 (home office) >> >> >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: >> > 01/07/10 > >> 08:35:00 >> >> ___ >> 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 > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 > 08:35:00 > > ___ > 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 08:35:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Declaring Function Variables
...Or if you like to perform a recursion (particular case of nesting). I do not belive there is a good way to re-declare a variable inside the scope of one function. (?) You could comment out vars, copy/paste them with active code and uncomment when needed; it is more a text editor issue: //var x:Number; //var y:Number; //var a:Number; a = x + y; I think that splitting long function bodies into separate short ones is a better idea. All local variables may be declared (and not re-declared) inside these short functions: var x = calcA( calB() + calcC() ) / calcD(); g Friday, January 08, 2010 (1:18:45 PM) Cor wrote: > OOOh, indeed, that would be a bad choice. > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews > Sent: vrijdag 8 januari 2010 13:16 > To: Flash Coders List > Subject: Re: [Flashcoders] Declaring Function Variables > Cor wrote: >> Mmmm, I have never experienced any problems with it. >> > It just means you havent used the same variable in a loop with nested > functions that are also using the variable. >> -Original Message- >> From: flashcoders-boun...@chattyfig.figleaf.com >> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul > Andrews >> Sent: vrijdag 8 januari 2010 12:47 >> To: Flash Coders List >> Subject: Re: [Flashcoders] Declaring Function Variables >> >> Cor wrote: >> >>> Declaring it within a function will make the variable LOCAL (= usage in >>> >> that >> >>> function only). >>> You only declare it outside, once and (re)use it as often as you like. >>> >>> >> I would advise that it's best to avoid doing that. Most of the time it >> won't give you a problem, but then you'll spend some time trying to find >> out why that function call is messing up the loop count of the code it's >> called in. >> >>> HTH >>> Cor >>> >>> -Original Message- >>> From: flashcoders-boun...@chattyfig.figleaf.com >>> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David >>> >> Benman >> >>> Sent: vrijdag 8 januari 2010 12:16 >>> To: Flash Coders List >>> Subject: [Flashcoders] Declaring Function Variables >>> >>> What's the best practice for declaring reused variables within a >>> function in AS3? For example, if you use "count" several times in your >>> function, if you declare it at the start of your function, "var >>> count:Number;" it makes it harder to cut and paste your code for use >>> elsewhere but you get errors if redeclare it (like you could in AS2) >>> throughout your script. >>> >>> >>> David Benman >>> Interactive Developer >>> d...@dbenman.com >>> http://www.dbenman.com >>> (508) 954-1202 (cell) >>> (315) 637-8487 (home office) >>> >>> >>> >>> ___ >>> Flashcoders mailing list >>> Flashcoders@chattyfig.figleaf.com >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> No virus found in this incoming message. >>> Checked by AVG - www.avg.com >>> Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: >>> >> 01/07/10 >> >>> 08:35:00 >>> >>> ___ >>> 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 >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: > 01/07/10 >> 08:35:00 >> >> ___ >> 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 > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.725 / Virus Database: 270.14.129/2605 - Release Date: 01/07/10 > 08:35:00 > ___ > 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] AIR configuration file
Does anyone have experience with custom application descriptor files and AIR? I'm using Flash CS4 to create an AIR application, and am unable to use a custom application descriptor file with it when I generate the program. I have based mine on the Adobe sample, and used the online Adobe tutorial - which makes it all seem very simple as is the way of all tutorials - to confgure it, but I keep getting errors (syntax usage errors with no indication as to what they might be, can't find an icon and indicating it is missing from a folder I have not identified as the icon folder) even when I use the simplest application descriptor file straight from the Adobe tutorial. I've even got the damn O'reilly AIR 1.5 Cookbook which is equally useless. There seems to be virtually nothing out there describing some of the errors I've had, and I can't begin to enumerate them. But here's one as an example: my xml node for the icons is straight from the sample and is icons\AIRApp_16.png icons\AIRApp_32.png icons\AIRApp_48.png icons\AIRApp_128.png However, an error is thrown telling me that it could not find the icon in a folder called "AppIconsForAIRPublish", not "icons". I even tried creating a folder with this name and copied the icons into it, but found that it was automatically deleted upon publishing and the same error thrown. I wouldn't bother with any of this customization but for the fact that my application needs to be full screen (it's a kiosk program) and AIRs idea of full screen still shows the chrome. Flash, of course, eliminates the bar at top with the min,max and restore buttons so that the interface is clean when full screen. No idea why AIR does it differently. If anyone could even simply point me to some half-decent documention out there for AIR using Flash, it would be greatly appreciated. Tony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] AIR configuration file
?? I can get my air app to go fullscreen - let me check Tony Fairfield wrote: Does anyone have experience with custom application descriptor files and AIR? I'm using Flash CS4 to create an AIR application, and am unable to use a custom application descriptor file with it when I generate the program. I have based mine on the Adobe sample, and used the online Adobe tutorial - which makes it all seem very simple as is the way of all tutorials - to confgure it, but I keep getting errors (syntax usage errors with no indication as to what they might be, can't find an icon and indicating it is missing from a folder I have not identified as the icon folder) even when I use the simplest application descriptor file straight from the Adobe tutorial. I've even got the damn O'reilly AIR 1.5 Cookbook which is equally useless. There seems to be virtually nothing out there describing some of the errors I've had, and I can't begin to enumerate them. But here's one as an example: my xml node for the icons is straight from the sample and is icons\AIRApp_16.png icons\AIRApp_32.png icons\AIRApp_48.png icons\AIRApp_128.png However, an error is thrown telling me that it could not find the icon in a folder called "AppIconsForAIRPublish", not "icons". I even tried creating a folder with this name and copied the icons into it, but found that it was automatically deleted upon publishing and the same error thrown. I wouldn't bother with any of this customization but for the fact that my application needs to be full screen (it's a kiosk program) and AIRs idea of full screen still shows the chrome. Flash, of course, eliminates the bar at top with the min,max and restore buttons so that the interface is clean when full screen. No idea why AIR does it differently. If anyone could even simply point me to some half-decent documention out there for AIR using Flash, it would be greatly appreciated. Tony ___ 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] AIR configuration file
I have always used this in my kiosk apps - whether they run in AIR or from a SWF they seem to behave. if (false == _env.isBrowser()) { fscommand("fullscreen", "true"); this.stage.displayState = StageDisplayState.FULL_SCREEN; } It seems to work okay because it't not in the browser and not restricted by the "have to press a button" rule. Tony Fairfield wrote: Does anyone have experience with custom application descriptor files and AIR? I'm using Flash CS4 to create an AIR application, and am unable to use a custom application descriptor file with it when I generate the program. I have based mine on the Adobe sample, and used the online Adobe tutorial - which makes it all seem very simple as is the way of all tutorials - to confgure it, but I keep getting errors (syntax usage errors with no indication as to what they might be, can't find an icon and indicating it is missing from a folder I have not identified as the icon folder) even when I use the simplest application descriptor file straight from the Adobe tutorial. I've even got the damn O'reilly AIR 1.5 Cookbook which is equally useless. There seems to be virtually nothing out there describing some of the errors I've had, and I can't begin to enumerate them. But here's one as an example: my xml node for the icons is straight from the sample and is icons\AIRApp_16.png icons\AIRApp_32.png icons\AIRApp_48.png icons\AIRApp_128.png However, an error is thrown telling me that it could not find the icon in a folder called "AppIconsForAIRPublish", not "icons". I even tried creating a folder with this name and copied the icons into it, but found that it was automatically deleted upon publishing and the same error thrown. I wouldn't bother with any of this customization but for the fact that my application needs to be full screen (it's a kiosk program) and AIRs idea of full screen still shows the chrome. Flash, of course, eliminates the bar at top with the min,max and restore buttons so that the interface is clean when full screen. No idea why AIR does it differently. If anyone could even simply point me to some half-decent documention out there for AIR using Flash, it would be greatly appreciated. Tony ___ 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] AIR configuration file
Thanks Glen, maybe that will do the trick. I've got the this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE line in there because there are inputs and other interactions needed. But I might just try the plain FULL_SCREEN and see what happens. Tony -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: January 8, 2010 10:38 AM To: Flash Coders List Subject: Re: [Flashcoders] AIR configuration file I have always used this in my kiosk apps - whether they run in AIR or from a SWF they seem to behave. if (false == _env.isBrowser()) { fscommand("fullscreen", "true"); this.stage.displayState = StageDisplayState.FULL_SCREEN; } It seems to work okay because it't not in the browser and not restricted by the "have to press a button" rule. Tony Fairfield wrote: > Does anyone have experience with custom application descriptor files and > AIR? I'm using Flash CS4 to create an AIR application, and am unable to > use a custom application descriptor file with it when I generate the > program. I have based mine on the Adobe sample, and used the online > Adobe tutorial - which makes it all seem very simple as is the way of > all tutorials - to confgure it, but I keep getting errors (syntax usage > errors with no indication as to what they might be, can't find an icon > and indicating it is missing from a folder I have not identified as the > icon folder) even when I use the simplest application descriptor file > straight from the Adobe tutorial. I've even got the damn O'reilly AIR > 1.5 Cookbook which is equally useless. There seems to be virtually > nothing out there describing some of the errors I've had, and I can't > begin to enumerate them. But here's one as an example: my xml node for > the icons is straight from the sample and is > > > > > > icons\AIRApp_16.png > > icons\AIRApp_32.png > > icons\AIRApp_48.png > > icons\AIRApp_128.png > > > > > > However, an error is thrown telling me that it could not find the icon > in a folder called "AppIconsForAIRPublish", not "icons". I even tried > creating a folder with this name and copied the icons into it, but found > that it was automatically deleted upon publishing and the same error > thrown. > > > > I wouldn't bother with any of this customization but for the fact that > my application needs to be full screen (it's a kiosk program) and AIRs > idea of full screen still shows the chrome. Flash, of course, eliminates > the bar at top with the min,max and restore buttons so that the > interface is clean when full screen. No idea why AIR does it > differently. > > > > If anyone could even simply point me to some half-decent documention out > there for AIR using Flash, it would be greatly appreciated. > > > > Tony > > ___ > 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] AIR configuration file
Try the fscommand thing too - you will need to import flash.system.fscommand; I think Tony Fairfield wrote: Thanks Glen, maybe that will do the trick. I've got the this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE line in there because there are inputs and other interactions needed. But I might just try the plain FULL_SCREEN and see what happens. Tony -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: January 8, 2010 10:38 AM To: Flash Coders List Subject: Re: [Flashcoders] AIR configuration file I have always used this in my kiosk apps - whether they run in AIR or from a SWF they seem to behave. if (false == _env.isBrowser()) { fscommand("fullscreen", "true"); this.stage.displayState = StageDisplayState.FULL_SCREEN; } It seems to work okay because it't not in the browser and not restricted by the "have to press a button" rule. Tony Fairfield wrote: Does anyone have experience with custom application descriptor files and AIR? I'm using Flash CS4 to create an AIR application, and am unable to use a custom application descriptor file with it when I generate the program. I have based mine on the Adobe sample, and used the online Adobe tutorial - which makes it all seem very simple as is the way of all tutorials - to confgure it, but I keep getting errors (syntax usage errors with no indication as to what they might be, can't find an icon and indicating it is missing from a folder I have not identified as the icon folder) even when I use the simplest application descriptor file straight from the Adobe tutorial. I've even got the damn O'reilly AIR 1.5 Cookbook which is equally useless. There seems to be virtually nothing out there describing some of the errors I've had, and I can't begin to enumerate them. But here's one as an example: my xml node for the icons is straight from the sample and is icons\AIRApp_16.png icons\AIRApp_32.png icons\AIRApp_48.png icons\AIRApp_128.png However, an error is thrown telling me that it could not find the icon in a folder called "AppIconsForAIRPublish", not "icons". I even tried creating a folder with this name and copied the icons into it, but found that it was automatically deleted upon publishing and the same error thrown. I wouldn't bother with any of this customization but for the fact that my application needs to be full screen (it's a kiosk program) and AIRs idea of full screen still shows the chrome. Flash, of course, eliminates the bar at top with the min,max and restore buttons so that the interface is clean when full screen. No idea why AIR does it differently. If anyone could even simply point me to some half-decent documention out there for AIR using Flash, it would be greatly appreciated. Tony ___ 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] hen's teeth...
A big +1 for the Head Start Design Patterns book. A "must read" for anyone wanting to write clean functional code. Saves days of reinventing poorly crafted wheels. Ron Bob Wohl wrote: This thread has been a good read. Over the years I've been tasked to write multiple server languages and I've learned a great deal from that. PHP, ASP, .NET, Java and now Grails. I haven't mastered any of them but I can understand them, write them and do it correctly. I suppose my next language after I master Grails should be C# since everyone says its pretty simple to pick up. I think the one language I've learned the most from is Java. The OOP lessons I've learned have really accelerated my AS3 development and approach. I kind of wish I would have read more Java related books when trying to learn AS3 as just going through the tutorials and reading design patterns (head start book) have opened my eyes on so many concepts and methods for programming. It really would have made learning OOP with AS3 so much easier. The big thing I look for when choosing a language to learn/write is "what can it do for me". On Tue, Jan 5, 2010 at 8:32 AM, Dave Watts wrote: I think Adobe is rather missing a trick in not having a stand-alone version of Actionscript. Really? AS3 is really just an environment-specific implementation of the latest JS specifications, along with class libraries that make sense in Flash Player. I don't think it really brings anything to the table that I can't get in C# or Java in other environments. Yes, you're right, but in the context of someone wanting to learn AS3 as a primary goal not general programming, such things aren't such an issue. I think you've been spoiled by your CS background, where you learned how to program before you learned how to solve domain-specific problems. I have interpreted the original question as "Do I need to learn language X to become an AS3 programmer" and the answer is most definitely "No". I didn't interpret the original question the same way, but if I had, I'd agree with you. There's no harm (and much to be gained) in learning subsequent languages once the principle concepts are grasped with the first language. What is a mistake is to try and learn two new languages at the same time and it would also be misleading to say that learning another language is a prerequisite for learning AS3. I'm not sure I agree with this. I think it can be useful to learn two languages simultaneously, and see the separation between language-specific syntax and algorithms, etc. But we can agree to disagree on this. You mention concurrency and that is something Adobe needs to address (I'm sure it won't be easy to make the Flash infrastructure thread safe) and we both know that it will improve performance greatly in the player where there are multiple cores available. I'm sure it will also swell the posting on flashcoders! I mentioned concurrency as an example, but there are lots of other examples I could have used instead. Currently it's necessary for developers to know Actionscript for Flash and Flex plus something else for server interaction. I'd rather see the second language being useful to allow people to complete their pipeline to the server than be a language that may not suit that well. It's also important in these economic climes, that the effort put in suits the market demand for expertise. It's unfortunate in some ways that Adobe haven't pushed the boat a little further with a good server-side actionscript implementation to make that access to data even easier. C# and Python are perfectly good languages for building web applications, though. PHP, on the other hand, isn't good for building anything but web applications. Plus, in my own opinion at least, C# and Python have more internal consistency in their design than PHP does - PHP is more a product of accretion than design, if you know what I mean. I'm not sure a server-side ActionScript implementation makes much sense from a business perspective, with all the very capable, mature, and commonly-used web application environments that already exist. A lot of people want to learn Actionscript and I'd rather they didn't think that they had to learn another language to do so, or mistakenly attempt to take on two new languages as an entry to programming at the same time. Well, that's all true if you want to learn ActionScript. But many people presumably want to learn AS in order to build web applications, which potentially involve all sorts of moving parts - AS, HTML and JS on the client, some application server in the middle, SQL on the database. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf So
[Flashcoders] archives?
Are there archives of this list since 2007? The only one I can find ends on Dec '07. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] archives?
> Are there archives of this list since 2007? The only one I can find ends on > Dec '07. No, there aren't. However, I will be moving the list to Google Groups at the end of some testing, so that we can keep archives in the future. I'm testing now with some other lists I manage first, as they get less traffic, etc. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] archives?
Andrew Sinning wrote: Are there archives of this list since 2007? The only one I can find ends on Dec '07. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders I'll email the messages to you, hold on.. ;-) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] [JOB] Flash Developer, London
Flash Developer (Junior/Middleweight) Stink Digital, an award-winning interactive production house located in Farringdon, is looking for a talented junior/middleweight Flash developer to become a key component of something great. You should be proactive, enthusiastic and have a passion for learning about and developing emergent technologies. Your attention to detail should be excellent, and you should be equally comfortable working alone on projects and in a larger team environment. Mostly, though, you should be passionate about doing world-class work with world-class people. Must-haves: Strong knowledge of AS3, OO, MVC and design patterns; Experience working with digital video as source material; Experience creating data driven Flash applications and widgets; Working knowledge of AJAX, DHTML, Javascript and CSS techniques, especially with respect to integration; Familiarity with source control systems such as Subversion as well as development environments such as FDT/Flex Builder. Nice to haves: Practical knowledge of a Flash-based 3D framework such as Papervision or Away3D; Practical experience with Flex, Adobe Air and PureMVC; Practical experience with interactive design, After Effects, software 3D packages or Unity 3D; Preference will be given to developers with additional languages, especially iPhone developers. Music lovers, film geeks, video gamers, culture nerds, cyclists and friends of the pub are all friends of ours. This position requires at least 2-4 years experience with Flash technologies, preferably in an agency or production company environment. Please submit CV and portfolio to jobs[at]stinkdigital.tv. Long time no post for me, but thought this might be a good audience for this ;) Awesome place to work. I've been flashing here for just over a year now and pretty much loved every minute. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Declaring Function Variables
The rule I follow (and one that I think is best for code readability) is that you declare a variable the first time you use it. If you're using it in multiple loops, you declare it above the first loop that uses it. This is a trivial example: private function foo(data:Array):void { var myVar:Boolean = true; var i:int; var len:int = data.length; for (i = 0; i < len; ++i) { if (data[i] == "") { myVar = false; break; } } if (myVar) { for (i = 0; i < len; ++i) { trace(data[i].length); } } } If you're copying and pasting those loops around, you really should consider learning how to write DRY code and use subroutines. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] A 3-way FMS chat rooms
Hello, how would you roughly implement video-chat rooms with up to 3 connected clients in a "room"? You would call nc.connect(roomNumner); and that argument would be available to the server side application.onConnect, correct? But what would you do next? I especially don't understand how to make the clients (re)establish video streams between each other, considering the clients come and go. For example you call ns.publish(XXX)/ns.play(YYY), but with which arguments? Please give me some overview (not the code, I'll write it myself) Thank you very much Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] A 3-way FMS chat rooms
Google FlashChat Karl Sent from losPhone On Jan 8, 2010, at 3:17 PM, Alexander Farber wrote: Hello, how would you roughly implement video-chat rooms with up to 3 connected clients in a "room"? You would call nc.connect(roomNumner); and that argument would be available to the server side application.onConnect, correct? But what would you do next? I especially don't understand how to make the clients (re)establish video streams between each other, considering the clients come and go. For example you call ns.publish(XXX)/ns.play(YYY), but with which arguments? Please give me some overview (not the code, I'll write it myself) Thank you very much Alex ___ 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] A 3-way FMS chat rooms
Have you tried it yourself? On Fri, Jan 8, 2010 at 10:44 PM, Karl DeSaulniers wrote: > Google FlashChat > > Karl > > On Jan 8, 2010, at 3:17 PM, Alexander Farber > wrote: > >> Hello, >> >> how would you roughly implement video-chat >> rooms with up to 3 connected clients in a "room"? >> >> You would call nc.connect(roomNumner); >> and that argument would be available >> to the server side application.onConnect, correct? >> >> But what would you do next? >> >> I especially don't understand how to make the clients (re)establish >> video streams between each other, considering the clients come and go. >> For example you call ns.publish(XXX)/ns.play(YYY), but with which >> arguments? >> >> Please give me some overview (not the code, I'll write it myself) >> >> Thank you very much >> Alex > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] A 3-way FMS chat rooms
Alexander Farber wrote: For example you call ns.publish(XXX)/ns.play(YYY), but with which arguments? I would just let the FMS side take of figuring that out. The movie can then just use whatever the FMS side tells it to use. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] A 3-way FMS chat rooms
An oldie but a goodie... Programming Flash Communication Server (Brian Lesser) walks you through this exact thing. http://www.amazon.com/dp/0596005040?tag=programmingfl-20&camp=14573&creative=327641&linkCode=as1&creativeASIN=0596005040&adid=1TBGR6KPT5NPEVWM4B4M&; Another option would be to purchase an Influxis (http://www.influxis.com) hosting account. Some are as low as $10 a month. They have a dozen or so pre-built applications that include source code, including multi-person video chat. Cheers, Nate On Fri, Jan 8, 2010 at 4:50 PM, Henrik Andersson wrote: > Alexander Farber wrote: >> >> For example you call ns.publish(XXX)/ns.play(YYY), but with which >> arguments? >> > > I would just let the FMS side take of figuring that out. The movie can then > just use whatever the FMS side tells it to use. > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- Cheers, Nate http://blog.natebeck.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] A 3-way FMS chat rooms
Yes. I made a chat room for a band once with it. nice admin functionalities. Now you will have to incorporate the video part, the one I worked with is just text chat. I think it shouldn't be too hard to take how its made and communicates and work the video part in, or there may be a FlashVideoChat out there now. I plan on doing this myself soon, just haven't yet. Karl On Jan 8, 2010, at 6:38 PM, Alexander Farber wrote: Have you tried it yourself? On Fri, Jan 8, 2010 at 10:44 PM, Karl DeSaulniers wrote: Google FlashChat Karl On Jan 8, 2010, at 3:17 PM, Alexander Farber wrote: Hello, how would you roughly implement video-chat rooms with up to 3 connected clients in a "room"? You would call nc.connect(roomNumner); and that argument would be available to the server side application.onConnect, correct? But what would you do next? I especially don't understand how to make the clients (re)establish video streams between each other, considering the clients come and go. For example you call ns.publish(XXX)/ns.play(YYY), but with which arguments? Please give me some overview (not the code, I'll write it myself) Thank you very much Alex ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders