RE: [Flashcoders] Where is everyone

2014-11-27 Thread Cor van Dooren
Due to problems with flashplayer on several devices, I completely switched
to HTML5/Javascript/PHP/etc.
Goodbye Flash. :-(

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John R.
Sweeney Jr.
Sent: donderdag 27 november 2014 19:10
To: Flash Coders List
Subject: [Flashcoders] Where is everyone

Since this list has gotten rather quite, where are people going to discuss
topics and problems.

Or ask for help. 

Thanks and H:)ppy Thanksgiving to everyone, John

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5577 / Virus Database: 4223/8643 - Release Date: 11/28/14

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Flash to HTML

2014-08-07 Thread Cor van Dooren
I did not follow the entire treat, but maybe you want to look at GSAP from
www.greensock.com

HTH
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Cohn
Sent: vrijdag 8 augustus 2014 1:46
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Flash to HTML

Hey all,

I've been looking a bit at CreateJS and Haxe/OpenFL, and since the question
was asked a while ago, and the list is rather slow, I thought I'd share some
further thoughts...

I've decided to go with CreateJS for now.  I was very excited about Haxe,
especially from the point of view of one source for multiple platforms, but
for heavily interactive Flash-style projects it just doesn't seem to be
quite there yet.  I'd love to be proven wrong(!), but here are the
shortcomings that I've found in my brief look:

1. Sprite/Bitmap detection -- it looks like mouse detection is on the
bounding box, so e.g. rollovers on arbitrarily shaped bitmaps is impossible.
(Well, you may be able to use hitTestPoint and some fancy gyrations, but...
eeech.)

2. Filter support -- seems weak and limited; e.g. GlowFilter isn't available
for the HTML5 target.

3. Ease of developing -- relatively minor, and single-source across targets
would easily outweigh this.  But with Haxe, firstly you have an extra step
(the build).  Then, Haxe seems somewhat monolithic:  it's good for handling
the core interactive canvas area, but the HTML has to live in a separate
file: Haxe rebuilds the HTML file each time and there doesn't seem to be a
good way to preserve custom HTML in the same file between builds.  Again,
not a show-stopper, but I find workflow quicker without the build, and
editing the HTML/JS directly.

CreateJS seems to work well across all browsers I've tested on so far (with,
of course, the exception of IE8)... as did Haxe.  

There may be retorts for all these criticisms, since I've only looked so
far... please feel free to contradict me!

Thanks,
--Dave



On Jun 24, 2014, at 9:00 AM, flashcoders-requ...@chattyfig.figleaf.com
wrote:

 On 23/06/2014 17:29, David Cohn wrote:
 Cedric,
 I've been here since the get-go... in digest mode, so most questions are
answered by the time I get them ;-)
 Thanks-- time to delve into Haxe-- I'm excited!
 --Dave
 
 
 I don't know how good it is but FDT have been involved with Haxe for a
long time...

http://fdt.powerflasher.com/w/index.php?title=Special:Searchns0=1redirs=0;
search=haxelimit=500offset=0
 
 John
 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4716 / Virus Database: 3986/7999 - Release Date: 08/07/14

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3 finally..

2013-05-27 Thread Cor
I use this for objects only needed in the scope of that particular class.
I don't know if this is the best solution...
I guess this depends on what you are trying to achieve.
It works for me.

Regards
Cor

On 27 May 2013 12:24, Paul A. p...@ipauland.com wrote:

 Out of curiosity, has anyone on the list actually used private classes 
 for anything other than enforcing singleton creation?

 If you have, please tell us and say why it was the best solution.



 On 27/05/2013 06:50, Cor wrote:

 I think they can be usefull to create objects with a lot of its own 
 functionality.
 In fact the same as you use a public classes: create objects, and you 
 can polymorphism the objects to your needs.
 I also think this will keep your code more readable and clean.
 HTH
 Cor

 -Original Message-
 From: 
 flashcoders-bounces@chattyfig.**figleaf.comflashcoders-bounces@chatt
 yfig.figleaf.com 
 [mailto:flashcoders-bounces@**chattyfig.figleaf.comflashcoders-bounc
 e...@chattyfig.figleaf.com]
 On Behalf Of Karl
 DeSaulniers
 Sent: maandag 27 mei 2013 1:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] AS3 finally..

 Thanks Ktu. That actually makes sense. I was not looking for a reason 
 necessarily to use a private class, but more so, saw this example and 
 had the though this must be a private class and wanted to verify 
 for my own understanding. Which you have provided. I see and 
 understand what you mean by it is not the most necessary thing to 
 create a private namespace class and that I will more then likely be 
 able to accomplish what i need through regular classes and never need 
 to set a private class up. Thank you for the clarification.

 Well. Finished Perkins, on to Moock.
 Actually getting excited... LoL

 Thanks again,

 Best,
 Karl

 Sent from losPhone

 On May 26, 2013, at 10:40 AM, ktu 
 ktu_flash@cataclysmicrewind.**comktu_fl...@cataclysmicrewind.com
 wrote:

  yes. this is an example of a private class. but as someone earlier
 mentioned, you shouldn't ever _need_ to use them. and it would be 
 more appropriate not to use them in production code. using the 
 internal namespace gives you some restriction, and you could even 
 use your own namespace for restriction but that's quite uncommon as well.

 for reference..
 - you cannot add a namespace to this 'private' class and should 
 result in a compile error if you do. (ex. public class CustomClient) 
 therefore, it must always be defined as 'class ClassName' with no

 namespace.

 - any classes that you need within this 'private' class must be 
 imported outside the package package com {
// code
 }
 import flash.display.Sprite
 class MySprite {
// code
 }
 - and if some outside object gets a reference to it, you should be 
 able to access public functions and properties so long as you do not 
 try to cast the object as anything other than Object.

 in my experience, i have yet to feel the need for a pseudo 'private'

 class.

 the internal namespace serves me well most and in a few occasions a 
 custom namespace was required.

 good luck :)


 On Sun, May 26, 2013 at 6:58 AM, Karl DeSaulniers

 k...@designdrumm.comwrote:

 Ok, I am understanding things a little better I believe. Quick
 question to solidify some knowledge. In reference to my question 
 about a private class, is the class CustomClient at the bottom an 
 example of a private class? It was mentioned that even if you don't 
 have the word private there and don't put public, flash 
 automatically will interpret it as a private class. It is inside 
 the class file but outside the package for the main class (which 
 was also mentioned), it does not have public on it so you can't 
 call it outside this file. This

 is what a private class is, correct?

 package {
 import flash.display.Sprite;
 import flash.events.NetStatusEvent;
 import flash.events.**SecurityErrorEvent;
 import flash.media.Video;
 import flash.net.NetConnection;
 import flash.net.NetStream;
 import flash.events.Event;

 public class NetConnectionExample extends Sprite {
 private var videoURL:String = 
 http://www.helpexamples.com/**flash/video/cuepoints.flvhttp://www.
 helpexamples.com/flash/video/cuepoints.flv
 ;
 private var connection:NetConnection;
 private var stream:NetStream;
 private var video:Video = new Video();

 public function NetConnectionExample() {
 connection = new NetConnection();
 
 connection.addEventListener(**NetStatusEvent.NET_STATUS,
 netStatusHandler);
 
 connection.addEventListener(**SecurityErrorEvent.SECURITY_*
 *ERROR,
 securityErrorHandler);
 connection.connect(null);
 }

 private function 
 netStatusHandler(event:**NetStatusEvent):void
 {
 switch (event.info.code) {
 case NetConnection.Connect.**Success:
 connectStream();
 break;
 case NetStream.Play

RE: [Flashcoders] AS3 finally..

2013-05-27 Thread Cor
As for my usage:
I create at any given moment one or more objects of the helper class within one 
or more functions in the containing class.

excuse the poor English, I am Dutch.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul A.
Sent: maandag 27 mei 2013 12:50
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 finally..

On 27/05/2013 11:37, tom rhodes wrote:
 i generally use them for something teeny tiny that is only needed in 
 the scope of the main class and doesn't feel right in it's own file as 
 it's never used anywhere but the main class.
Why wouldn't you just incorporate that functionality as part of the class? 
Helper methods that aren't necessarily intended for external use?

 On 27 May 2013 12:24, Paul A. p...@ipauland.com wrote:

 Out of curiosity, has anyone on the list actually used private 
 classes for anything other than enforcing singleton creation?

 If you have, please tell us and say why it was the best solution.



___
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 finally..

2013-05-26 Thread Cor
I think they can be usefull to create objects with a lot of its own
functionality.
In fact the same as you use a public classes: create objects, and you can
polymorphism the objects to your needs.
I also think this will keep your code more readable and clean.
HTH
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: maandag 27 mei 2013 1:22
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 finally..

Thanks Ktu. That actually makes sense. I was not looking for a reason
necessarily to use a private class, but more so, saw this example and had
the though this must be a private class and wanted to verify for my own
understanding. Which you have provided. I see and understand what you mean
by it is not the most necessary thing to create a private namespace class
and that I will more then likely be able to accomplish what i need through
regular classes and never need to set a private class up. Thank you for the
clarification. 

Well. Finished Perkins, on to Moock. 
Actually getting excited... LoL

Thanks again,

Best,
Karl

Sent from losPhone

On May 26, 2013, at 10:40 AM, ktu ktu_fl...@cataclysmicrewind.com wrote:

 yes. this is an example of a private class. but as someone earlier 
 mentioned, you shouldn't ever _need_ to use them. and it would be more 
 appropriate not to use them in production code. using the internal 
 namespace gives you some restriction, and you could even use your own 
 namespace for restriction but that's quite uncommon as well.
 
 for reference..
 - you cannot add a namespace to this 'private' class and should result 
 in a compile error if you do. (ex. public class CustomClient) 
 therefore, it must always be defined as 'class ClassName' with no
namespace.
 - any classes that you need within this 'private' class must be 
 imported outside the package package com {
   // code
 }
 import flash.display.Sprite
 class MySprite {
   // code
 }
 - and if some outside object gets a reference to it, you should be 
 able to access public functions and properties so long as you do not 
 try to cast the object as anything other than Object.
 
 in my experience, i have yet to feel the need for a pseudo 'private'
class.
 the internal namespace serves me well most and in a few occasions a 
 custom namespace was required.
 
 good luck :)
 
 
 On Sun, May 26, 2013 at 6:58 AM, Karl DeSaulniers
k...@designdrumm.comwrote:
 
 Ok, I am understanding things a little better I believe. Quick 
 question to solidify some knowledge. In reference to my question 
 about a private class, is the class CustomClient at the bottom an 
 example of a private class? It was mentioned that even if you don't 
 have the word private there and don't put public, flash automatically 
 will interpret it as a private class. It is inside the class file but 
 outside the package for the main class (which was also mentioned), it 
 does not have public on it so you can't call it outside this file. This
is what a private class is, correct?
 
 package {
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.Event;
 
public class NetConnectionExample extends Sprite {
private var videoURL:String = 
 http://www.helpexamples.com/flash/video/cuepoints.flv;;
private var connection:NetConnection;
private var stream:NetStream;
private var video:Video = new Video();
 
public function NetConnectionExample() {
connection = new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STATUS,
 netStatusHandler);

 connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
 securityErrorHandler);
connection.connect(null);
}
 
private function netStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case NetConnection.Connect.Success:
connectStream();
break;
case NetStream.Play.StreamNotFound:
trace(Stream not found:  + videoURL);
break;
}
}
 
private function
 securityErrorHandler(event:SecurityErrorEvent):void {
trace(securityErrorHandler:  + event);
}
 
private function connectStream():void {
addChild(video);
var stream:NetStream = new NetStream(connection);
stream.addEventListener(NetStatusEvent.NET_STATUS,
 netStatusHandler);
stream.client = new CustomClient();
video.attachNetStream(stream);
stream.play(videoURL);
}
}
 }
 
 class CustomClient {
public function onMetaData(info:Object):void {
trace(metadata: duration= + info.duration +  width

RE: [Flashcoders] AS3 finally..

2013-05-21 Thread Cor
Karl,

One: why doesn't ActionScript 3 allow private classes?
A: They are useless because they couldn't be used, I guess.
You can use a Class within a public class which then would be private to
that class it self.

Two: why is writing public class a best practice if private class does
not exist?
Look a the variations with static etc.

HTH
Cor




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3

2012-10-25 Thread Cor
Hi Jason,

Me too. :-)

Be sure to look at http://www.greensock.com/get-started-js/

regards
Cor van Dooren
The Netherlands


 Merrill schreef:
I'm about to start my first HTML5/CSS3/Javascript job - wish me luck! :) Going 
through a lot of courses on Lynda.com - completed some Javascript courses and 
jQuery, now enjoying Lee Brimlow's HTML 5 For Flash Developers course right 
now. Good stuff - I wish Javascript was a more advanced language but it has 
some pretty cool features.

 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning 
 703.302.9265 (w/h)





___

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers
Sent: Thursday, October 25, 2012 9:59 AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3

Yay!
I just completed my first AS3 job Go Me!

:P

Best,
Karl


On Oct 25, 2012, at 8:48 AM, John R. Sweeney Jr. wrote:

 And we'll be there again, I'm sure... :)

 John

 John R. Sweeney Jr.
 Senior Interactive Multimedia Developer OnDemand Interactive Inc 
 Hoffman Estates, IL 60169




 On Oct 25, 2012, at 3:15 AM, Paul A. wrote:

 No worries - we've all been there.


 ___
 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

--
This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited. 
Unless specifically indicated, this message is not an offer to sell or a 
solicitation of any investment products or other financial product or service, 
an official confirmation of any transaction, or an official statement of 
Sender. Subject to applicable law, Sender may intercept, monitor, review and 
retain e-communications (EC) traveling through its networks/systems and may 
produce any such EC to regulators, law enforcement, in litigation and as 
required by law. 
The laws of the country of each sender/recipient may impact the handling of EC, 
and EC may be archived, supervised and produced in countries other than the 
country in which you are located. This message cannot be guaranteed to be 
secure or free of errors or viruses. 

References to Sender are references to any subsidiary of Bank of America 
Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are 
Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a 
Condition to Any Banking Service or Activity * Are Not Insured by Any Federal 
Government Agency. Attachments that are part of this EC may have additional 
important disclosures and disclaimers, which you should read. This message is 
subject to terms available at the following link: 
http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you 
consent to the foregoing.
___
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

2012-10-24 Thread Cor
Hi Karl, 
 
Hahahaha, AS3 is very much easier then AS2. 
But can be a little tricky to grasp when you are switching. 
Believe me, once you see the structure, you don't understand that AS2 has ever 
existed. 
 
First the Q: How do you use a button instead of a MC. 
There is no difference, they are both Objects with each some specific 
properties. 
The button is in fact a movieclip with just a timeline of 4 states. 
I recommend never to use Flash Components(!). 
Create youre own button or movieclip. 
When you create a graphic and transform (F8) it into a Symbol you can choose to 
set it as a MC or Button. 
I prefer MC always and write my own class to deal with the states. 
I will send you some examples in a following mail. 
 
In this mail I will address your code problem as is. 
I always look at code to see if something is redundant. 
So if there is ANYTHING I discover is present more then once, I create 
something 
so there is only 1 of it, and reuse that as often as needed. 
 
In your case I can't see if the buttons are put on stage phisically or with 
code. 
I always use code only, my stage stays empty and I have no frames on the 
timeline! 
My guess is that in this case the buttons are already on the stage, so I will 
set the code as follows: 
 
//put all the button names in this array 
var aButtons:Array = [ button1_btn, button2_btn]; 
var idx:int = -1;  //no button selected yet 
 
for (var i:uint = 0; i  aButtons.length; ++i){ 
 aButtons[i].buttonMode = true; 
 aButtons[i]..mouseChildren = false; 
 aButtons[i].addEventListener(MouseEvent.CLICK, btnClickHandler, false, 0, 
true); 
 aButtons[i].addEventListener(MouseEvent.ROLL_OVER, btnOverHandler, false, 0, 
true); 
 aButtons[i].addEventListener(MouseEvent.ROLL_OUT, btnOutHandler, false, 0, 
true); 
} 
 
function btnClickHandler(e:MouseEvent):void{  
 //get the position in the array of the clicked button 
 idx = aButtons.indexof(e.target); 
 switch (idx) { 
case 0: 
this.gotoAndStop(divinedivers); //goto frame divinedivers in this MC 
break; 
case 1: 
this.gotoAndStop(scubadudes); //got frame scubadudes in this MC 
break; 
 } 
} 
 
function btnOverHandler(e:MouseEvent):void { 
 //get the position in the array of the clicked button 
 idx = aButtons.indexof(e.target); 
//RENAME THE FRAME TO 'over' !! 
aButtons[idx].gotoAndStop(over); //toggle this button MC frame 
} 
function btnOutHandler(e:MouseEvent):void { 
 //get the position in the array of the clicked button 
 idx = aButtons.indexof(e.target); 
//RENAME THE FRAME TO 'out' !! 
aButtons[idx].gotoAndStop(out); //toggle this button MC frame 
} 
 
I typed this instantly in this mail, so watch for a possible typo? 
I go to dinner now, and create and send the promised examples after that. 
 
If you have problems with the code above, please tell me. 
For simplicity, I suggest mailing a FLA to eachother. 
 
regards 
Cor 


 Karl DeSaulniers k...@designdrumm.com schreef:
Hello All,
Long time. If your available at the moment, I could use your help with  
some AS3.
I finally got an AS3 job! Yay! But I am stuck on the most simple of  
things.
All I am trying to do is make some buttons work... lol
Here is my code.

button1_btn.buttonMode = true;
button2_btn.buttonMode = true;
button1_btn.useHandCursor = true;
button2_btn.useHandCursor = true;
button1_btn.mouseChildren = false;
button2_btn.mouseChildren = false;

button1_btn.addEventListener(MouseEvent.CLICK, function()  
{ changeSelect(1); });
button2_btn.addEventListener(MouseEvent.CLICK, function()  
{ changeSelect(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OVER, function()  
{ toggleB1(2); });
button2_btn.addEventListener(MouseEvent.ROLL_OVER, function()  
{ toggleB2(2); });
button1_btn.addEventListener(MouseEvent.ROLL_OUT, function()  
{ toggleB1(1); });
button2_btn.addEventListener(MouseEvent.ROLL_OUT, function()  
{ toggleB2(1); });

function changeSelect(p):void {
switch (p) {
case 1:
this.gotoAndStop(divinedivers); //goto frame 
divinedivers in this  
MC
break;
case 2:
this.gotoAndStop(scubadudes); //got frame scubadudes 
in this MC
break;
}
}

function toggleB1(f):void {
button1_btn.gotoAndStop(f); //toggle this button MC frame
}

function toggleB2(f):void {
button2_btn.gotoAndStop(f); //toggle this button MC frame
}

Why does AS3 have to make things so difficult for something so simple??
What the heck am I doing wrong???

Also, how do you use just a button instead of a mc?
I tried using just a button and it wouldn't even switch to the over  
state that is inside the button!!?

AS2 is just so much more simple... sigh*

TIA,

Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http

Re: [Flashcoders] AS3

2012-10-24 Thread Cor
Karl,

, false, 0, true);

I need the false, 0, to get to the third param.
Which when set (weak reference) to true gives the garbage collector the 
oppurtunity to clear the listener and free up resources.
Not necessary but I like to clean up.

@Being that this is a clients FLA, I am not able to email my FLA.

No no, I don't want you to send clients FLA, but create a mock up with the 
problem/question, which I can adjust and send back.
This makes understanding the problem much easier.

Sleep tight, don't let 

Cor

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3

2012-10-24 Thread Cor
try this:

divers_btn.addEventListener(MouseEvent.ROLL_OVER, function(e:MouseEvent):void  
{ e.target.gotoAndStop(OVER);});



 Karl DeSaulniers k...@designdrumm.com schreef:
So will this work?

divers_btn.addEventListener(MouseEvent.ROLL_OVER, function()  
{ this.gotoAndStop(OVER);});

I mean. Will this = divers_btn? or do I HAVE to specify   
divers_btn.gotoAndStop()?
After all I am applying the listener to it.

@jason Not that I am going to continue with annon functions, just  
currious.

Basically, I am trying to set up the listener for the buttons to be  
generic for the buttons hover states.
Then specify data for the click state per button.

So if
button1_btn.addEventListener(MouseEvent.ROLL_OUT, toggleB1(1));
doesnt work, how do I specify which frame to move to.
Trying to set up a toggle if you will. I DONT want to have to create a  
function for EVERY state for EVERY button I have.
That just seems stupid to me to have to do. Very bloated IMO.

Best,

Karl


On Oct 24, 2012, at 2:58 PM, Hans Wichman wrote:

 Hi Karl,

 when you are starting with as3: whatever works :)).

 Basically both will work (anon and nonanon (double wow)), but  
 anonymous is harder (read impossible) to remove.
 So if you create a view that exists throughout the lifetime of the  
 app, with buttons that do the same, either way will work.
 If you are creating and removing a lot of buttons, I'd skip  
 anonymous, and nicely removely the listeners when done.

 button1_btn.addEventListener(MouseEvent.ROLL_OUT, toggleB1(1)); will  
 not work because you are registering the result of the toggleB1(1)  
 call, which in most cases will not be a function reference.

 What you wanted to do is something like the old as2 proxy or  
 delegate call, which you can recreate in as3 and would result in  
 something like:
 button1_btn.addEventListener(MouseEvent.ROLL_OUT, Proxy.create  
 (toggleB1, [1]));
 Thing is, as3 is going to pass event objects as arguments as well,  
 so this is getting more complicated than its worth real fast.

 But I would do myself a favor and pick up actionscript 3  
 essentials and actionscript 3 cookbook. Doesn't take too long to  
 get through them and saves you a lot and a lt of  
 frustration :)

 hth
 jc

 On 24-10-2012 21:49, Karl DeSaulniers wrote:
 OH? What is the best coding standards way?
 I used an annon function because

 button1_btn.addEventListener(MouseEvent.ROLL_OUT, toggleB1(1));

 Does not work.

 Karl


 On Oct 24, 2012, at 8:43 AM, Merrill, Jason wrote:

 function() { gotoAndStop(divinedivers); });

 Yeah, this is weird and unnecessary. Anonymous functions are  
 recommended against in AS3.

 Jason Merrill
 Instructional Technology Architect II
 Bank of America  Global Learning
 703.302.9265 (w/h)





 ___

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [mailto:flashcoders-boun...@chattyfig.figleaf.com 
 ] On Behalf Of Paul A.
 Sent: Wednesday, October 24, 2012 8:33 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] AS3

 Try removing:

 button1_btn.mouseChildren = false;
 button2_btn.mouseChildren = false;

 Your code is a bit convoluted!

 divers_btn.addEventListener(MouseEvent.CLICK, function()  
 { gotoAndStop(divinedivers); });  
 scuba_btn.addEventListener(MouseEvent.CLICK, function()  
 { gotoAndStop(scubadudes); });

 divers_btn.addEventListener(MouseEvent.ROLL_OVER, function()  
 { divers_btn.gotoAndStop(OVER);});
 ..

 Paul

 On 24/10/2012 12:39, Karl DeSaulniers wrote:
 Hello All,
 Long time. If your available at the moment, I could use your help  
 with
 some AS3.
 I finally got an AS3 job! Yay! But I am stuck on the most simple of
 things.
 All I am trying to do is make some buttons work... lol Here is my
 code.

 button1_btn.buttonMode = true;
 button2_btn.buttonMode = true;
 button1_btn.useHandCursor = true;
 button2_btn.useHandCursor = true;
 button1_btn.mouseChildren = false;
 button2_btn.mouseChildren = false;

 button1_btn.addEventListener(MouseEvent.CLICK, function() {
 changeSelect(1); }); button2_btn.addEventListener(MouseEvent.CLICK,
 function() { changeSelect(2); });
 button1_btn.addEventListener(MouseEvent.ROLL_OVER, function() {
 toggleB1(2); }); button2_btn.addEventListener(MouseEvent.ROLL_OVER,
 function() { toggleB2(2); });
 button1_btn.addEventListener(MouseEvent.ROLL_OUT, function() {
 toggleB1(1); }); button2_btn.addEventListener(MouseEvent.ROLL_OUT,
 function() { toggleB2(1); });

 function changeSelect(p):void {
   switch (p) {
   case 1:
   this.gotoAndStop(divinedivers); //goto frame
 divinedivers in this MC
   break;
   case 2:
   this.gotoAndStop(scubadudes); //got frame scubadudes in
 this MC
   break;
   }
 }

 function toggleB1(f):void {
   button1_btn.gotoAndStop(f); //toggle this button MC frame }

 function toggleB2(f):void {
   button2_btn.gotoAndStop(f); //toggle this button MC frame }

 Why does AS3 have to make things 

RE: [Flashcoders] AS live coding demo

2012-09-23 Thread Cor
Thanks, I like it!!!


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ivan Dembicki
Sent: zaterdag 22 september 2012 14:51
To: Flash Coders List
Subject: [Flashcoders] AS live coding demo

Hello,

Wow!
http://www.youtube.com/watch?v=caux7Uh2BK0


-- 
Ivan Dembicki
http://realaxy.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2221 / Virus Database: 2441/5286 - Release Date: 09/22/12


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] HTML in Datagrid component

2012-08-08 Thread Cor
Thanks Karl!

Unfortuneatly it crashes the same way.

I think I have to search for a solution how to display html-encoded string
in a datagrid?

Best regards,
Cor van Dooren

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 7 augustus 2012 22:02
To: Flash Coders List
Subject: Re: [Flashcoders] HTML in Datagrid component

Shooting in the dark, but try this.

function stringToMysqlFormat($original_input) {
  //for inserting the data INTO mysql
  $original_input =  
urlencode(stripslashes($original_input));
  $string = mysql_real_escape_string($original_input);
  return $string;
}

function mysqlToHTMLFormat($encoded) {
  //for displaying the data FROM mysql
  $html = htmlspecialchars(urldecode($encoded));
  return $html;
}

Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5183 - Release Date: 08/07/12

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] HTML in Datagrid component

2012-08-08 Thread Cor
Hi Karl,

:-) This is exactly what I did in the first mail, or do I miss something??
Original:
function stringToMysqlFormat($original_input) {
//for inserting the data with special characters INTO mysql
$html_encoded =
htmlentities(mysql_real_escape_string($original_input));
return $html_encoded;
}
function mysqlToHTMLFormat($encoded) {
//for displaying the data FROM mysql
$html_decoded = html_entity_decode(stripslashes($encoded));
return $html_decoded;
}

Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: woensdag 8 augustus 2012 9:02
To: Flash Coders List
Subject: Re: [Flashcoders] HTML in Datagrid component

Ooh Sry, brain fart.. :P
Try this..

function stringToMysqlFormat($original_input) {
  //for inserting the data INTO mysql
  $my_string =
html_entities(mysql_real_escape_string($original_input));
  return $my_string;
}

function mysqlToHTMLFormat($encoded) {
  //for echoing the data FROM mysql
  $my_html = html_entity_decode(stripslashes($encoded));
  return $my_html;
}

Not that it matters all the time, but I stay away from php variables that
are the same name as a code in any other lang. IE String or HTML.
Just forgot as I was writing last time. Damn auto-pilot. :)

HTH,

Best,
Karl
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5185 - Release Date: 08/07/12

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] HTML in Datagrid component

2012-08-08 Thread Cor
 de inhoud
foreach ($recordArray[$i] as $key = $value) {
writeItem($key, $value);
}
$xmlOutput .= \t/mat\n;
}
$xmlOutput.='/materialen';

//--- USERDATA ZONDER ACCOUNT_TYPE EN WACHTWOORD !
$sql = SELECT user_id, voorletters, tussenvoegsel, achternaam,
uurloon FROM tbl_users;
$result = mysql_query($sql);
$recordArray = array();
//maak assoc array om fieldnames als XML-tags te gebruiken
while ($row = mysql_fetch_assoc ($result)) {
array_push($recordArray, $row);
}
$xmlOutput.='users';
for ($i=0; $icount($recordArray); $i++) {
//echo $recordArray[$i]['id'];
$xmlOutput .= \tuser\n;
// $key is de assoc fieldname en $value de inhoud
foreach ($recordArray[$i] as $key = $value) {
writeItem($key, $value);
}
$xmlOutput .= \t/user\n;
}
$xmlOutput.='/users';

//sluit de root tag
$xmlOutput .= /data;
print returnXML=.$xmlOutput;  
}

//End READ PROJECT 

//
function stringToMysqlFormat($original_input) {
//for inserting the data with special characters INTO mysql
$html_encoded =
htmlentities(mysql_real_escape_string($original_input));
return $html_encoded;
}
function mysqlToHTMLFormat($encoded) {
//for displaying the data FROM mysql
$html_decoded = html_entity_decode(stripslashes($encoded));
return $html_decoded;
}
function writeItem($k, $v) {
global $xmlOutput;
$xmlOutput .= \t\t . $k .  . mysqlToHTMLFormat($v) . / . $k
. \n;
}


Best regards,
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: woensdag 8 augustus 2012 9:02
To: Flash Coders List
Subject: Re: [Flashcoders] HTML in Datagrid component

Ooh Sry, brain fart.. :P
Try this..

function stringToMysqlFormat($original_input) {
  //for inserting the data INTO mysql
  $my_string =
html_entities(mysql_real_escape_string($original_input));
  return $my_string;
}

function mysqlToHTMLFormat($encoded) {
  //for echoing the data FROM mysql
  $my_html = html_entity_decode(stripslashes($encoded));
  return $my_html;
}

Not that it matters all the time, but I stay away from php variables that
are the same name as a code in any other lang. IE String or HTML.
Just forgot as I was writing last time. Damn auto-pilot. :)

HTH,

Best,
Karl
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5185 - Release Date: 08/07/12

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] HTML in Datagrid component

2012-08-08 Thread Cor
Hello Karl,

Because the code is never to be reused, I have put it all-in-one.
But I agree on creating separate functions.
Before I go into that I would like to solve my datagrid issue first.

I thought using it is common to use double quotes when handling strings and
single quotes when code needs to be parsed?
Are there side effects to be expected when using only single quotes?

From php.net is where I have got this so far.
Also http://www.w3schools.com is very helpful.

Thanks very much for all your help!!!

Best regards,
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: woensdag 8 augustus 2012 11:12
To: Flash Coders List
Subject: Re: [Flashcoders] HTML in Datagrid component

Hey Cor,
One thing I noticed was the string $xmlOutput was switching between single
and double quotes. Probably want to stick to one or the other.

Excuse the re-write, but this is how I would write that php.
Don't know if it works as I can not test, but try this code and let me know
what you get.
Also, you may want to separate each call to the database into separate
functions.

IE:
function getProjects() {
}
function getUserData() {
}
function getMaterials() {
}
$projects = getProjects();
$userdata = getUserData();
$materials = getMaterials();
etc..
then have a function that puts together the XML results.

function createXML($projects, $userdata, $materials) {
}

Your call on that though.
If the code I gave does not work, try taking a look here to see if you  
can find a solution for the special characters.

http://php.net/manual/en/function.htmlspecialchars.php

php.net is gold!  Best of luck!

:)

Hope everybody doesn't mind the php convo being a flash list.
If so message me personally Cor.

//CODE --

?php
/ Read Project /
if (isset($_POST['sendRequest'])  $_POST['sendRequest'] ==  
read_project)
{
$xmlOutput = ;
$project_nummer = ;
$project_klantnummer = ;

$currentTable = tbl_projecten;
if ($_POST['isParticulier'] == ja) {
$currentTable = tbl_particulier_projecten;
}
$project_nummer = $_POST['project_nummer'];

$xmlOutput = ?xml version=\1.0\ encoding=\UTF-8\ ?;
$xmlOutput .= \ndata;

//---PROJECTGEGEVENS
$sql = SELECT * FROM .mysql_real_escape_string($currentTable).
WHERE  
project_nummer 
=.htmlentities(mysql_real_escape_string($project_nummer));
$result = mysql_query($sql);
$recordArray = array();
//maak assoc array om fieldnames als XML-tags te gebruiken
while ($row = mysql_fetch_assoc($result)) {
array_push($recordArray, $row);
}
for ($i=0; $icount($recordArray); $i++) {
//echo $recordArray[$i]['id'];
$xmlOutput .= \tproject\n;
// $key is de assoc fieldname en $value de inhoud
foreach ($recordArray[$i] as $key = $value) {
$xmlOutput .= \t\t . $key .  .  
htmlspecialchars(stripslashes($value), ENT_QUOTES, UTF-8) . / .  
$key . \n;
if($key == project_klantnummer){
$project_klantnummer = $value;
}//end if
}//end foreach
$xmlOutput .= \t/project\n;
}

//--- KLANTGEGEVENS
$sql = SELECT * FROM tbl_klanten
WHERE
klant_nummer=.mysql_real_escape_string($project_klantnummer);
$result = mysql_query($sql);
$recordArray = array();
//maak assoc array om fieldnames als XML-tags te gebruiken
while ($row = mysql_fetch_assoc($result)) {
array_push($recordArray, $row);
}
for ($i=0; $icount($recordArray); $i++) {
//echo $recordArray[$i]['id'];
$xmlOutput .= \tklant\n;
// $key is de assoc fieldname en $value de inhoud
foreach ($recordArray[$i] as $key = $value) {
$xmlOutput .= \t\t . $key .  .  
htmlspecialchars(stripslashes($value), ENT_QUOTES, UTF-8) . / .  
$key . \n;
}
$xmlOutput .= \t/klant\n;
}

//--- MATERIALENVERBRUIK
$currentTable = tbl_materialen_verbruik;
if ($_POST['isParticulier'] == ja) {
$currentTable = tbl_particulier_materialen_verbruik;
}   
$sql = SELECT * FROM .mysql_real_escape_string($currentTable).
WHERE  
mv_projectnummer 
=.htmlentities(mysql_real_escape_string($project_nummer));
$result = mysql_query($sql);
$recordArray = array();
//maak assoc array om fieldnames als XML-tags te gebruiken
while ($row = mysql_fetch_assoc($result)) {
array_push

RE: [Flashcoders] HTML in Datagrid component

2012-08-07 Thread Cor
Thanks Karl,

stripslashes crashes the application.
It goes wrong on name-value pair in the URLVariables.

I use characters like ë, é, etc.
My textfields render as HTML and everything works as I expected.
But, I also use the Datagrid component and in there these is shown like
Atilde;laquo;

Yes, I know, don't use components...
But the harm is done and I can't go back.

Regards
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 7 augustus 2012 4:19
To: Flash Coders List
Subject: Re: [Flashcoders] HTML in Datagrid component

try this.

function stringToMysqlFormat($original_input) {
  //for inserting the data INTO mysql
  $original_input = stripslashes($original_input);
  $string = mysql_real_escape_string($original_input);
  return $string;
}

function mysqlToHTMLFormat($encoded) {
  //for displaying the data FROM mysql
  $html = htmlspecialchars($encoded);
  return $html;
}


On Aug 6, 2012, at 6:15 PM, Karl DeSaulniers wrote:

 Yes and no.
 That is your SQL insert statement, which is good to know, but I was 
 referring to the value of $original_input.
 Or is that statement the value of $original_input?

 What has the html special characters in it?

 Best,
 Karl


 On Aug 6, 2012, at 3:39 PM, Cor wrote:

 Does this hel:

 INSERT INTO `tbl_projecten` (`project_nummer`, `project_werk`, 
 `project_betreft`, `project_datum`, `project_klantnummer`, 
 `project_ordernummer_klant`, `project_contactpersoon`, 
 `project_opdracht`, `project_aanneemsom`, `project_conform`, 
 `project_besteldatum`, `project_BTW`, `project_betaling_binnen`, 
 `project_kleuren`,
 `project_rekeningtekst`) VALUES
 (1, 'Entree', 'Aanbrengen van glasweefsel en het sausen daarvan', 
 '19-11-2011', 24, '0005873-0016178', '', 'order', '5.953,44', 
 'bestelling',
 '11 november 2011', '19', '14', '', '');


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: maandag 6 augustus 2012 22:02
 To: Flash Coders List
 Subject: Re: [Flashcoders] HTML in Datagrid component

 Can you post what some data looks like before you put it into mysql?


 On Aug 6, 2012, at 8:52 AM, Cor wrote:

 Hi All,

 I am having a problem with loading data correctly in my Datagrid.

 User input data is stored in MySQL through PHP with these functions:

 function stringToMysqlFormat($original_input) {
  //for inserting the data with special characters INTO 
 mysql
  $html_encoded =
 htmlentities(mysql_real_escape_string($original_input));
  return $html_encoded;
 }
 function mysqlToHTMLFormat($encoded) {
  //for displaying the data FROM mysql
  $html_decoded =
 html_entity_decode(stripslashes($encoded));
  return $html_decoded;
 }

 It works OK in all the textfields, but not in my Datagrid.
 Then it shows like the HTML formatted way: Atilde; etc.

 How to solve this?


 Best regards,
 Cor van Dooren

 ___
 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


 -
 No virus found in this message.
 Checked by AVG - www.avg.com
 Version: 2012.0.2197 / Virus Database: 2437/5181 - Release Date:  
 08/06/12

 ___
 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

Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5183 - Release Date: 08/07/12


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] HTML in Datagrid component

2012-08-06 Thread Cor
Hi All,
 
I am having a problem with loading data correctly in my Datagrid.
 
User input data is stored in MySQL through PHP with these functions:
 
function stringToMysqlFormat($original_input) {
//for inserting the data with special characters INTO mysql
$html_encoded =
htmlentities(mysql_real_escape_string($original_input));
return $html_encoded;
}
function mysqlToHTMLFormat($encoded) {
//for displaying the data FROM mysql
$html_decoded = html_entity_decode(stripslashes($encoded));
return $html_decoded;
}
 
It works OK in all the textfields, but not in my Datagrid.
Then it shows like the HTML formatted way: Atilde; etc.
 
How to solve this?
 
 
Best regards,
Cor van Dooren
 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] HTML in Datagrid component

2012-08-06 Thread Cor
Does this hel:

INSERT INTO `tbl_projecten` (`project_nummer`, `project_werk`,
`project_betreft`, `project_datum`, `project_klantnummer`,
`project_ordernummer_klant`, `project_contactpersoon`, `project_opdracht`,
`project_aanneemsom`, `project_conform`, `project_besteldatum`,
`project_BTW`, `project_betaling_binnen`, `project_kleuren`,
`project_rekeningtekst`) VALUES
(1, 'Entree', 'Aanbrengen van glasweefsel en het sausen daarvan',
'19-11-2011', 24, '0005873-0016178', '', 'order', '5.953,44', 'bestelling',
'11 november 2011', '19', '14', '', '');


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: maandag 6 augustus 2012 22:02
To: Flash Coders List
Subject: Re: [Flashcoders] HTML in Datagrid component

Can you post what some data looks like before you put it into mysql?


On Aug 6, 2012, at 8:52 AM, Cor wrote:

 Hi All,

 I am having a problem with loading data correctly in my Datagrid.

 User input data is stored in MySQL through PHP with these functions:

 function stringToMysqlFormat($original_input) {
//for inserting the data with special characters INTO 
 mysql
$html_encoded =
 htmlentities(mysql_real_escape_string($original_input));
return $html_encoded;
 }
 function mysqlToHTMLFormat($encoded) {
//for displaying the data FROM mysql
$html_decoded =
 html_entity_decode(stripslashes($encoded));
return $html_decoded;
 }

 It works OK in all the textfields, but not in my Datagrid.
 Then it shows like the HTML formatted way: Atilde; etc.

 How to solve this?


 Best regards,
 Cor van Dooren

 ___
 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


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2197 / Virus Database: 2437/5181 - Release Date: 08/06/12

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Button events under mc

2012-07-09 Thread Cor
Which version of Flash do you have?


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of natalia
Vikhtinskaya
Sent: maandag 9 juli 2012 21:02
To: Flash Coders List
Subject: Re: [Flashcoders] Button events under mc

http://www.mightybook.com/test/test.fla
http://www.mightybook.com/test/test.swf
If mouse exactly  over the text the button has even OUT. It is not correct.

2012/7/9 Hans Wichman hans.wich...@gmail.com:
 Hi Natalia,

 you probably need to set mouseChildren and mouseEnabled of the 
 overlying movieclip to false.

 hth,
 h


 On 9-7-2012 20:00, natalia Vikhtinskaya wrote:

 Hi to all.
 I have button under Movie clip. In AS3  button  does not have events 
 OVER or CLICK in place where is this mc. In AS2 that worked without 
 such problem. How can I have button events on entire button ?

 Thank in advance.
 ___
 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] Button events under mc

2012-07-09 Thread Cor
Here is my solution:
http://www.codobyte.com/Nathalia/

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan
Mynarcik
Sent: maandag 9 juli 2012 21:36
To: Flash Coders List
Subject: Re: [Flashcoders] Button events under mc

Try MOUSE_OVER instead of ROLL_OVER.

Also, leave the mouseEnabled/mouseChildren set to false for whatever is on
top of the button.




On Mon, Jul 9, 2012 at 3:24 PM, natalia Vikhtinskaya
natavi.m...@gmail.comwrote:

 Yes I tried mouseEnabled for the text. That does not help.
 I can not put button over the text because on OVER yellow block should 
 be under text. For some reason I also can not put text in each button.

 2012/7/9 Hans Wichman hans.wich...@gmail.com:
  so did you disable the mouseEnabled of the text?
 
 
  On 9-7-2012 21:11, natalia Vikhtinskaya wrote:
 
  CS5.5
 
  2012/7/9 Cor c...@chello.nl:
 
  Which version of Flash do you have?
 
 
  -Original Message-
  From: flashcoders-boun...@chattyfig.figleaf.com
  [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
 natalia
  Vikhtinskaya
  Sent: maandag 9 juli 2012 21:02
  To: Flash Coders List
  Subject: Re: [Flashcoders] Button events under mc
 
  http://www.mightybook.com/test/test.fla
  http://www.mightybook.com/test/test.swf
  If mouse exactly  over the text the button has even OUT. It is not 
  correct.
 
  2012/7/9 Hans Wichman hans.wich...@gmail.com:
 
  Hi Natalia,
 
  you probably need to set mouseChildren and mouseEnabled of the 
  overlying movieclip to false.
 
  hth,
  h
 
 
  On 9-7-2012 20:00, natalia Vikhtinskaya wrote:
 
  Hi to all.
  I have button under Movie clip. In AS3  button  does not have 
  events OVER or CLICK in place where is this mc. In AS2 that 
  worked without such problem. How can I have button events on entire
button ?
 
  Thank in advance.
  ___
  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 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] MVC style Correction

2012-03-07 Thread Cor
I have an example of that.
If you wish I can send it to you

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: woensdag 7 maart 2012 21:16
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

So a view can possibly have its own MVC within it? As long as the view is
the only one using the data?

View Controller
View Model
View View

Or am I interp. this incorrectly?

Best,
Karl


On Mar 7, 2012, at 10:29 AM, John McCormack wrote:

 Issues which have not been resolved has to do with how the logic is 
 distributed amongst MVC partners.

 So if anyone comes across an example in which they are uncertain, 
 please let us hear about it.

 On that subject, the book by Joel Hooks' and Lindsey Fallow:  
 ActionScript Developers Guide to RobotLegs:
 http://shop.oreilly.com/product/0636920021216.do

 says...

 As to whether checking an email address is valid view logic or 
 application logic, there's no fixed answer.
 A good filter is that if only the view classes care about this logic, 
 it belongs in your view layer.
 If other parts of the application need to be checked or informed, it's 
 controller code.

 John

 On 07/03/2012 15:50, Paul Andrews wrote:
 On 07/03/2012 15:37, Ross Sclafani wrote:
 yay me!

 Indeed!

 Your MVC introductory example was superb.

 Paul

 Ross P. Sclafani
 design / technology / creative

 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani
 http://www.linkedin.com/in/rosssclafani
 [347] 204.5714




 let go of even your longest held beliefs, the only truth is in 
 observation.

 On Mar 7, 2012, at 10:27 AM, David Hunter wrote:

 Hi all,

 Really pleased that my original question has generated so much 
 positive discussion, debate and learning on MVC. For me it has 
 certainly shed some light on different ways to implement it and 
 probably some improvements or different approaches I could take in 
 the future.

 Currently I connect them all together exactly as Ross has his set 
 up in his first example. Although I may experiment with some 
 slightly different approaches or try out a framework.

 Regards,

 David


 On 7 March 2012 07:25, Corc...@chello.nl  wrote:

 +1

 Best regards,
 Cor van Dooren

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 John McCormack
 Sent: dinsdag 6 maart 2012 21:30
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 Absolutely agree, so thank you everyone - very much.
 Each day I look for more.

 As a result of people talking about RobotLegs I bought and today 
 received Joel Hooks' ActionScript Developers Guide to RobotLegs.

 A new direction - which I am thankful for.

 John

 On 06/03/2012 18:57, Kevin Newman wrote:
 Also, this thread has helped to flesh out my understanding of MVC 
 to a substantial degree. I love that. :-)

 Kevin N.


 On 3/6/12 11:40 AM, Kevin Newman wrote:
 That's how I understand MVC anyway.
 ___
 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



 --
 David Hunter

 www.davidhunterdesign.com
 +44 (0) 7869 104 906
 ___
 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

Karl DeSaulniers
Design Drumm
http://designdrumm.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


RE: [Flashcoders] MVC style Correction

2012-03-07 Thread Cor
Instead of sending, everyone can get it here:

www.codobyte.com/MVC.zip

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: woensdag 7 maart 2012 21:16
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

So a view can possibly have its own MVC within it? As long as the view is
the only one using the data?

View Controller
View Model
View View

Or am I interp. this incorrectly?

Best,
Karl


On Mar 7, 2012, at 10:29 AM, John McCormack wrote:

 Issues which have not been resolved has to do with how the logic is 
 distributed amongst MVC partners.

 So if anyone comes across an example in which they are uncertain, 
 please let us hear about it.

 On that subject, the book by Joel Hooks' and Lindsey Fallow:  
 ActionScript Developers Guide to RobotLegs:
 http://shop.oreilly.com/product/0636920021216.do

 says...

 As to whether checking an email address is valid view logic or 
 application logic, there's no fixed answer.
 A good filter is that if only the view classes care about this logic, 
 it belongs in your view layer.
 If other parts of the application need to be checked or informed, it's 
 controller code.

 John

 On 07/03/2012 15:50, Paul Andrews wrote:
 On 07/03/2012 15:37, Ross Sclafani wrote:
 yay me!

 Indeed!

 Your MVC introductory example was superb.

 Paul

 Ross P. Sclafani
 design / technology / creative

 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani
 http://www.linkedin.com/in/rosssclafani
 [347] 204.5714




 let go of even your longest held beliefs, the only truth is in 
 observation.

 On Mar 7, 2012, at 10:27 AM, David Hunter wrote:

 Hi all,

 Really pleased that my original question has generated so much 
 positive discussion, debate and learning on MVC. For me it has 
 certainly shed some light on different ways to implement it and 
 probably some improvements or different approaches I could take in 
 the future.

 Currently I connect them all together exactly as Ross has his set 
 up in his first example. Although I may experiment with some 
 slightly different approaches or try out a framework.

 Regards,

 David


 On 7 March 2012 07:25, Corc...@chello.nl  wrote:

 +1

 Best regards,
 Cor van Dooren

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 John McCormack
 Sent: dinsdag 6 maart 2012 21:30
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 Absolutely agree, so thank you everyone - very much.
 Each day I look for more.

 As a result of people talking about RobotLegs I bought and today 
 received Joel Hooks' ActionScript Developers Guide to RobotLegs.

 A new direction - which I am thankful for.

 John

 On 06/03/2012 18:57, Kevin Newman wrote:
 Also, this thread has helped to flesh out my understanding of MVC 
 to a substantial degree. I love that. :-)

 Kevin N.


 On 3/6/12 11:40 AM, Kevin Newman wrote:
 That's how I understand MVC anyway.
 ___
 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



 --
 David Hunter

 www.davidhunterdesign.com
 +44 (0) 7869 104 906
 ___
 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

Karl DeSaulniers
Design Drumm
http://designdrumm.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


RE: [Flashcoders] MVC style Correction

2012-03-06 Thread Cor
+1 !!!

Oh, would I love to see this too!!


Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 6 maart 2012 10:26
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

@Ross

The more and more we all talk about this, and I get to see examples, the
more I would like to see a working example of yours.
I really like the simplicity and flow of your idea and with your permission,
like to try out your style of MVC based off your example.
My idea is to leverage the MVC into just 3 classes M: V: and C: and nothing
more.
(I am probably crazy but this little itch I have now will not go away) But
because I have a disconnect on how the MVC is applied to an actual
application I can not get grips on where to start.
I feel that ANY actionscript one creates should be simplistic in nature and
I feel that for any project you can fit everything into just a model a view
or a controller.
Or at least I'd like to try and test my theory... :)

Please dont call me crazy, you'll just be spinning your SWFWheels.

PS: by no means am I saying that anyone else's examples are crude or wrong.
I have no stance to say such.
Just a heart felt feeling I have that amongst the confusion of how its done
correctly, there is a simplistic solution that everyone may be overlooking.
That NEO if you will.

On Mar 5, 2012, at 6:05 PM, Karl DeSaulniers wrote:

 Thanks Cor.


 On Mar 5, 2012, at 4:26 AM, Cor wrote:

 @Karl,

 I just created my first MVC and it is still in progress...
 Lots of fun!

 This video helped me a lot!
 http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

 Unfortuneatly the tutor mentions Controller can update View, but that 
 example is not included.
 If anyone can give me a little example of how that is done in MVC, 
 don't hasitate. :-)

 best regards
 Cor van Dooren
 The Netherlands

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: maandag 27 februari 2012 11:19
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 That actually makes a lot of sense to me and I haven't written one 
 MVC yet.
 Thanks for the break-down!
 In relation to what Henrik said about using adaptors, I see the sub 
 controllers as the adaptors, but they are not actually adaptors, just 
 sub controllers with targets to the main controller.
 Yes?

 Best,
 Karl


 On Feb 27, 2012, at 1:16 AM, Ross Sclafani wrote:

 thanks, its just how i do MVC

 it really get interesting when you follow a mitosis development 
 pattern... You start with one model, controller, and view, add 
 features to each in parallel, and as each class gets too big, you 
 break them out into subcontrollers, submodels, and subviews. Then 
 sub-sub. My projects have a triple-tree structure branching out from 
 the core model, controller, and view classes

 finer granularity as you reach further in, and always broken into M, 
 V, and C:

 Models contain properties only. they dispatch a CHANGE Event every 
 time one of their properties change,.

 Views display properties of the model. they listen for the CHANGE 
 Event, and update their appearance with the new values stored in the 
 model every time it changes.

 Controllers manipulate properties of the model. Whether trigger by 
 event handlers in the views, or internal timers or network activity, 
 any command that sets any value of any property of the model is 
 placed in a controller. Controllers might use other controllers to 
 trigger changes in submodels outside its subdomain

 the project starts off very compact, then grows with its 
 functionality as required, always growing out from the center so you 
 never paint yourself into a corner

 then later to optimize, you can get specific about which submodel a 
 particular view is listening to, in turn limiting the number of 
 change events it receives to those actually represented in the view.

 all subcontrollers hold a reference to the root controller, so it is 
 easy to target any node on the controller tree from anywhere inside 
 of it.

 same with the model tree. some submodel properties can emit the 
 CHANGE Event only on a local level, and not send the event up the 
 hierarchy, isolating the scope of view updates

 An MVC Example

 FLVPlayback is an interesting MVC  component:

 it holds a NetStream as a model of the video

 it holds a Video as a view of the Video

 It acts as controller to set the model in motion by connecting it to 
 a stream

 the ui is also a view of the video: the percent elapsed is 
 represented n the scrub bar, ther is a play button while paused, a 
 pause button while playing, then there are the time readouts..

 if the video its playing,
 the user clicks pause in the view,
 it tells the controller to pause the stream

RE: [Flashcoders] MVC style Correction

2012-03-06 Thread Cor
My guess is the view needs the reference to the controller, because it
invokes function in there to update the model through the controller.
I am not a OOP or MVC specialist, and know nothing more as showed in the
video, so don't shoot me!


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 6 maart 2012 11:08
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

Forgive me if I am wrong, but I watched that video and it confused me.
The gentleman started creating the view first then made the model and had
the interaction between the two then went and created the controller and in
creating the controller took away some code from the view that the model
handled and gave it to the controller. He also had the view having reference
to the model and controller.

var model:Model = new Model();
var controller:Controller = new Controller(model); var view:View = new
View(model, controller);

shouldn't it be..

var controller:Controller = new Controller(); var model:Model = new
Model(controller); var view:View = new View(model);

?

Trying to wrap my head around this.
Thanks for this video though Cor!
It helped me see a real example so far of how to implement a MVC.


Best,
Karl


On Mar 5, 2012, at 7:00 AM, Cor wrote:

 Thanks Paul,

 In the documentation I read there is mostly the View telling the 
 Controller an event has taken place.
 The View holds e reference of the Model and the Controller.
 Look at :
 http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/a
 ctions cript/pdfs/ora_as3_design_patterns_ch12.pdf

 on page number 429 (is the 11th page of this file)

 So I have create this in my Document class like this:

   var model:Model = Model.getInstance(); //Singleton
   var controller:Controller = new Controller(model);
   var view:View = new View(model, controller,
this.stage);
   addChild(view);


 To check if I understand you correctly, you would do something like  
 this:

   var model:Model = Model.getInstance(); //Singleton
   var view:View = new View(model,  this.stage);
   var controller:Controller = new Controller(model,
 view);
   addChild(view);

 And in the view instance, instead of my way:

   private function btn_clickHandler(e:MouseEvent):void {

   
 controller.setValueInModel(arrayButtons.indexOf(e.target));
   }

   private function btn_clickHandler(e:MouseEvent):void {

   myPublicVar = arrayButtons.indexOf(e.target);
   dispatchEvent(new Event(View.MY_CUSTOM_EVENT));
   }   

 Ofcourse the Controller would then have a listener :  
 view.addEventListener(
 View.MY_CUSTOM_EVENT, callback_function);

 Correct???

 Regards
 Cor

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul  
 Andrews
 Sent: maandag 5 maart 2012 13:31
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 On 05/03/2012 10:26, Cor wrote:
 @Karl,

 I just created my first MVC and it is still in progress...
 Lots of fun!

 This video helped me a lot!
 http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

 Unfortuneatly the tutor mentions Controller can update View, but that
 example is not included.
 If anyone can give me a little example of how that is done in MVC,
 don't hasitate. :-)

 I don't think the controller should be updating the view. Period.  
 Nor do I
 think that the view should be calling methods of the controller class.

 One of the main benefits of MVC is separation of concerns. Views  
 shouldn't
 care about controllers, controllers should care about views.

 My views dispatch events about their changes and the controller  
 listens for
 the events, not caring which view dispatched it.
 The controller updates the model, and the view listens for changes  
 in the
 model.

 There are several ways to build the MVC pattern. The video shows one  
 way,
 but really it shows a coupling that shouldn't be as tight as it is  
 and the
 idea of a controller updating a view, is a no-no.

 Sometimes people use a micro-mvc architecture within a view to  
 control it -
 no problem about that, but we should keep our MVC components as  
 separate
 black boxes.

 Paul
 best regards
 Cor van Dooren
 The Netherlands

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
 DeSaulniers
 Sent: maandag 27 februari 2012 11:19
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 That actually makes a lot of sense to me and I haven't written one  
 MVC
 yet.
 Thanks for the break

RE: [Flashcoders] MVC style Correction

2012-03-06 Thread Cor
You could ofcourse take another approach:
In the view:
 dispatchEvent(new Event(View.YOURVIEWEVENT));

and in the Contoller:

View.addEventListener(View.YOURVIEWEVENT, callback);

So there is a loose coupling as Paul wrote.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 6 maart 2012 11:08
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

Forgive me if I am wrong, but I watched that video and it confused me.
The gentleman started creating the view first then made the model and had
the interaction between the two then went and created the controller and in
creating the controller took away some code from the view that the model
handled and gave it to the controller. He also had the view having reference
to the model and controller.

var model:Model = new Model();
var controller:Controller = new Controller(model); var view:View = new
View(model, controller);

shouldn't it be..

var controller:Controller = new Controller(); var model:Model = new
Model(controller); var view:View = new View(model);

?

Trying to wrap my head around this.
Thanks for this video though Cor!
It helped me see a real example so far of how to implement a MVC.


Best,
Karl


On Mar 5, 2012, at 7:00 AM, Cor wrote:

 Thanks Paul,

 In the documentation I read there is mostly the View telling the 
 Controller an event has taken place.
 The View holds e reference of the Model and the Controller.
 Look at :
 http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/a
 ctions cript/pdfs/ora_as3_design_patterns_ch12.pdf

 on page number 429 (is the 11th page of this file)

 So I have create this in my Document class like this:

   var model:Model = Model.getInstance(); //Singleton
   var controller:Controller = new Controller(model);
   var view:View = new View(model, controller,
this.stage);
   addChild(view);


 To check if I understand you correctly, you would do something like  
 this:

   var model:Model = Model.getInstance(); //Singleton
   var view:View = new View(model,  this.stage);
   var controller:Controller = new Controller(model,
 view);
   addChild(view);

 And in the view instance, instead of my way:

   private function btn_clickHandler(e:MouseEvent):void {

   
 controller.setValueInModel(arrayButtons.indexOf(e.target));
   }

   private function btn_clickHandler(e:MouseEvent):void {

   myPublicVar = arrayButtons.indexOf(e.target);
   dispatchEvent(new Event(View.MY_CUSTOM_EVENT));
   }   

 Ofcourse the Controller would then have a listener :  
 view.addEventListener(
 View.MY_CUSTOM_EVENT, callback_function);

 Correct???

 Regards
 Cor

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul  
 Andrews
 Sent: maandag 5 maart 2012 13:31
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 On 05/03/2012 10:26, Cor wrote:
 @Karl,

 I just created my first MVC and it is still in progress...
 Lots of fun!

 This video helped me a lot!
 http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

 Unfortuneatly the tutor mentions Controller can update View, but that
 example is not included.
 If anyone can give me a little example of how that is done in MVC,
 don't hasitate. :-)

 I don't think the controller should be updating the view. Period.  
 Nor do I
 think that the view should be calling methods of the controller class.

 One of the main benefits of MVC is separation of concerns. Views  
 shouldn't
 care about controllers, controllers should care about views.

 My views dispatch events about their changes and the controller  
 listens for
 the events, not caring which view dispatched it.
 The controller updates the model, and the view listens for changes  
 in the
 model.

 There are several ways to build the MVC pattern. The video shows one  
 way,
 but really it shows a coupling that shouldn't be as tight as it is  
 and the
 idea of a controller updating a view, is a no-no.

 Sometimes people use a micro-mvc architecture within a view to  
 control it -
 no problem about that, but we should keep our MVC components as  
 separate
 black boxes.

 Paul
 best regards
 Cor van Dooren
 The Netherlands

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
 DeSaulniers
 Sent: maandag 27 februari 2012 11:19
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 That actually makes a lot of sense to me and I haven't written one  
 MVC
 yet.
 Thanks for the break-down

RE: [Flashcoders] MVC style Correction

2012-03-06 Thread Cor
+1

Best regards,
Cor van Dooren

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John
McCormack
Sent: dinsdag 6 maart 2012 21:30
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

Absolutely agree, so thank you everyone - very much.
Each day I look for more.

As a result of people talking about RobotLegs I bought and today received
Joel Hooks' ActionScript Developers Guide to RobotLegs.

A new direction - which I am thankful for.

John

On 06/03/2012 18:57, Kevin Newman wrote:
 Also, this thread has helped to flesh out my understanding of MVC to a 
 substantial degree. I love that. :-)

 Kevin N.


 On 3/6/12 11:40 AM, Kevin Newman wrote:
 That's how I understand MVC anyway. 

 ___
 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] MVC style Correction

2012-03-05 Thread Cor
@Karl,

I just created my first MVC and it is still in progress...
Lots of fun!

This video helped me a lot!
http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

Unfortuneatly the tutor mentions Controller can update View, but that
example is not included.
If anyone can give me a little example of how that is done in MVC, don't
hasitate. :-)

best regards
Cor van Dooren
The Netherlands

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: maandag 27 februari 2012 11:19
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

That actually makes a lot of sense to me and I haven't written one MVC yet.
Thanks for the break-down!
In relation to what Henrik said about using adaptors, I see the sub
controllers as the adaptors, but they are not actually adaptors, just sub
controllers with targets to the main controller.
Yes?

Best,
Karl


On Feb 27, 2012, at 1:16 AM, Ross Sclafani wrote:

 thanks, its just how i do MVC

 it really get interesting when you follow a mitosis development 
 pattern... You start with one model, controller, and view, add 
 features to each in parallel, and as each class gets too big, you 
 break them out into subcontrollers, submodels, and subviews. Then 
 sub-sub. My projects have a triple-tree structure branching out from 
 the core model, controller, and view classes

 finer granularity as you reach further in, and always broken into M, 
 V, and C:

 Models contain properties only. they dispatch a CHANGE Event every 
 time one of their properties change,.

 Views display properties of the model. they listen for the CHANGE 
 Event, and update their appearance with the new values stored in the 
 model every time it changes.

 Controllers manipulate properties of the model. Whether trigger by 
 event handlers in the views, or internal timers or network activity, 
 any command that sets any value of any property of the model is placed 
 in a controller. Controllers might use other controllers to trigger 
 changes in submodels outside its subdomain

 the project starts off very compact, then grows with its functionality 
 as required, always growing out from the center so you never paint 
 yourself into a corner

 then later to optimize, you can get specific about which submodel a 
 particular view is listening to, in turn limiting the number of change 
 events it receives to those actually represented in the view.

 all subcontrollers hold a reference to the root controller, so it is 
 easy to target any node on the controller tree from anywhere inside of 
 it.

 same with the model tree. some submodel properties can emit the CHANGE 
 Event only on a local level, and not send the event up the hierarchy, 
 isolating the scope of view updates

 An MVC Example

 FLVPlayback is an interesting MVC  component:

 it holds a NetStream as a model of the video

 it holds a Video as a view of the Video

 It acts as controller to set the model in motion by connecting it to a 
 stream

 the ui is also a view of the video: the percent elapsed is represented 
 n the scrub bar, ther is a play button while paused, a pause button 
 while playing, then there are the time readouts..

 if the video its playing,
 the user clicks pause in the view,
 it tells the controller to pause the stream in the model, which 
 notifies the views, so the Video is paused, and  pause button becomes 
 a play button.

 thats how i do MVC.
 data is stored in mvc.models,
 data is displayed in mvc.views, and
 data is manipulated in mvc.controllers.


 Ross P. Sclafani
 design / technology / creative

 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani
 http://www.linkedin.com/in/rosssclafani
 [347] 204.5714

 On Feb 26, 2012, at 11:09 PM, Karl DeSaulniers wrote:

 BTW Ross, I thought your example was great.

 Karl DeSaulniers
 Design Drumm
 http://designdrumm.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

Karl DeSaulniers
Design Drumm
http://designdrumm.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


RE: [Flashcoders] MVC style Correction

2012-03-05 Thread Cor
Thanks Paul,

In the documentation I read there is mostly the View telling the Controller
an event has taken place.
The View holds e reference of the Model and the Controller.
Look at :
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/actions
cript/pdfs/ora_as3_design_patterns_ch12.pdf

on page number 429 (is the 11th page of this file)

So I have create this in my Document class like this:

var model:Model = Model.getInstance(); //Singleton
var controller:Controller = new Controller(model);
var view:View = new View(model, controller,
this.stage);
addChild(view);


To check if I understand you correctly, you would do something like this:

var model:Model = Model.getInstance(); //Singleton
var view:View = new View(model,  this.stage);
var controller:Controller = new Controller(model,
view);
addChild(view);

And in the view instance, instead of my way:

private function btn_clickHandler(e:MouseEvent):void {


controller.setValueInModel(arrayButtons.indexOf(e.target));
}

private function btn_clickHandler(e:MouseEvent):void {

myPublicVar = arrayButtons.indexOf(e.target);
dispatchEvent(new Event(View.MY_CUSTOM_EVENT));
}   

Ofcourse the Controller would then have a listener : view.addEventListener(
View.MY_CUSTOM_EVENT, callback_function);

Correct???

Regards
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: maandag 5 maart 2012 13:31
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

On 05/03/2012 10:26, Cor wrote:
 @Karl,

 I just created my first MVC and it is still in progress...
 Lots of fun!

 This video helped me a lot!
 http://pv3d.org/2009/02/11/actionscript-3-model-view-controller-mvc/

 Unfortuneatly the tutor mentions Controller can update View, but that 
 example is not included.
 If anyone can give me a little example of how that is done in MVC, 
 don't hasitate. :-)

I don't think the controller should be updating the view. Period. Nor do I
think that the view should be calling methods of the controller class.

One of the main benefits of MVC is separation of concerns. Views shouldn't
care about controllers, controllers should care about views.

My views dispatch events about their changes and the controller listens for
the events, not caring which view dispatched it.
The controller updates the model, and the view listens for changes in the
model.

There are several ways to build the MVC pattern. The video shows one way,
but really it shows a coupling that shouldn't be as tight as it is and the
idea of a controller updating a view, is a no-no.

Sometimes people use a micro-mvc architecture within a view to control it -
no problem about that, but we should keep our MVC components as separate
black boxes.

Paul
 best regards
 Cor van Dooren
 The Netherlands

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: maandag 27 februari 2012 11:19
 To: Flash Coders List
 Subject: Re: [Flashcoders] MVC style Correction

 That actually makes a lot of sense to me and I haven't written one MVC
yet.
 Thanks for the break-down!
 In relation to what Henrik said about using adaptors, I see the sub 
 controllers as the adaptors, but they are not actually adaptors, just 
 sub controllers with targets to the main controller.
 Yes?

 Best,
 Karl


 On Feb 27, 2012, at 1:16 AM, Ross Sclafani wrote:

 thanks, its just how i do MVC

 it really get interesting when you follow a mitosis development 
 pattern... You start with one model, controller, and view, add 
 features to each in parallel, and as each class gets too big, you 
 break them out into subcontrollers, submodels, and subviews. Then 
 sub-sub. My projects have a triple-tree structure branching out from 
 the core model, controller, and view classes

 finer granularity as you reach further in, and always broken into M, 
 V, and C:

 Models contain properties only. they dispatch a CHANGE Event every 
 time one of their properties change,.

 Views display properties of the model. they listen for the CHANGE 
 Event, and update their appearance with the new values stored in the 
 model every time it changes.

 Controllers manipulate properties of the model. Whether trigger by 
 event handlers in the views, or internal timers or network activity, 
 any command that sets any value of any property of the model is 
 placed in a controller. Controllers might use other controllers to 
 trigger changes in submodels outside its subdomain

 the project starts off very compact

RE: [Flashcoders] MVC style Correction

2012-03-05 Thread Cor
OK, I almost started changing my approach, but this confirms I shouldn't.

I stopped smoking in 1978 but I still listen to all the warnings. :-)

Thank you!!


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ross
Sclafani
Sent: maandag 5 maart 2012 15:37
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

i prefer to have the model update the views.

preferably via event for loose coupling.


the situations that a controller would alter a view  in the versions of MVC
i have studied are for things that are pure visual responses.

like say a rollover:

ROLL_OVER event on View -- calls onRollOver on controller -- sets
highlight on View.

Because the Flash SDK provides such a rich display API, I personally avoid
this and leave any pure view event handling to the View internals to limit
the public properties of Views.

I could see a scenario where one such rollover needs to cause changes in
multiple views, and this approach could be implemented, but i would normally
rout these types updates through a submodel dedicated to UI.

again, I value encapsulation above most other benefits of allowing the
controller access to view properties, so i follow a standard unidirectional
triangular flow.


Ross P. Sclafani
design / technology / creative

http://ross.sclafani.net
http://www.twitter.com/rosssclafani
http://www.linkedin.com/in/rosssclafani
[347] 204.5714
___
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] MVC style Correction

2012-03-05 Thread Cor
I am still at the most basic level, so I 'll stick to MVC for this moment.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: maandag 5 maart 2012 17:01
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

I'm guessing we're now into nuancing the model to hold view states and the
presenter is controlling multiple views, or is that wrong?

On 05/03/2012 15:33, Peter Ginneberge wrote:
 The dependency with this is that any changes to the UI - additional 
 views being added or removed, requires that the controller be changed 
 too. Any change to a view could cause the controller to become broken.

 For this reason, I would say it's bad practice.

 Not necessarily so.
 But.. you'd use an interface, which the view implements.
 In which case you'd probably be talking about a Presenter rather than 
 a Controller :)

 pseudo code:

 // PRESENTER
 private var view:IView;
 public function ViewPresenter(v:IView) {
view = v;
// add listeners and whatnot..
 }

 onSomeEventHandler(event:SomeEvent):void {
view.update();
 }

 

 // VIEW
 public class MyView implements IView {
public function update()(// do stuff); }

 

 // VIEW INTERFACE
 public interface IView {
public function update();
 }

 GWT uses this kind of architecture:
 http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.ht
 ml 
 http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture.ht
 ml#binding


 http://code.google.com/intl/nl/webtoolkit/articles/mvp-architecture-2.
 html


 http://www.google.com/intl/nl/events/io/2009/sessions/GoogleWebToolkit
 BestPractices.html


 So in GWT I usually have:

 (only 1) AppController
 (several) Presenter + View + Model triads

 A view dispatches events to which the presenter listens.
 Presenter talks to view via its interface.

 View doesn't know the presenter, Presenter doesn't know the view, only 
 its interface.

 regards,
 Muzak

 - Original Message - From: Paul Andrews p...@ipauland.com
 To: flashcoders@chattyfig.figleaf.com
 Sent: Monday, March 05, 2012 3:11 PM
 Subject: Re: [Flashcoders] MVC style Correction


 The dependency with this is that any changes to the UI - additional 
 views being added or removed, requires that the controller be changed 
 too. Any change to a view could cause the controller to become broken.

 For this reason, I would say it's bad practice.


 On 05/03/2012 13:57, Merrill, Jason wrote:
 tutor mentions Controller can update View, but that example is not 
 included.
 If anyone can give me a little example of how that is done in MVC, 
 don't hasitate
 In about the simplest form:


 //In the controller:

 onSomeEventHandler(event:SomeEvent):void
 {
 _someViewInstance.update();
 }


 //In the view:

 public function update():void
 {
 //Do stuff to change the view
 }

 Hope that helps.


   Jason Merrill

 ___
 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] Touch event question

2012-02-23 Thread Cor
I am trying to create a touch screen app in Flash CS5.5 / AS30 for the first 
time.
I want to show a map on a 42 inch touch screen.
Users (kids and adults) should be able to zoom in when dragging an area with 
two fingers.
So in fact a rectangle (top-left to bottom-right)
Can anyone give me some hints, examples, tutorials?
Everything is welcome and most appreciated!

Best regards,
Cor 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Touch event question

2012-02-23 Thread Cor
Thank you!
But I really have to get into it myself.
There has to be a lot more interaction in the end.
And I want to learn how to do it.

Best regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John R.
Sweeney Jr.
Sent: donderdag 23 februari 2012 21:17
To: Flash Coders List
Subject: Re: [Flashcoders] Touch event question

If you don't have the time or the knowledge to roll-your-own, this offers a
lot of flexibility using gestures.

http://gestureworks.com/legacy-tutorials/move-rotate-scale/

Good luck

John R. Sweeney Jr.
Senior Interactive Multimedia Developer
OnDemand Interactive Inc
Hoffman Estates, IL 60169




On Feb 23, 2012, at 2:04 PM, Cor wrote:

 I am trying to create a touch screen app in Flash CS5.5 / AS30 for the
first time.
 I want to show a map on a 42 inch touch screen.
 Users (kids and adults) should be able to zoom in when dragging an area
with two fingers.
 So in fact a rectangle (top-left to bottom-right) Can anyone give me 
 some hints, examples, tutorials?
 Everything is welcome and most appreciated!
 
 Best regards,
 Cor


___
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] MVC style Correction

2012-02-18 Thread Cor
Kevin,

Thanks for this and the video.
I sure clears the theory.

Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Newman
Sent: zaterdag 18 februari 2012 6:10
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

That idea that the one thing MVC interpretations have in common - that
models can only be updated by the controller makes sense.

I tried to learn MVC a few times before it really stuck in my head. 
These where the problems I encountered:
- What does MVC apply to? Is it an application level framework, or does it
apply to tiny parts? In other words, do you have one or many in your app?
(the scope the pattern was meant to apply to wasn't apparent from most
descriptions.)
- If I have to have a different view for each bit of model data - why bother
with it all (the idea that you should work to make generic reusable views
was never clear from most descriptions.)
- How does the communication work again? Most diagrams are slightly
different from the others and the dotted line connector lines vs. the solid
lines never made as much sense as the road lines metaphor in the diagrams I
linked to.

The video I linked to addressed each of those issues, for the first time.
Really though the problem is there are so many different interpretations of
this pattern it's almost not really a pattern at all - more like a group
of similar patterns, and that variance makes it hard to learn and understand
(this thread is kind of proof, IMHO).

What I ended up taking away from that video the first time I came accross it
last year was the model - controller side, the idea that the controller
directly manipuates the model and the views - it basically controls
things. And the model broadcast tower diagrams for notifying the controller
of changes was useful. I applied the same communication idea to the view
side, as it seemed very iOS specific (even mimicking the UI of XCode to an
extent in the diagrams), and overcomplicated anyway (3 different
communication methods - enough already). I also don't usually bother with
the data source or adapters (but I don't deal with a ton of changing remote
data, usually just an item list that the view can handle).

The guy in the video did slip a little assume the model and view don't
communicate *for the purposes of this class* in there - which indicates at
least at a some point having a model specific view makes sense (I do that a
lot - frankly a lot of the UIs I make aren't generic, so why bother with a
generic view framework). It's still mostly MVC in the end, but it's not a
strict implementation of that specific pattern. But when someone is first
trying to learn MVC, the exceptions could be superfluous information the
learner probably doesn't need.

Kevin N.

___
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] MVC style Correction

2012-02-17 Thread Cor
Jord,

This is exactly what I don't understand to do in actionscript!
And that's why I think some example will visualize it to me.
So I can analyze the flow of it all.
Feel free to contact me offlist if you prefer.

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
jchilc...@interactivityunlimited.com
Sent: donderdag 16 februari 2012 19:44
To: Flash Coders List
Subject: RE: [Flashcoders] MVC style Correction


Models shouldn't have any knowledge of each other or anything outside of 
themselves. The controller should usually be the first area to set up.
Everything else is set up and managed by the controller (views, models, 
services). Usually, there will be one central controller that handles your main 
program management. Other controllers can be set up and delegated by the main 
controller, but this is not always necessary. In a well set up MVC application, 
Models and Views don't talk to each other.
Rather, they let the controller carry out that communication.

jord

 Original Message 
Subject: Re: [Flashcoders] MVC style Correction
From: John McCormack j...@easypeasy.co.uk
Date: Sat, February 18, 2012 1:22 pm
To: Flash Coders List flashcoders@chattyfig.figleaf.com

A really nice explanation.

I tried to find your EastAsMVC after being on your site, is it on the way?

Also, what comes first, ie. how do the models, controller and Views find

out about each other?

Does everything register with the (single) controller?

John




___
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] MVC style Correction

2012-02-17 Thread Cor
Thank you!
Another piece of the puzzle is filled in.

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ben Sand
Sent: vrijdag 17 februari 2012 10:11
To: Flash Coders List
Subject: Re: [Flashcoders] MVC style Correction

maybe this will help:
http://www.robotlegs.org/diagram/

the solid lines are method calls, the dashed lines are events

On 17 February 2012 18:58, Cor c...@chello.nl wrote:

 Jord,

 This is exactly what I don't understand to do in actionscript!
 And that's why I think some example will visualize it to me.
 So I can analyze the flow of it all.
 Feel free to contact me offlist if you prefer.

 Best regards,
 Cor van Dooren


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 jchilc...@interactivityunlimited.com
 Sent: donderdag 16 februari 2012 19:44
 To: Flash Coders List
 Subject: RE: [Flashcoders] MVC style Correction


 Models shouldn't have any knowledge of each other or anything outside 
 of themselves. The controller should usually be the first area to set up.
 Everything else is set up and managed by the controller (views, 
 models, services). Usually, there will be one central controller that 
 handles your main program management. Other controllers can be set up 
 and delegated by the main controller, but this is not always 
 necessary. In a well set up MVC application, Models and Views don't talk
to each other.
 Rather, they let the controller carry out that communication.

 jord

  Original Message 
 Subject: Re: [Flashcoders] MVC style Correction
 From: John McCormack j...@easypeasy.co.uk
 Date: Sat, February 18, 2012 1:22 pm
 To: Flash Coders List flashcoders@chattyfig.figleaf.com

 A really nice explanation.

 I tried to find your EastAsMVC after being on your site, is it on the way?

 Also, what comes first, ie. how do the models, controller and Views 
 find

 out about each other?

 Does everything register with the (single) controller?

 John




 ___
 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] MVC style

2012-02-16 Thread Cor
I agree!!!
Thanks again, Ross!!

Ross quoted:
Now imagine a Model with more properties. 
And tons of different Views of them that data. 
Some of which provide a UI linked to Controller methods that manipulate it.
-- end quote --

I would love to see a next level example of a multi-model -view-controller

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Bryan
Thompson
Sent: donderdag 16 februari 2012 9:37
To: 'Flash Coders List'
Subject: RE: [Flashcoders] MVC style

Ross, that has to be the best explanation of MVC I've ever read.  Combined
with your example, I finally *really* understand the concepts.  Thank you!

Bryan Thompson


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ross
Sclafani
Sent: Wednesday, February 15, 2012 4:05 PM
To: Flash Coders List
Cc: Flash Coders List
Subject: Re: [Flashcoders] MVC style

I am an MVC purist, I always proceed as follows:

Models should ONLY store information, particularly the state of the
application and any data retrieved from disk or the network.

Views hold a reference to a model, watch it for updates, and respond to
those updates by rendering the model in its current state. 'rendering' could
refer to manipulating the display list in flash, outputting some text to
stout (or trace) serving up some JSON from a server app, whatever way of
expressing the state of the model your app requires. Views are also
responsible for  handling events that occur in their domain, and forwarding
them to the appropriate Controllers.
Controllers exist to manipulate models. The only acceptable way to alter a
model is via a controller. Whether its storing data from a Web service in
the model, or altering the state of the app in response to user interaction,
the controllers hold all of the business logic that define how the app
behaves.

Ideally, in AS3, the models consist of no methods except accessors that
retrieve values from private vars and store values there and notify
subscribed views of the update. Event dispatcher is a fantastic base class
for a model.
Equally, wherever possible, a controller should only consist of methods.
Properties are for the model.
This sets up a unidirectional flow of interaction and display. The
controller populates the model, the model notifies the views, the views
change. The changed view incites some user interaction, the view tells the
controller what the user wants to happen, and the controller alters the
state of the model accordingly, which then notifies the views to change, and
so on and so forth.

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714



___
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] Array sort issue

2012-02-16 Thread Cor
I have a multi-dimensional array loaded with xml.
Now I need to sort the aMain array depending on the users choice.
But it has to be sorted the values of the inner array.

for (){
  aMain.push( [xml.TRACK[n].SUB_TRACK[m].BEAM,
xml.TRACK[n].SUB_TRACK[m].SPOT, etc...]);
}

How would I do this?

Regards
Cor van Dooren

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Array sort issue

2012-02-16 Thread Cor
I figured it out.

End of topic.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: donderdag 16 februari 2012 11:51
To: 'Flash Coders List'
Subject: [Flashcoders] Array sort issue

I have a multi-dimensional array loaded with xml.
Now I need to sort the aMain array depending on the users choice.
But it has to be sorted the values of the inner array.

for (){
  aMain.push( [xml.TRACK[n].SUB_TRACK[m].BEAM,
xml.TRACK[n].SUB_TRACK[m].SPOT, etc...]); }

How would I do this?

Regards
Cor van Dooren

___
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] Fwd: MVC

2012-02-16 Thread Cor
Ross,

And you did get people started.
At least me!

I am also very interested in your fuller framework.
I don't wish to use the big frameworks as RobotLegs, etc.
I want to learn to create good MVC from scratch.

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ross
Sclafani
Sent: donderdag 16 februari 2012 14:28
To: Flash Coders List
Subject: Re: [Flashcoders] Fwd: MVC

I have a fuller framework that details a view life cycle, subModels, a
Controller tree, animated transitions on change() and more. The classes I
wrote are just the simplest examples that I thought would get people
started.
I'll get the framework polished up and open sourced to Github if you guys
are interested

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714

On Feb 16, 2012, at 5:46 AM, Paul Andrews p...@ipauland.com wrote:

 Excellent job.
 
 I have one small point, on a practical level.
 
 For the views, in particular, I don't usually pass arguments to the
constructor. It's not such a big deal for code-only examples, but in my
flash world I mix my components between stuff created dynamically and things
created in the IDE - sometimes I build components as assemblies on the stage
using the IDE. The point is that passing arguments to the constructor then
becomes an issue for a view.
 
 Might I suggest an init() function to pass in Model and Controller?
 
 Paul
 
 
 
 On 16/02/2012 07:59, Ross Sclafani wrote:
 From: Ross Sclafaniross.sclaf...@gmail.com
 Date: February 16, 2012 2:39:34 AM EST
 To: Corc...@chello.nl
 Cc: Flash Coders Listflashcoders@chattyfig.figleaf.com,
flashcoder...@googlegroups.com
 Subject: Re: MVC
 
 feel free to hit me up any time ill try to have time to respong
 
 none the less, this should get you started:
 
 /*
  * Model.as
  *
  * mvc.Model;
  */
 package mvc {
import flash.events.EventDispatcher;
import flash.events.Event;
class Model extends EventDispatcher{
private var _count:int = 0;
public function get count():int{
return _count;
}
public function set count(value:int):void{
this._count= value;
update();
}
public function Model(){
super()
}
private function update():void{
this.dispatchEvent(new Event(Event.CHANGE));
}
}
 }
 
 
 /*
  * Controller.as
  *
  * mvc.Controller;
  */
 package mvc {
public  class Controller {
private var model:Model;
public function Controller(model:Model){
super()
this.model = model;
}
public function countUp():void{
this.model.count++;
}
}
 }
 
 /*
  * View.as
  *
  * mvc.View;
  */
 package mvc {
import flash.text.TextField;
import flash.events.Event;
import flash.display.Sprite;
public  class View extends Sprite(){
private var model:Model;
private var controller Controller;
private var textField:TextField = new TextField();
public function View(model:Model, controller:Controller){
model.addEventListener(Event.CHANGE,
this.model_changeHandler);
super()
this.model = model;
this.controller = controller;
this.addChild(this.textField);
this.stage.addEventListener(MouseEvent.CLICK,
this.stage_clickHandler)

}
private function stage_clickHandler(event:MouseEvent):void{
this.controller.countUp();
}
private function model_changeHandler(event:Event):void{
this.textField.text = this.model.count
}
}
 }
 /*
  * App.as
  *
  * MVC screen click counter.
  */
 package{
import mvc.Model;
import mvc. View;
import mvc.Controller;
public class App{
private var model:Model = new Model();
private var controller:Controller = new Controller(this.model);
private var view:View = new View(model, controller);
public function App(){
this.addChild(this.view);
}
}
 }
 
 Now imagine a Model with more properties.
 And tons of different Views of them that data.
 Some of which provide a UI linked to Controller methods that manipulate
it.
 
 _ross
 
 
 ___
 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] Fwd: MVC

2012-02-16 Thread Cor
Me, being Dutch, is having all the problems expressing in a non-native language.
I did not mean to offend ANY framework.
Sure RobotLegs is perfect, as many people use it.
I am only trying to get some help/examples to write a somewhat fuller MVC 
myself.

So I am sorry!

Best regards,
Cor van Dooren
--
Answers in Dutch are also very much appreciated. ;-)

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
jchilc...@interactivityunlimited.com
Sent: donderdag 16 februari 2012 15:07
To: Flash Coders List
Subject: RE: [Flashcoders] Fwd: MVC

(UGH... I hate RTF Web editors)

RobotLegs is not a big framework at all. In comparison with most of the other 
frameworks out there, it's overhead is far far less than ones like Cairngorm, 
Spring and Parsley. Even compared to Mate and SWIZ (which are very small to 
begin with), then RobotLegs is lighter at 47K overhead.

Main problem that I see with the code that was posted is that it breaks a major 
MVC rule and teaches a real bad habit: Views shouldn't have any knowledge of 
Models and Models shouldn't care who's using them (Controllers are just 
conduits between Views and Models). On a larger scale, this would present 
itself to be a huge maintenance nightmare and dependencies have now been 
created. Everything should be independent of each other enough that I could 
replace one section without affecting the operation of anything else in the 
application. In this case. the controller should be passing either Value or 
Transfer Objects back and forth between the View and Model. This way, I could 
change models on the fly and the controller and view wouldn't suspect a thing.

RobotLegs is an excellent example for learning about MVC.

jord
 Original Message 
Subject: RE: [Flashcoders] Fwd: MVC
From: Cor c...@chello.nl
Date: Thu, February 16, 2012 8:39 am
To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com

Ross,

And you did get people started.
At least me!

I am also very interested in your fuller framework.
I don't wish to use the big frameworks as RobotLegs, etc.
I want to learn to create good MVC from scratch.

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ross Sclafani
Sent: donderdag 16 februari 2012 14:28
To: Flash Coders List
Subject: Re: [Flashcoders] Fwd: MVC

I have a fuller framework that details a view life cycle, subModels, a 
Controller tree, animated transitions on change() and more. The classes I wrote 
are just the simplest examples that I thought would get people started.
I'll get the framework polished up and open sourced to Github if you guys are 
interested

Ross P. Sclafani
Owner / Creative Director
Neuromantic Industries
http://www.neuromantic.com
http://ross.sclafani.net
http://www.twitter.com/rosssclafani
347.204.5714


___
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] swf 2 pdf on the fly

2011-10-30 Thread Cor
]);
pagesToPrint++;
} catch (e:Error) {
// do nothing
}
}   
trace( pj.orientation:  +
pj.orientation,  pj.pageWidth:  + pj.pageWidth,  pj.pageHeight:  +
pj.pageHeight); 
if (pagesToPrint0) {
pj.send();
}
}
}

private function printTwoPerPage():void {
var pj:PrintJob = new PrintJob();
var pagesToPrint:uint=0;
if (pj.start()) {
if
(pj.orientation==PrintJobOrientation.PORTRAIT) {
throw new Error(Without embedding
fonts you must print two sheets per page with an orientation of
landscape.);
}

for (var i:uint = 0; i  amount; ++i) {
aPages[i].height=pj.pageHeight;
aPages[i].width=pj.pageWidth/2;
if (i%2==0) {
var sheets:Sprite = new
Sprite();
sheets.addChild(aPages[i]);
if (aPages[i+1]) {

sheets.addChild(aPages[i+1]);

sheets.getChildAt(1).x=sheets.getChildAt(0).width;
}
try {

pj.addPage(aPages[i]);
pagesToPrint++;
} catch (e:Error) {
// do nothing
}
}
}

if (pagesToPrint0) {
pj.send();
}
}
}

private function printTopHalf():void {
var pj:PrintJob = new PrintJob();
var pagesToPrint:uint=0;
if (pj.start()) {
if
(pj.orientation==PrintJobOrientation.PORTRAIT) {
throw new Error(Without embedding
fonts you must print the top half with an orientation of landscape.);
}

for (var i:uint = 0; i  amount; ++i) {
aPages[i].height=pj.pageHeight;
aPages[i].width=pj.pageWidth/2;
if (i%2==0) {
var sheets:Sprite = new
Sprite();
sheets.addChild(aPages[i]);
if (aPages[i+1]) {

sheets.addChild(aPages[i+1]);

sheets.getChildAt(1).x=sheets.getChildAt(0).width;
}
try {
pj.addPage(sheets,
new Rectangle(0, 0, sheets.width, sheets.height/2));
pagesToPrint++;
} catch (e:Error) {
// do nothing
}
}
}

if (pagesToPrint0) {
pj.send();
}
}
}

}//end class
}//en package

--- END CODE

Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rodrigo
Augusto Guerra
Sent: vrijdag 28 oktober 2011 17:42
To: Flash Coders List
Subject: Re: [Flashcoders] swf 2 pdf on the fly

hi guys... thanks for all the answers.

I'll give a try on alivePDF and purePDF. Willem could you send a link for
the class u created?

Cor here is what i'm using to print, works ok on windows... never needed to
test on MAc but will do it...

var my_pj:PrintJob = new PrintJob();

//mostra caixa impressao
if (my_pj.start()) {

   var myFlag1:Boolean = my_pj.addPage(_root.mcPrintExamCand

RE: [Flashcoders] swf 2 pdf on the fly

2011-10-30 Thread Cor
In addition:
The parameter psdAPages is an array with movie clips which contains the
textfields to print.
Every movie clip is a page with the size of  595 x 842 pixels

Best regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: zondag 30 oktober 2011 10:56
To: 'Rodrigo Augusto Guerra'; 'Flash Coders List'
Subject: RE: [Flashcoders] swf 2 pdf on the fly

Rodrigo, 

Thank you.
It works OK on a windows PC, regardless the error about too big a size.
But on the MAC it prints complete black pages.
If I print to PDF it works but sometimes it fails because of running script
time...

I switch to AlivePDF now, but if anyone is interested in my PrinterOutput
class, here it is:

If someone detects where I am going wrong, don't hesitate to tell me :-)

--- BEGIN CODE
/*
The Rectangle object's dimensions (width and height) are set in pixels. 
The printer, however, uses points as measuring units instead of pixels. 
Points have a fixed physical size - 1/72 of an inch, while a pixel on the
screen depends on the resolution of that screen.
The transformation multiplier between pixels and points depends on the
printer's settings and the Sprite object's scale.

A non-scaled Sprite object that has a width of 72 pixels will be printed
with 1 inch in width. 
One point will equal one pixel, no matter what the screen resolution is.

Here are some of the relations that might come in handy:

1 point = 20 tweeps = 1/72 inches
1 inch = 72 points = 1440 tweeps
1 cm = 567 tweeps

Beeldscherm 72 pixels/inch:
8,268 x 11,693 inch = 21 x 29,7 cm = 595 x 842 pixels Printer 300
pixels/inch:
8,268 x 11,693 inch = 21 x 29,7 cm = 2480 x 3508 pixels


If you need to change the scale of your Sprite object that you're going to
print, do it before you call the addPage() method on it.

Note that printArea property and the Sprite object's scale are not
connected. 
So, if you set your print area to 100 x 100 pixels, it is going to print
1 pixels total. 
If you re-scale your Sprite object, it will print the same 1 pixels, but
the Sprite object is printed in its rescaled appearance.
*/

package {

import flash.printing.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;

public class PrinterOutput extends Sprite {

private var aPages:Array;
private var amount:uint=1;

public function PrinterOutput(psdAPages:Array) {
trace(psdAPages[0]);
aPages=[];
aPages=psdAPages;
amount=aPages.length;
//test();  //FOR TESTING - WORKS OK
printOnePerPage();
//printTwoPerPage();
//printTopHalf();
}

private function test():void {
for (var i:uint = 0; i  amount; ++i) {
var sheet:Sprite = new Sprite();
createSheet(sheet, Er was eens een..., {
x:10, y:50, width:80, height:130 } );
}
}

private function createSheet(sheet:Sprite, str:String,
imgValue:Object):void {
sheet.graphics.beginFill(0xEE);
sheet.graphics.lineStyle(1, 0x00);
sheet.graphics.drawRect(0, 0, 100, 200);
sheet.graphics.endFill();

var fmt:TextFormat = new TextFormat();
fmt.font=Tahoma;
fmt.size = 2;

var txt:TextField = new TextField();
txt.defaultTextFormat=fmt;
txt.height=200;
txt.width=100;
txt.wordWrap=true;
txt.text=str;

if (imgValue!=null) {
var img:Sprite = new Sprite();
img.graphics.beginFill(0xFF);
img.graphics.drawRect(imgValue.x,
imgValue.y, imgValue.width, imgValue.height);
img.graphics.endFill();
sheet.addChild(img);
}
sheet.addChild(txt);
aPages=[];
aPages.push(sheet);
}

private function printOnePerPage():void {
var pj:PrintJob = new PrintJob();
var pagesToPrint:uint=0;
if (pj.start()) {
if
(pj.orientation==PrintJobOrientation.LANDSCAPE) {
throw new Error(Without embedding
fonts you

RE: [Flashcoders] swf 2 pdf on the fly

2011-10-28 Thread Cor
Hi, 

Look at AlivePDF.
I am figuring out how this works with Flash (just started)

I have issues printing from flash.
It errors that the size is too big and of that filters can't be printed.
However, I don't use filters and the size of my MC is 595x842 which is the
exact size of PrintJob.pageSize
On Windows it prints OK, but on MAC systems it gives total black prints.

Can you tell me how you do your printing?


Best regards,
Cor van Dooren

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rodrigo
Augusto Guerra
Sent: vrijdag 28 oktober 2011 14:56
To: Flash Coders List
Subject: [Flashcoders] swf 2 pdf on the fly

hi all, 

I have a flash swf that generates a report inside a mc then print it. ok.
now my client wants a button 'save to pdf.' not just print...

The more automated the better, I wonder if someone has any hint on this,
some tool that I can install on th server and it does that for me ...

thanks,
rodrigo
___
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] can't get e.target.data

2011-10-08 Thread Cor
var str:String = String(e.target.data);

without new?

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: zaterdag 8 oktober 2011 2:44
To: Flash List
Subject: Re: [Flashcoders] can't get e.target.data

Maybe set it to a var first?

var data:String = e.target.data;
var str:String = new String(data);

HTH,

Karl



On Oct 7, 2011, at 2:23 PM, John Polk wrote:

 Here's a code snippet:
 var req:URLRequest = new URLRequest(siteUrl + store/ 
 flash_store2.py?id= + id + pkg= + pkgID);
 /*
 var variables:URLVariables = new URLVariables();
 loader.dataFormat = URLLoaderDataFormat.VARIABLES;
 req.method = URLRequestMethod.POST;
 variables.pkg = pkgID;
 variables.id = id;
 req.data = variables;
 */
 loader.load(req);
 loader.addEventListener(Event.COMPLETE, onSendComplete);
 }

 private function onSendComplete(e:Event):void
 {
 var txt:TextField = new TextField();
 var myFormat:TextFormat = new TextFormat();
 myFormat.font = Arial;
 myFormat.size = 5;
 var str:String = new String(e.target.data);

 First up, I find I have to often bypass URLVariables because it simply 
 doesn't work, as is the case here. But the real problem is
 thus:
 1) When I test this on my Mac, calling the data from my server, 
 everything works fine.
 2) When I test this on my server, calling the page TTW, everything 
 works fine if id has a value and pkg does not.
 3) When I test my python script that generates the data on my server 
 passing a value only for pkg, everything displays fine; however;
 4) When I test this on my server, calling the page TTW with no value 
 for id and a value for pkg, e.target.data only serves up this 
 string -- which is incomprehensible to me.
 How do I trouble-shoot this?
 TIA,
 John

 ___
 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

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] can't get e.target.data

2011-10-08 Thread Cor
yes


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: zaterdag 8 oktober 2011 9:38
To: Flash Coders List
Subject: Re: [Flashcoders] can't get e.target.data

Well then wouldn't..

var str:String = e.target.data;

work?

Karl


On Oct 8, 2011, at 2:31 AM, Ross Sclafani wrote:

 Has to be.

 Ross P. Sclafani
 Design | Technology | Creative
 347.204.5714
 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani

 On Oct 8, 2011, at 3:25 AM, Cor c...@chello.nl wrote:

 var str:String = String(e.target.data);

 without new?

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 2:44
 To: Flash List
 Subject: Re: [Flashcoders] can't get e.target.data

 Maybe set it to a var first?

 var data:String = e.target.data;
 var str:String = new String(data);

 HTH,

 Karl



 On Oct 7, 2011, at 2:23 PM, John Polk wrote:

 Here's a code snippet:
   var req:URLRequest = new URLRequest(siteUrl + store/ 
 flash_store2.py?id= + id + pkg= + pkgID);
   /*
   var variables:URLVariables = new URLVariables();
   loader.dataFormat = URLLoaderDataFormat.VARIABLES;
   req.method = URLRequestMethod.POST;
   variables.pkg = pkgID;
   variables.id = id;
   req.data = variables;
   */
   loader.load(req);
   loader.addEventListener(Event.COMPLETE, onSendComplete);
   }

   private function onSendComplete(e:Event):void
   {
   var txt:TextField = new TextField();
   var myFormat:TextFormat = new TextFormat();
   myFormat.font = Arial;
   myFormat.size = 5;
   var str:String = new String(e.target.data);

 First up, I find I have to often bypass URLVariables because it 
 simply doesn't work, as is the case here. But the real problem is
 thus:
 1) When I test this on my Mac, calling the data from my server, 
 everything works fine.
 2) When I test this on my server, calling the page TTW, everything 
 works fine if id has a value and pkg does not.
 3) When I test my python script that generates the data on my server 
 passing a value only for pkg, everything displays fine; however;
 4) When I test this on my server, calling the page TTW with no value 
 for id and a value for pkg, e.target.data only serves up this 
 string -- which is incomprehensible to me.
 How do I trouble-shoot this?
 TIA,
 John

 ___
 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

 ___
 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

Karl DeSaulniers
Design Drumm
http://designdrumm.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


RE: [Flashcoders] can't get e.target.data

2011-10-08 Thread Cor
Not sure, but by doing:
var req:URLRequest = new URLRequest(siteUrl + store/flash_store2.py?id= +
id + pkg= + pkgID);

doesn't this overwrite the posting of the URLVariables?

I use URLVariables all the time and never have any problem.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: zaterdag 8 oktober 2011 9:45
To: Flash Coders List
Subject: Re: [Flashcoders] can't get e.target.data

I think the other way he was doing it is supposed to be like this..

var str:String = new String();
str = e.target.data;

Yes?

Karl


On Oct 8, 2011, at 2:39 AM, Cor wrote:

 yes


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 9:38
 To: Flash Coders List
 Subject: Re: [Flashcoders] can't get e.target.data

 Well then wouldn't..

 var str:String = e.target.data;

 work?

 Karl


 On Oct 8, 2011, at 2:31 AM, Ross Sclafani wrote:

 Has to be.

 Ross P. Sclafani
 Design | Technology | Creative
 347.204.5714
 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani

 On Oct 8, 2011, at 3:25 AM, Cor c...@chello.nl wrote:

 var str:String = String(e.target.data);

 without new?

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 2:44
 To: Flash List
 Subject: Re: [Flashcoders] can't get e.target.data

 Maybe set it to a var first?

 var data:String = e.target.data;
 var str:String = new String(data);

 HTH,

 Karl



 On Oct 7, 2011, at 2:23 PM, John Polk wrote:

 Here's a code snippet:
  var req:URLRequest = new URLRequest(siteUrl + store/ 
 flash_store2.py?id= + id + pkg= + pkgID);
  /*
  var variables:URLVariables = new URLVariables();
  loader.dataFormat = URLLoaderDataFormat.VARIABLES;
  req.method = URLRequestMethod.POST;
  variables.pkg = pkgID;
  variables.id = id;
  req.data = variables;
  */
  loader.load(req);
  loader.addEventListener(Event.COMPLETE, onSendComplete);
  }

  private function onSendComplete(e:Event):void
  {
  var txt:TextField = new TextField();
  var myFormat:TextFormat = new TextFormat();
  myFormat.font = Arial;
  myFormat.size = 5;
  var str:String = new String(e.target.data);

 First up, I find I have to often bypass URLVariables because it 
 simply doesn't work, as is the case here. But the real problem is
 thus:
 1) When I test this on my Mac, calling the data from my server, 
 everything works fine.
 2) When I test this on my server, calling the page TTW, everything 
 works fine if id has a value and pkg does not.
 3) When I test my python script that generates the data on my 
 server passing a value only for pkg, everything displays fine; 
 however;
 4) When I test this on my server, calling the page TTW with no 
 value for id and a value for pkg, e.target.data only serves up 
 this string -- which is incomprehensible to me.
 How do I trouble-shoot this?
 TIA,
 John

 ___
 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

 ___
 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

 Karl DeSaulniers
 Design Drumm
 http://designdrumm.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

Karl DeSaulniers
Design Drumm
http://designdrumm.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


RE: [Flashcoders] can't get e.target.data

2011-10-08 Thread Cor
I do it like this: (Thanks to Willem!)
/*
//usage 
var myPHP_Loader = new PHP_Loader(myPhpFile.php, [val1, Value 1],
[val2, Value 2]);
myPHP_Loader.addEventListener(loaded, myPHP_LoaderLoadedHandler);
function myPHP_LoaderLoadedHandler(e:Event):void {
trace(e.target.loader.data[a]);
}

//myPhpFile.php
?php
$val1= $_POST['val1'];
$val2= $_POST['val2'];
//... do something with these values.
echo 'a=';
echo $val1+$val2;
?
 */
package  {

  import flash.display.*;
  import flash.net.*;
  import flash.events.*;

public class PHP_Loader extends Loader {

public var loader:URLLoader = new URLLoader();

public function PHP_Loader(url:String, ...args){
loader.addEventListener(Event.COMPLETE,
loaderCompleteHandler);
var request:URLRequest = new URLRequest(url);
 
if(args.length0){
var variables:URLVariables = new
URLVariables();
for (var i:int = 0; i  args.length; i++) {
variables[args[i][0]] = args[i][1];
}
request.method = URLRequestMethod.POST;
request.data = variables;
loader.dataFormat =
URLLoaderDataFormat.VARIABLES;
}
 
try{
loader.load(request);
}
catch (error:Error) {
trace(Unable to load URL);
dispatchEvent(new Event(error, true));
}
}//end CONSTRUCTOR

private function loaderCompleteHandler (e:Event):void {
trace( loader.data );
dispatchEvent(new Event(loaded, true));
}//end loaderCompleteHandler
 
}//end class
}//end package

HTH
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: zaterdag 8 oktober 2011 9:55
To: Flash Coders List
Subject: Re: [Flashcoders] can't get e.target.data

I'm also not to entirely sure you should use

 var variables:

having a var named variables might be a back-end no-no (I think) The whole
reserved names thingy..

Karl


On Oct 8, 2011, at 2:49 AM, Cor wrote:

 Not sure, but by doing:
 var req:URLRequest = new URLRequest(siteUrl + store/flash_store2.py? 
 id= +
 id + pkg= + pkgID);

 doesn't this overwrite the posting of the URLVariables?

 I use URLVariables all the time and never have any problem.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 9:45
 To: Flash Coders List
 Subject: Re: [Flashcoders] can't get e.target.data

 I think the other way he was doing it is supposed to be like this..

 var str:String = new String();
 str = e.target.data;

 Yes?

 Karl


 On Oct 8, 2011, at 2:39 AM, Cor wrote:

 yes


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 9:38
 To: Flash Coders List
 Subject: Re: [Flashcoders] can't get e.target.data

 Well then wouldn't..

 var str:String = e.target.data;

 work?

 Karl


 On Oct 8, 2011, at 2:31 AM, Ross Sclafani wrote:

 Has to be.

 Ross P. Sclafani
 Design | Technology | Creative
 347.204.5714
 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani

 On Oct 8, 2011, at 3:25 AM, Cor c...@chello.nl wrote:

 var str:String = String(e.target.data);

 without new?

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 Karl DeSaulniers
 Sent: zaterdag 8 oktober 2011 2:44
 To: Flash List
 Subject: Re: [Flashcoders] can't get e.target.data

 Maybe set it to a var first?

 var data:String = e.target.data;
 var str:String = new String(data);

 HTH,

 Karl



 On Oct 7, 2011, at 2:23 PM, John Polk wrote:

 Here's a code snippet:
 var req:URLRequest = new URLRequest(siteUrl + store/ 
 flash_store2.py?id= + id + pkg= + pkgID);
 /*
 var variables:URLVariables = new URLVariables();
 loader.dataFormat = URLLoaderDataFormat.VARIABLES;
 req.method = URLRequestMethod.POST;
 variables.pkg = pkgID;
 variables.id = id;
 req.data = variables;
 */
 loader.load(req);
 loader.addEventListener(Event.COMPLETE, onSendComplete);
 }

 private function onSendComplete(e:Event):void
 {
 var txt:TextField = new TextField();
 var

RE: [Flashcoders] can't get e.target.data

2011-10-08 Thread Cor
Yes, THANKS TO WILLEM !!!  :-)

Best regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: zaterdag 8 oktober 2011 10:18
To: Flash Coders List
Subject: Re: [Flashcoders] can't get e.target.data

Ah ok,
I see. Nice!

Best,
Karl


On Oct 8, 2011, at 3:09 AM, Cor wrote:

 I do it like this: (Thanks to Willem!)
 /*
 //usage
 var myPHP_Loader = new PHP_Loader(myPhpFile.php, [val1, Value 
 1], [val2, Value 2]); myPHP_Loader.addEventListener(loaded, 
 myPHP_LoaderLoadedHandler); function 
 myPHP_LoaderLoadedHandler(e:Event):void {
   trace(e.target.loader.data[a]);
 }

 //myPhpFile.php
 ?php
 $val1= $_POST['val1'];
 $val2= $_POST['val2'];
 //... do something with these values.
 echo 'a=';
 echo $val1+$val2;
 ?
 */
 package  {
   
  import flash.display.*;
  import flash.net.*;
  import flash.events.*;
   
   public class PHP_Loader extends Loader {
   
   public var loader:URLLoader = new URLLoader();

public function PHP_Loader(url:String, ...args){
   loader.addEventListener(Event.COMPLETE,
 loaderCompleteHandler);
   var request:URLRequest = new URLRequest(url);
   
   if(args.length0){
   var variables:URLVariables = new
 URLVariables();
   for (var i:int = 0; i  args.length; i++) {
   variables[args[i][0]] = args[i][1];
   }
   request.method = URLRequestMethod.POST;
   request.data = variables;
   loader.dataFormat =
 URLLoaderDataFormat.VARIABLES;
   }
   
   try{
   loader.load(request);
   }
   catch (error:Error) {
   trace(Unable to load URL);
   dispatchEvent(new Event(error, true));
   }
}//end CONSTRUCTOR
   
   private function loaderCompleteHandler (e:Event):void {
   trace( loader.data );
   dispatchEvent(new Event(loaded, true));
   }//end loaderCompleteHandler

   }//end class
 }//end package

 HTH
 Cor


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 9:55
 To: Flash Coders List
 Subject: Re: [Flashcoders] can't get e.target.data

 I'm also not to entirely sure you should use

 var variables:

 having a var named variables might be a back-end no-no (I think) The 
 whole reserved names thingy..

 Karl


 On Oct 8, 2011, at 2:49 AM, Cor wrote:

 Not sure, but by doing:
 var req:URLRequest = new URLRequest(siteUrl + store/flash_store2.py?
 id= +
 id + pkg= + pkgID);

 doesn't this overwrite the posting of the URLVariables?

 I use URLVariables all the time and never have any problem.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 9:45
 To: Flash Coders List
 Subject: Re: [Flashcoders] can't get e.target.data

 I think the other way he was doing it is supposed to be like this..

 var str:String = new String();
 str = e.target.data;

 Yes?

 Karl


 On Oct 8, 2011, at 2:39 AM, Cor wrote:

 yes


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: zaterdag 8 oktober 2011 9:38
 To: Flash Coders List
 Subject: Re: [Flashcoders] can't get e.target.data

 Well then wouldn't..

 var str:String = e.target.data;

 work?

 Karl


 On Oct 8, 2011, at 2:31 AM, Ross Sclafani wrote:

 Has to be.

 Ross P. Sclafani
 Design | Technology | Creative
 347.204.5714
 http://ross.sclafani.net
 http://www.twitter.com/rosssclafani

 On Oct 8, 2011, at 3:25 AM, Cor c...@chello.nl wrote:

 var str:String = String(e.target.data);

 without new?

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 Karl DeSaulniers
 Sent: zaterdag 8 oktober 2011 2:44
 To: Flash List
 Subject: Re: [Flashcoders] can't get e.target.data

 Maybe set it to a var first?

 var data:String = e.target.data;
 var str:String = new String(data);

 HTH,

 Karl



 On Oct 7, 2011, at 2:23 PM, John Polk wrote:

 Here's a code snippet:
var req:URLRequest = new URLRequest(siteUrl + store/ 
 flash_store2.py?id= + id + pkg= + pkgID);
/*
var variables:URLVariables = new URLVariables();
loader.dataFormat

RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-07 Thread Cor
Thanks Glen!

This is what I was looking for.
I use URLVariables in many occasions, but that is always like 1 record.

The (multi-records)part in php is really my problem.
I think I can work-out your example!

Thanks again!

Best regards,
Cor van Dooren

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: dinsdag 6 september 2011 22:35
To: Flash Coders List
Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL
with PHP

Hi,

 You can post multidimensional arrays to PHP for example in an HTML
form, this is better than GET which may have a lower limit on the number of
characters that can be sent in a request (as I found out with some JQuery
stuff)...

 http://php.net/manual/en/reserved.variables.post.php
 http://www.php.net/manual/en/reserved.variables.post.php#96902

 You can do:

input name=myArray[0][id] value=123/

 So in Flash you could do the same by setting the appropriate variables
in a URLVariables, but note, you probably have to call your variables
something like this:

 var data:URLVariables = new URLVariables();

 data[myArray[0][id]] = 123;

 So you could loop through your datagrid and submit the values that way
- you would need to add a count variable which tells PHP how many objects
are in your array, then you could do:

?php
 $num_items = isset($_POST['num_items']) ? 
(int)$_POST['num_items'] : 0;
 for($i = 0; $i  $num_items;$i++) {
 $id = $_POST[myArray][$i][id];
 //...
 }
 ?

 Alternatively - and less data-intensively, you could save the values
every time someone changes a field and then it loses focus.  You would have
to save each variable separately so you would need a form processor that
handles some kind of id, a variable name and a value that you then add /
update in the database (if there is no id field, you could be inserting
data).

 You could use Sephiroth's serialiazer system:

 http://www.sephiroth.it/test/unserializer/

 Or some other way of dealing with the data like AMF, etc.

 There used to be some good stuff on Flash DB http://www.flash-db.com/,
but it appears to be down now, so maybe it has gone the way of many
websites...

 I think there are lots of libraries that do a lot of the crappy grunt
work for you with Flash - Database stuff so whilst it's good to learn the
principles, you would possibly benefit from finding something like these in
the long run, especially where security is concerned:

 http://www.php.net/manual/en/security.database.php

 Hope this helps you a little.

 If only you could assign an object to URLVariables and have it post
properly

 Glen




On 06/09/2011 04:04, Cor wrote:
 Thanks Karl,

 Yes, I know.
 My problem is how to fetch my $_POST['VALUES'], which is the 
 multi-dimensional  array:

 myArray[0[id]
   myArray[0][name]
   myArray[0][description]

 myArray[1[id]
   myArray[1][name]
   myArray[1][description]

 myArray[2[id]
   myArray[2][name]
   myArray[2][description]

 etc.

 Best regards,
 Cor van Dooren


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl 
 DeSaulniers
 Sent: dinsdag 6 september 2011 3:54
 To: Flash Coders List
 Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to 
 mySQL with PHP

 Hi Cor,
 Assuming you know enough php to set up the file for connecting to your 
 database, you can insert into your database with the following example.

 function addDescription($id, $name, $description) {
   //Escape any data being inserted
   $id = mysql_real_escape_string($id);
   $name = mysql_real_escape_string($name);
   $description = mysql_real_escape_string($description);

   $query = INSERT INTO YOUR_TABLE_NAME_HERE VALUES ('.$id.','.
 $name.','.description.');
   $_POST['VALUES'];

   $result = mysql_query($query, YOUR_CONNECTION) or
die(mysql_error());
   return $result; //Returns true or false if error }

 HTH,
 Best,

 Karl


 On Sep 5, 2011, at 2:04 PM, Cor wrote:

 I have a editable datagrid which I fill from mySQL with PHP.
 So far works good.

 But when items are changed (edit, added, deleted), I want them to 
 save the data in my mySQL database.
 My values are in this multi-dimensional indexed array, which elements 
 all contain a associative array:

 myArray[i][id]
 myArray[i][name]
 myArray[i][description]

 So, can anyone tell/show me a apropriate way to pass this to PHP and 
 in the php-file how to INSERT or UPDATE this to mySQL?

 TIA!
 Best regards,
 Cor van Dooren


 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com

[Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
I have a editable datagrid which I fill from mySQL with PHP.
So far works good.

But when items are changed (edit, added, deleted), I want them to save the
data in my mySQL database.
My values are in this multi-dimensional indexed array, which elements all
contain a associative array:

myArray[i][id]
myArray[i][name]
myArray[i][description]

So, can anyone tell/show me a apropriate way to pass this to PHP and in the
php-file how to INSERT or UPDATE this to mySQL?

TIA!
Best regards,
Cor van Dooren


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Thanks Karl,

Yes, I know.
My problem is how to fetch my $_POST['VALUES'], which is the
multi-dimensional  array:

myArray[0[id]
 myArray[0][name]
 myArray[0][description]

myArray[1[id]
 myArray[1][name]
 myArray[1][description]

myArray[2[id]
 myArray[2][name]
 myArray[2][description]

etc.

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 6 september 2011 3:54
To: Flash Coders List
Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL
with PHP

Hi Cor,
Assuming you know enough php to set up the file for connecting to your
database, you can insert into your database with the following example.

function addDescription($id, $name, $description) {
//Escape any data being inserted
$id = mysql_real_escape_string($id);
$name = mysql_real_escape_string($name);
$description = mysql_real_escape_string($description);

$query = INSERT INTO YOUR_TABLE_NAME_HERE VALUES ('.$id.','. 
$name.','.description.');
$_POST['VALUES'];

$result = mysql_query($query, YOUR_CONNECTION) or
die(mysql_error());
return $result; //Returns true or false if error }

HTH,
Best,

Karl


On Sep 5, 2011, at 2:04 PM, Cor wrote:

 I have a editable datagrid which I fill from mySQL with PHP.
 So far works good.

 But when items are changed (edit, added, deleted), I want them to save 
 the data in my mySQL database.
 My values are in this multi-dimensional indexed array, which elements 
 all contain a associative array:

 myArray[i][id]
 myArray[i][name]
 myArray[i][description]

 So, can anyone tell/show me a apropriate way to pass this to PHP and 
 in the php-file how to INSERT or UPDATE this to mySQL?

 TIA!
 Best regards,
 Cor van Dooren


 ___
 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

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Do you mean that is it not possible to send an array from Flash to PHP in
this way:

private function validateAndSend(e:MouseEvent):void {
form_variables = new URLVariables();
form_varSend=new URLRequest(Main.PHP_URL+control.php);
form_varSend.method=URLRequestMethod.POST;
form_varSend.data=form_variables;
form_varLoader=new URLLoader  ;
form_varLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
form_variables.sendRequest = registreer_materiaal;
form_variables.VALUES = myMultiDimArray;
form_varLoader.addEventListener(Event.COMPLETE,
completeLoadHandler);   
form_varLoader.load(form_varSend);
}


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Dave Watts
Sent: dinsdag 6 september 2011 5:27
To: Flash Coders List
Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL
with PHP

 My problem is how to fetch my $_POST['VALUES'], which is the 
 multi-dimensional  array:

 myArray[0[id]
  myArray[0][name]
  myArray[0][description]

 ...

 etc.

I'm not a PHP expert, but in general you can't really submit an array as
form data directly to a CGI program. You have to post name-value pairs - if
you have a set of array values, they'd simply end up having the same name
and different values (like a checkbox array in HTML, for example). In your
case, things are a bit more complicated because you have an array of
structs, basically, so you'll need to convert those to a bunch of individual
name-value pairs in order to submit them to a CGI program.

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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Karl,

Thank you very much!!

But this would create a lot of network traffic, open connection and
database, do mysql_query and close db conn??

You wrote in the previous mail:
I should mention that I use this stuff inside php classes. so $this- has
already been defined as the class your currently in.
Like the database class, $database-addDescription(); is called outside the
class. if it was called inside the database class file, it would be
$this-addDescription();. Also, the php file name thats called from flash is
database.php. etc, etc. FYI.

- a process.php, this retrieves your variables from flash, makes sure its
not a bot, any verify codes checked here, etc
- then send it to your sessions.php for validation and set your errors here
to send back with.
- then send to your database.php for stripping, manipulation and insertion.

This is what I am looking for (to learn) and where my knowledge of PHP
stops...

You can address me directly if you like: codo AT chello DOT nl

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 6 september 2011 6:07
To: Flash Coders List
Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL
with PHP

I think you may be able to use the php split() or explode() on a array of
data sent.
but probably easier to split it up when gathering the info in flash.
multiple small queries instead of a bulky single query?

Karl


On Sep 5, 2011, at 10:34 PM, Cor wrote:

 Do you mean that is it not possible to send an array from Flash to PHP 
 in this way:

   private function validateAndSend(e:MouseEvent):void {
   form_variables = new URLVariables();
   form_varSend=new URLRequest(Main.PHP_URL+control.php);
   form_varSend.method=URLRequestMethod.POST;
   form_varSend.data=form_variables;
   form_varLoader=new URLLoader  ;
   form_varLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
   form_variables.sendRequest = registreer_materiaal;
   form_variables.VALUES = myMultiDimArray;
   form_varLoader.addEventListener(Event.COMPLETE,
 completeLoadHandler); 
   form_varLoader.load(form_varSend);
   }


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Dave 
 Watts
 Sent: dinsdag 6 september 2011 5:27
 To: Flash Coders List
 Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to 
 mySQL with PHP

 My problem is how to fetch my $_POST['VALUES'], which is the 
 multi-dimensional  array:

 myArray[0[id]
  myArray[0][name]
  myArray[0][description]

 ...

 etc.

 I'm not a PHP expert, but in general you can't really submit an array 
 as form data directly to a CGI program. You have to post name-value 
 pairs - if you have a set of array values, they'd simply end up having 
 the same name and different values (like a checkbox array in HTML, for 
 example).
 In your
 case, things are a bit more complicated because you have an array of 
 structs, basically, so you'll need to convert those to a bunch of 
 individual name-value pairs in order to submit them to a CGI program.

 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


 ___
 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

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Thanks David,

OK, HTTP - String... that clears a lot!
Can you give a little example of how to do you typically have to serialize
your data to send via HTTP, then deserialize the sent data to use it as an
object that's not a string.

Best regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Dave Watts
Sent: dinsdag 6 september 2011 6:08
To: Flash Coders List
Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL
with PHP

 Do you mean that is it not possible to send an array from Flash to PHP 
 in this way:

        private function validateAndSend(e:MouseEvent):void {
                form_variables = new URLVariables();
...
                form_variables.VALUES = myMultiDimArray;
                form_varLoader.addEventListener(Event.COMPLETE,
 completeLoadHandler);
                form_varLoader.load(form_varSend);
        }

That would send a single form field, VALUES, with a single value containing
something that's not a string. But sending data via HTTP requires that you
use strings. In the simplest case, you'd at least have to convert the array
to a string to store it within the single form field. This kind of thing is
a fairly common problem with web applications - you typically have to
serialize your data to send via HTTP, then deserialize the sent data to use
it as an object that's not a string.

Normally, as an occasional Flex guy, I end up using AMF which includes
serialization/deserialization functionality to handle this for you.

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


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL with PHP

2011-09-05 Thread Cor
Hi Karl,

The Flash part is no problem.
But in PHP I am a novice!

So far I learned that I should think of sending Strings to PHP instead of a
complete multi-dim array.
I don't know how to set up PHP to open it once. Do all your sending and
inserting, then close once I am done?
Do you have some examples of your construction with the different
files/classes?

Best regards,
Cor van Dooren

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: dinsdag 6 september 2011 6:24
To: Flash Coders List
Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash to mySQL
with PHP

Correction...

_parent.status = this.status;
}
};
mylv.sendAndLoad(http://yourwebsite.com/process.php;, myreply,
POST);
_parent.status = sending now ...;
//end while loop here
}

Best,
Karl

On Sep 5, 2011, at 11:20 PM, Karl DeSaulniers wrote:

 Hey Cor,
 This is how I have it set up in as2, you may be able to port easier 
 than I.

 send_btn.onRelease = function() {
   //Creates a LoadVars and get values from the form
   mylv = new LoadVars();
   myreply = new LoadVars();
   mylv.formTrue = 1; //Verify were on our form
   //could put a while loop here mylv.id = myArray[i]['id'];
   mylv.id = id.text;
   mylv.name = name_txt.text;
   mylv.description = description.text;
   //Show success or fails message
   myreply.onLoad = function() {
   if(this.status === Mail sent!) { //Success!
   newStatus = this.status +  - Thank you for
your response. We will 
 get in touch with you at +email_txt.text+.brbr- Company;
   gotoAndPlay(send_off);
   } else if(this.status === Mail Failed!){//Mail
Failed with error
   _parent.status = this.status + brSorry
there was a problem 
 sending your message. Please try again or try again at a later time.
 We apologize for any inconvenience.;
   } else {
   _parent.status = this.status;
   }
   //end while loop here
   };
   mylv.sendAndLoad(http://yourwebsite.com/process.php;, myreply, 
 POST);
   _parent.status = sending now ...;
 }

 Obviously this is for a mail form and needs to be seasoned to taste, 
 but..
 HTH,

 Best,
 Karl

 On Sep 5, 2011, at 11:07 PM, Karl DeSaulniers wrote:

 I think you may be able to use the php split() or explode() on a 
 array of data sent.
 but probably easier to split it up when gathering the info in flash.
 multiple small queries instead of a bulky single query?

 Karl


 On Sep 5, 2011, at 10:34 PM, Cor wrote:

 Do you mean that is it not possible to send an array from Flash to 
 PHP in this way:

 private function validateAndSend(e:MouseEvent):void {
 form_variables = new URLVariables();
 form_varSend=new URLRequest(Main.PHP_URL+control.php);
 form_varSend.method=URLRequestMethod.POST;
 form_varSend.data=form_variables;
 form_varLoader=new URLLoader  ;
 form_varLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
 form_variables.sendRequest = registreer_materiaal;
 form_variables.VALUES = myMultiDimArray;
 form_varLoader.addEventListener(Event.COMPLETE,
 completeLoadHandler);   
 form_varLoader.load(form_varSend);
 }


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Dave 
 Watts
 Sent: dinsdag 6 september 2011 5:27
 To: Flash Coders List
 Subject: Re: [Flashcoders] DataGrid: save multidim arrayfrom Flash 
 to mySQL with PHP

 My problem is how to fetch my $_POST['VALUES'], which is the 
 multi-dimensional  array:

 myArray[0[id]
 myArray[0][name]
 myArray[0][description]

 ...

 etc.

 I'm not a PHP expert, but in general you can't really submit an 
 array as form data directly to a CGI program. You have to post 
 name-value pairs - if you have a set of array values, they'd simply 
 end up having the same name and different values (like a checkbox 
 array in HTML, for example).
 In your
 case, things are a bit more complicated because you have an array of 
 structs, basically, so you'll need to convert those to a bunch of 
 individual name-value pairs in order to submit them to a CGI 
 program.

 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

RE: [Flashcoders] loop and Timer problem?????????

2011-08-29 Thread Cor
1. You call the function but your timer does not exist 
2  your Boolean never get true so your loop in infinite.

Try this:

var forsate,generalFlag:Boolean;
var counter:int=0;
var generalTimer:Timer=new Timer(10);
testhalgheh();
function generalfunc(e:TimerEvent=null):void {
generalFlag=true;
//trace(  generalFlag  + generalFlag)
}
function testhalgheh():void {
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);

generalTimer.start();
while (counter1000) {
//if (generalFlag==true) {
trace(hello);
counter+=1;
//}

}

}



Best regards,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don’t.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of nasim h
Sent: maandag 29 augustus 2011 19:55
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] loop and Timer problem?

what is the problem ?
how Timer work that the loop stuck in  the program
I cant understand the loop and Timer increase cpu usage??




var forsate,generalFlag :Boolean;
var counter:int;
var generalTimer:Timer = new Timer(1);
testhalgheh()
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);
function generalfunc(e:TimerEvent=null):void
    {
        generalFlag=true;
        //trace(  generalFlag  + generalFlag)
        
    }
function testhalgheh():void
{
    generalTimer.start();
    while(counter1000)
    {
        if(generalFlag==true)
        {
            trace(hello)
            counter+=1;
        }
    
    }
    
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] loop and Timer problem?????????

2011-08-29 Thread Cor
in main i call testhalgheh();
so inside it  timer will start

Cor: Yes, but your Timer gets create 1 line below your function caal, so at 
that moment it does not exist.

it stuck in loop untill it get true in logic I think when the timer start it 
shouldnt related to thing so during loop the timer event should work and code
if(generalFlag==true)
{
trace(hello)
counter+=1;
}

should work but the test show the flag doest get true why is that the timer 
shoudl work independently

Cor: No, and the function generalFlag does not do  anything because it stays 
true


--- On Mon, 8/29/11, Cor c...@chello.nl wrote:

From: Cor c...@chello.nl
Subject: RE: [Flashcoders] loop and Timer problem?
To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Date: Monday, August 29, 2011, 2:01 PM

1. You call the function but your timer does not exist
2  your Boolean never get true so your loop in infinite.

Try this:

var forsate,generalFlag:Boolean;
var counter:int=0;
var generalTimer:Timer=new Timer(10);
testhalgheh();
function generalfunc(e:TimerEvent=null):void {
generalFlag=true;
//trace(  generalFlag  + generalFlag) } function testhalgheh():void {
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);

generalTimer.start();
while (counter1000) {
//if (generalFlag==true) {
trace(hello);
counter+=1;
//}

}

}



Best regards,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don’t.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of nasim h
Sent: maandag 29 augustus 2011 19:55
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] loop and Timer problem?

what is the problem ?
how Timer work that the loop stuck in  the program
I cant understand the loop and Timer increase cpu usage??




var forsate,generalFlag :Boolean;
var counter:int;
var generalTimer:Timer = new Timer(1);
testhalgheh()
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);
function generalfunc(e:TimerEvent=null):void
{
generalFlag=true;
//trace(  generalFlag  + generalFlag)

}
function testhalgheh():void
{
generalTimer.start();
while(counter1000)
{
if(generalFlag==true)
{
trace(hello)
counter+=1;
}

}

}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
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] loop and Timer problem?????????

2011-08-29 Thread Cor
This loop is running and your timer callback function has not yet set the 
Boolean to true

while (counter1000) {
if (generalFlag==true) {
trace(hello);
counter++;
}
}

And then it get in the infinite loop

Best regards,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don’t.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of nasim h
Sent: maandag 29 augustus 2011 20:29
To: Flash Coders List
Subject: RE: [Flashcoders] loop and Timer problem?

in main i call testhalgheh();
so inside it  timer will start
it stuck in loop untill it get true in logic I think when the timer start it 
shouldnt related to thing so during loop the timer event should work and code
if(generalFlag==true)
{
trace(hello)
counter+=1;
}

should work but the test show the flag doest get true why is that the timer 
shoudl work independently



--- On Mon, 8/29/11, Cor c...@chello.nl wrote:

From: Cor c...@chello.nl
Subject: RE: [Flashcoders] loop and Timer problem?
To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Date: Monday, August 29, 2011, 2:01 PM

1. You call the function but your timer does not exist
2  your Boolean never get true so your loop in infinite.

Try this:

var forsate,generalFlag:Boolean;
var counter:int=0;
var generalTimer:Timer=new Timer(10);
testhalgheh();
function generalfunc(e:TimerEvent=null):void {
generalFlag=true;
//trace(  generalFlag  + generalFlag) } function testhalgheh():void {
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);

generalTimer.start();
while (counter1000) {
//if (generalFlag==true) {
trace(hello);
counter+=1;
//}

}

}



Best regards,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don’t.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of nasim h
Sent: maandag 29 augustus 2011 19:55
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] loop and Timer problem?

what is the problem ?
how Timer work that the loop stuck in  the program
I cant understand the loop and Timer increase cpu usage??




var forsate,generalFlag :Boolean;
var counter:int;
var generalTimer:Timer = new Timer(1);
testhalgheh()
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);
function generalfunc(e:TimerEvent=null):void
{
generalFlag=true;
//trace(  generalFlag  + generalFlag)

}
function testhalgheh():void
{
generalTimer.start();
while(counter1000)
{
if(generalFlag==true)
{
trace(hello)
counter+=1;
}

}

}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
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] loop and Timer problem?????????

2011-08-29 Thread Cor
TRY THIS:


var forsate,generalFlag:Boolean;
var counter:int=0;
var generalTimer:Timer=new Timer(1);
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);

//NOW IT IS SET
//UN COMMENT THE LINE BELOW TO NOTICE THE DIFFENCE
//generalFlag=true;

testhalgheh();

function generalfunc(e:TimerEvent=null):void {
generalFlag=true;
//trace(  generalFlag  + generalFlag)
}

function testhalgheh():void {   
generalTimer.start();
//generalFlag IS FALSE AT THIS MOMENT, BECAUSE THE generalfunc IS NOT 
YET CALLED
while (counter1000) {
if (generalFlag==true) {
trace(hello);
counter++;
}
}
}


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] loop and Timer problem?????????

2011-08-29 Thread Cor
It does not effect your CPU, but because of the never ending loop, your app
crashes.

Best regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of nasim h
Sent: maandag 29 augustus 2011 21:27
To: Flash Coders List
Subject: RE: [Flashcoders] loop and Timer problem?

I Cant understad
why is that
when the timer start it should work independence any thing but it wait for
finish th loop can u explain the timer and loop i know them but i cant
understand how they work and has an effect on cpu

--- On Mon, 8/29/11, Cor c...@chello.nl wrote:

From: Cor c...@chello.nl
Subject: RE: [Flashcoders] loop and Timer problem?
To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Date: Monday, August 29, 2011, 2:44 PM

TRY THIS:


var forsate,generalFlag:Boolean;
var counter:int=0;
var generalTimer:Timer=new Timer(1);
generalTimer.addEventListener(TimerEvent.TIMER,generalfunc);

//NOW IT IS SET
//UN COMMENT THE LINE BELOW TO NOTICE THE DIFFENCE //generalFlag=true;

testhalgheh();

function generalfunc(e:TimerEvent=null):void {
    generalFlag=true;
    //trace(  generalFlag  + generalFlag) }

function testhalgheh():void {
    generalTimer.start();
    //generalFlag IS FALSE AT THIS MOMENT, BECAUSE THE generalfunc IS NOT
YET CALLED
    while (counter1000) {
        if (generalFlag==true) {
            trace(hello);
            counter++;
        }
    }
}


___
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] array problem,loop.plot

2011-08-22 Thread Cor
Not the solution, but I notice you try to add .001 to an integer.
So the var i should be a Number?


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of nasim h
Sent: maandag 22 augustus 2011 9:12
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] array problem,loop.plot

hi
In my program create x,y  and i should plot it , the number of point are too
much
2*10 ^ 8
i use for  to create point depend on it's formula but my for stuck in 1
with step .001

for( var i:int= -1 ;i1;i+=.001) { arr[i]=new object() arr[i].x=i
arr[i].y=5*Math.sin(20*i);
functiononlinedraw()
}

then in another function i plot the point oe by one by graphics.lineTo(x,y)
if the distance be more than 1 it will stuck in loop and give me error
more than 15S my program generate x,y and i should plot it one by one but ,
i think flash dont let me plot poin until the loop finished myproblems
1: how can i do  up senario is there better way?
2: Is there a way to set delay in for loop , and i make smal for  to show 
ploted point that user can see on that time and after delay i full  remain
on array ?
how can write this dealy?
3: is this write that array can store data  until the last index of them
,and the last index of them is last integer number ???
 


___
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] Incorrect XML from PHP to Flash

2011-07-21 Thread Cor
Hi Karl,

Thank you!
I already use mysql_real_escape_string() to write to my database.
And in fact I am reading the http://www.php.net/manual/... at the moment you
send your mail.

I do think it has to do with using URLVariables in Flash rather than my
database or PHP.
I have looked at the tutorials on 
http://www.developphp.com/view.php?tid=740t=Discover_Dynamic_XML_MySQL_PHP_
Database_Results_Loop_Tutorial
 and there is the same construction but his works appearantly...
 
Best regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: donderdag 21 juli 2011 8:49
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash

Hi Cor,
I think it is because information added to a database is usually escaped, so
when you pull it out, you get the escaped string instead of what you
originally typed.
Most, not all php coders, will put the string through something like
mysql_real_escape_string()
before inserting it into the database which will produce the exact results
your getting.
If you apply one of the following functions to the information once pulled
out, it should work.

You could try..

$String = htmlspecialchars_decode($string, ENT_QUOTES);

or

$String = html_entity_decode($string, ENT_QUOTES, 'UTF-8');

(There are also different options for the second and third parameters.
ENT_QUOTES and 'UTF-8' can be changed to your suiting depending on what
style of quoting or character set you need. But for what your needing, I
think ENT_QUOTES is right.
It will return p  instead of quote;lt;pgt;quote; (that is what
ENT_NOQUOTES does).)

I suggest these links if you want to learn more about what's going on with
these to see if they are a fit.

http://www.php.net/manual/en/function.htmlspecialchars-decode.php

http://www.php.net/manual/en/function.html-entity-decode.php

Also, if you find it still not working, use one of the above functions, but
then try putting the return $String text inside a CDATA [].

HTH,

Best,
Karl


On Jul 21, 2011, at 12:41 AM, Cor wrote:

 Is the issue due to sending URLVariables to PHP and Flash expects a 
 value-pair back???


 ___
 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

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Incorrect XML from PHP to Flash {RESOLVED}

2011-07-21 Thread Cor
OK, so when I change the output line in my PHP from:
print  $response;
to
print returnString=$response;

It traces out a correct XML:
?xml version=1.0 encoding=UTF-8 ?
dataprojectproject_code![CDATA[1]]/project_codeproject_datum![C
DATA[2011-07-19]]/project_datumproject_klant_nummer![CDATA[1]]/proje
ct_klant_nummerproject_naam![CDATA[project naam
1]]/project_naamproject_omschrijving![CDATA[project omschrijving
1]]/project_omschrijvingproject_werkzaamheden![CDATA[project
werkzh]]/project_werkzaamhedenproject_ordernummer_klant![CDATA[project
ordernummer klant
1]]/project_ordernummer_klantproject_contactpersoon![CDATA[project
Tinus
Plosteling]]/project_contactpersoonproject_aanneemsom![CDATA[3000.00]]
/project_aanneemsomproject_opdracht![CDATA[lopend]]/project_opdracht
/project/data

So flash expects a key-value pair!!!

Thanks to all you responded to help me

Best regards,
Cor van Dooren
www.codobyte.com


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: donderdag 21 juli 2011 9:04
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Incorrect XML from PHP to Flash

Hi Karl,

Thank you!
I already use mysql_real_escape_string() to write to my database.
And in fact I am reading the http://www.php.net/manual/... at the moment you
send your mail.

I do think it has to do with using URLVariables in Flash rather than my
database or PHP.
I have looked at the tutorials on
http://www.developphp.com/view.php?tid=740t=Discover_Dynamic_XML_MySQL_PHP_
Database_Results_Loop_Tutorial
 and there is the same construction but his works appearantly...
 
Best regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: donderdag 21 juli 2011 8:49
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash

Hi Cor,
I think it is because information added to a database is usually escaped, so
when you pull it out, you get the escaped string instead of what you
originally typed.
Most, not all php coders, will put the string through something like
mysql_real_escape_string()
before inserting it into the database which will produce the exact results
your getting.
If you apply one of the following functions to the information once pulled
out, it should work.

You could try..

$String = htmlspecialchars_decode($string, ENT_QUOTES);

or

$String = html_entity_decode($string, ENT_QUOTES, 'UTF-8');

(There are also different options for the second and third parameters.
ENT_QUOTES and 'UTF-8' can be changed to your suiting depending on what
style of quoting or character set you need. But for what your needing, I
think ENT_QUOTES is right.
It will return p  instead of quote;lt;pgt;quote; (that is what
ENT_NOQUOTES does).)

I suggest these links if you want to learn more about what's going on with
these to see if they are a fit.

http://www.php.net/manual/en/function.htmlspecialchars-decode.php

http://www.php.net/manual/en/function.html-entity-decode.php

Also, if you find it still not working, use one of the above functions, but
then try putting the return $String text inside a CDATA [].

HTH,

Best,
Karl


On Jul 21, 2011, at 12:41 AM, Cor wrote:

 Is the issue due to sending URLVariables to PHP and Flash expects a 
 value-pair back???


 ___
 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

___
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] Incorrect XML from PHP to Flash

2011-07-21 Thread Cor
The trace result of my DataProvider is:
data
project
project_code![CDATA[1]]/project_code
project_datum![CDATA[2011-07-19]]/project_datum
project_naam![CDATA[project naam 1]]/project_naam
project_omschrijving![CDATA[project omschrijving
1]]/project_omschrijving
project_werkzaamheden![CDATA[project werkzh]]/project_werkzaamheden
project_opdracht![CDATA[lopend]]/project_opdracht
project_klant_nummer![CDATA[1]]/project_klant_nummer
project_ordernummer_klant![CDATA[project ordernummer klant
1]]/project_ordernummer_klant
project_contactpersoon![CDATA[project Tinus
Plosteling]]/project_contactpersoon
project_aanneemsom![CDATA[3000.00]]/project_aanneemsom
/project
/data

Which is exactly right, and yet the columns in my DataGrid in Flash are not
placed in the right order, but randomly?


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: donderdag 21 juli 2011 9:35
To: 'Flash Coders List'
Subject: RE: [Flashcoders] Incorrect XML from PHP to Flash {RESOLVED}

OK, so when I change the output line in my PHP from:
print  $response;
to
print returnString=$response;

It traces out a correct XML:
?xml version=1.0 encoding=UTF-8 ?
dataprojectproject_code![CDATA[1]]/project_codeproject_datum![C
DATA[2011-07-19]]/project_datumproject_klant_nummer![CDATA[1]]/proje
ct_klant_nummerproject_naam![CDATA[project naam
1]]/project_naamproject_omschrijving![CDATA[project omschrijving
1]]/project_omschrijvingproject_werkzaamheden![CDATA[project
werkzh]]/project_werkzaamhedenproject_ordernummer_klant![CDATA[project
ordernummer klant
1]]/project_ordernummer_klantproject_contactpersoon![CDATA[project
Tinus
Plosteling]]/project_contactpersoonproject_aanneemsom![CDATA[3000.00]]
/project_aanneemsomproject_opdracht![CDATA[lopend]]/project_opdr
acht
/project/data

So flash expects a key-value pair!!!

Thanks to all you responded to help me

Best regards,
Cor van Dooren
www.codobyte.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Incorrect XML from PHP to Flash {RESOLVED}

2011-07-21 Thread Cor
Thank you.

I have:
var myXML:XML =  XML(e.target.data.returnString);
trace(myXML); outputs correctly:
--
data
  project
project_code![CDATA[1]]/project_code
project_datum![CDATA[2011-07-19]]/project_datum
project_naam![CDATA[project naam 1]]/project_naam
project_omschrijving![CDATA[project omschrijving
1]]/project_omschrijving
project_werkzaamheden![CDATA[project
werkzh]]/project_werkzaamheden
project_opdracht![CDATA[lopend]]/project_opdracht
project_klant_nummer![CDATA[1]]/project_klant_nummer
project_ordernummer_klant![CDATA[project ordernummer klant
1]]/project_ordernummer_klant
project_contactpersoon![CDATA[project Tinus
Plosteling]]/project_contactpersoon
project_aanneemsom![CDATA[3000.00]]/project_aanneemsom
  /project
  project
project_code![CDATA[2]]/project_code
project_datum![CDATA[2011-07-21]]/project_datum
project_naam![CDATA[naam 2]]/project_naam
project_omschrijving![CDATA[omsch 2]]/project_omschrijving
project_werkzaamheden![CDATA[werk 2]]/project_werkzaamheden
project_opdracht![CDATA[geen order]]/project_opdracht
project_klant_nummer![CDATA[2]]/project_klant_nummer
project_ordernummer_klant![CDATA[ord-kl
2]]/project_ordernummer_klant
project_contactpersoon![CDATA[contp 2]]/project_contactpersoon
project_aanneemsom![CDATA[]]/project_aanneemsom
  /project
/data
--

But now my DataGrid does not show the result in the right order.
It even shows different on refresh/reload?


regards,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik
Andersson
Sent: donderdag 21 juli 2011 15:10
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash {RESOLVED}

Cor skriver:
 OK, so when I change the output line in my PHP from:
 print  $response;
 to
 print returnString=$response;

 So flash expects a key-value pair!!!


Now the real question is, why is Flash expecting that format to begin with?
You shouldn't change your php code. You should change the actionscript code.
___
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] Incorrect XML from PHP to Flash

2011-07-20 Thread Cor
I am loading data from a mySQL database into Flash with PHP.
But I get a string with all the tag-signs replaced with %-characters:

%3C%3Fxml%20version=%221%2E0%22%20encoding%3D%22UTF%2D8%22%20%3F%3E%0A%3Cdat
a%3E%3Cproject%3E%3Cproject%5Fcode%3E.



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Incorrect XML from PHP to Flash

2011-07-20 Thread Cor
This is it without the DB-conection ofcourse:

if (isset($_POST['sendRequest'])  $_POST['sendRequest'] ==
read_all_projects) {  
  $sql = SELECT * FROM tbl_projecten;
$result = mysql_query($sql);
header(Content-type: text/xml);
$response ='?xml version=1.0 encoding=UTF-8 ?';
$response .=\ndata;
  while($row = mysql_fetch_object($result)){
$response.='project';

$response.='project_code![CDATA['.$row-project_code.']]/project_code'
;

$response.='project_datum![CDATA['.$row-project_datum.']]/project_datu
m';

$response.='project_klant_nummer![CDATA['.$row-project_klant_nummer.']]
/project_klant_nummer';

$response.='project_naam![CDATA['.$row-project_naam.']]/project_naam'
;

$response.='project_omschrijving![CDATA['.$row-project_omschrijving.']]
/project_omschrijving';

$response.='project_werkzaamheden![CDATA['.$row-project_werkzaamheden.']
]/project_werkzaamheden';

$response.='project_ordernummer_klant![CDATA['.$row-project_ordernummer_
klant.']]/project_ordernummer_klant';

$response.='project_contactpersoon![CDATA['.$row-project_contactpersoon.
']]/project_contactpersoon';

$response.='project_aanneemsom![CDATA['.$row-project_aanneemsom.']]/pr
oject_aanneemsom';

$response.='project_opdracht![CDATA['.$row-project_opdracht.']]/projec
t_opdracht';
$response.='/project'; 
}
$response.=/data;
print $response;
}

Best regards,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik
Andersson
Sent: woensdag 20 juli 2011 16:37
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash

Your php code is broken then.
___
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] Incorrect XML from PHP to Flash

2011-07-20 Thread Cor
It looks good directly it is just in Flash:

This XML file does not appear to have any style information associated with
it. The document tree is shown below.
 
dataprojectproject_code1/project_codeproject_datum2011-07-19/proj
ect_datumproject_klant_nummer1/project_klant_nummerproject_naamprojec
t naam 1/project_naamproject_omschrijvingproject omschrijving
1/project_omschrijvingproject_werkzaamhedenproject
werkzh/project_werkzaamhedenproject_ordernummer_klantproject ordernummer
klant 1/project_ordernummer_klantproject_contactpersoonproject Tinus
Plosteling/project_contactpersoonproject_aanneemsom3000.00/project_aann
eemsomproject_opdrachtlopend/project_opdracht/project/data

I will look at your suggestion now.
Due to my time zone, I had to take a beauty sleep. :-)

Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike
Sent: woensdag 20 juli 2011 16:58
To: Flash Coders List
Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash

Hmm, maybe not URL encoding.

What happens when you call the php page directly - in Firefox, does it show
you the XML, or do you have to view the source?  (The former would mean
firefox considered it valid xml)

Does the XML show all the url-encoded characters, or is it just in Flash?

As an aside to help with your XML, you could do this - it might not help
your encoding, check the results by echoing them out I guess?

 //Don't worry about \n and whitespace in your $response var, the
DOMDocument will sort it out ;)
 //You don't need to include the ?xml? tag either.
 $response = 
 //...
 $doc = new DOMDocument();
 $doc-preserveWhiteSpace = false;
 $doc-formatOutput = true;
 $doc-loadXML($response);
 echo $doc-saveXML();


 Another trick might be to do this to make your output a bit more 
easy to automate:

 $fields = array(code, datum, klant_nummer, ...);

 while($row = mysql_fetch_assoc($result)) {
 $response .=project;


 foreach($fields as $field) {
 $response .= project_${field}![CDATA[ .$row[project_ 
.$field] .]]/project_${field};
 }

HTH

Glen

On 20/07/2011 15:39, Cor wrote:
 This is it without the DB-conection ofcourse:

 if (isset($_POST['sendRequest'])  $_POST['sendRequest'] ==
 read_all_projects) {
$sql = SELECT * FROM tbl_projecten;
   $result = mysql_query($sql);
   header(Content-type: text/xml);
   $response ='?xml version=1.0 encoding=UTF-8 ?';
   $response .=\ndata;
while($row = mysql_fetch_object($result)){
   $response.='project';
   

$response.='project_code![CDATA['.$row-project_code.']]/project_code'
 ;
   

$response.='project_datum![CDATA['.$row-project_datum.']]/project_datu
 m';
   

$response.='project_klant_nummer![CDATA['.$row-project_klant_nummer.']]
 /project_klant_nummer';
   

$response.='project_naam![CDATA['.$row-project_naam.']]/project_naam'
 ;
   

$response.='project_omschrijving![CDATA['.$row-project_omschrijving.']]
 /project_omschrijving';
   

$response.='project_werkzaamheden![CDATA['.$row-project_werkzaamheden.']
 ]/project_werkzaamheden';
   

$response.='project_ordernummer_klant![CDATA['.$row-project_ordernummer_
 klant.']]/project_ordernummer_klant';
   

$response.='project_contactpersoon![CDATA['.$row-project_contactpersoon.
 ']]/project_contactpersoon';
   

$response.='project_aanneemsom![CDATA['.$row-project_aanneemsom.']]/pr
 oject_aanneemsom';
   

$response.='project_opdracht![CDATA['.$row-project_opdracht.']]/projec
 t_opdracht';
   $response.='/project';
   }
   $response.=/data;
   print $response;
 }

 Best regards,
 Cor


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik
 Andersson
 Sent: woensdag 20 juli 2011 16:37
 To: Flash Coders List
 Subject: Re: [Flashcoders] Incorrect XML from PHP to Flash

 Your php code is broken then.
 ___
 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] Incorrect XML from PHP to Flash

2011-07-20 Thread Cor
Is the issue due to sending URLVariables to PHP and Flash expects a
value-pair back???


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] scrolling webpage with flash

2011-07-12 Thread Cor
I have now. :-)
Thank you!

Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Amanda Kuek
Sent: dinsdag 12 juli 2011 3:59
To: Flash Coders List
Subject: Re: [Flashcoders] scrolling webpage with flash

Hi Cor,

Have you seen BrowserCanvas?

http://www.dncompute.com/blog/2008/06/23/browsercanvas-the-worlds-easiest-wa
y-to-dynamically-resize-flash.html

It sounds like exactly what you need and it works like a dream.

Cheers,
Amanda.


On Fri, Jul 1, 2011 at 6:36 AM, Cor c...@chello.nl wrote:

 Eric,

 Thank you!
 That's exactly the problem.
 I don't know how to do this in javascript, etc.

 Best regards,
 Cor van Dooren
 www.codobyte.com
 --
  There are only 10 types of people in the world:
   Those who understand binary and those who don't.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. 
 Dolecki
 Sent: donderdag 30 juni 2011 22:32
 To: Flash Coders List
 Subject: Re: [Flashcoders] scrolling webpage with flash

 I think I know what you want. Have your app calculate how high it 
 needs to be, then call out using javascript to a method which changes 
 the dimensions of a div, where your SWF embed is made at 100%. It can 
 keep calling that method. Just make sure your SWF has noScale, etc.
 set within it. I've done this to generate charts that are a dynamic 
 height based on data to represent... the page will expand to 
 accommodate the div so your SWF never gets clipped.


  Google Voice: (508) 656-0622
  Twitter: eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
  http://blog.ericd.net



 On Thu, Jun 30, 2011 at 3:32 PM, Cor c...@chello.nl wrote:
  Thanks Matt,
 
  Swffit works fine... when resizing the browser, but my issue is that 
  the browser is never resized, but the content in the swf grows
 dynamically.
  So I would like to get my swf-dimensions variable.
 
  Best regards,
  Cor
 
  -Original Message-
  From: flashcoders-boun...@chattyfig.figleaf.com
  [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
  Sent: donderdag 30 juni 2011 17:50
  To: Flash Coders List
  Subject: Re: [Flashcoders] scrolling webpage with flash
 
  then you should definitely check out SWFFIT, that can do what you're 
  looking for.
 
  .m
 
  On Thu, Jun 30, 2011 at 11:38 AM, Cor c...@chello.nl wrote:
  I need loaded content to be able to grow within my SWF to any height.
  If this overshoots the html-height then the scrollbar of the 
  browser will show.
 
 
  Best regards,
  Cor
 
  -Original Message-
  From: flashcoders-boun...@chattyfig.figleaf.com
  [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
  Sent: donderdag 30 juni 2011 17:33
  To: Flash Coders List
  Subject: Re: [Flashcoders] scrolling webpage with flash
 
  Not sure what you need exactly, but SWFFit is a nice little utility 
  for various flash resizing needs: http://swffit.millermedeiros.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 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] scrolling webpage with flash

2011-06-30 Thread Cor
I am creating a flash site but need it to be dynamic in height so it is
scrollable.
So I need to extend the stage height to the content so the html is
scrolling?
How do I need to set this in Flash/Actionscript 3.0???
 
TIA,
Cor 
 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] scrolling webpage with flash

2011-06-30 Thread Cor
Thanks Hendrik.

By embedding code, you mean in Publish setting??

Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik
Andersson
Sent: donderdag 30 juni 2011 17:06
To: Flash Coders List
Subject: Re: [Flashcoders] scrolling webpage with flash

Set the embeding code to use a dynamic size, such as 100 %. Then use the
Stage.stageWidth and Stage.stageHeight properties to do your layout.
___
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] scrolling webpage with flash

2011-06-30 Thread Cor
I need loaded content to be able to grow within my SWF to any height.
If this overshoots the html-height then the scrollbar of the browser will
show.


Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
Sent: donderdag 30 juni 2011 17:33
To: Flash Coders List
Subject: Re: [Flashcoders] scrolling webpage with flash

Not sure what you need exactly, but SWFFit is a nice little utility for
various flash resizing needs: http://swffit.millermedeiros.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


RE: [Flashcoders] scrolling webpage with flash

2011-06-30 Thread Cor
Thanks Matt,

Swffit works fine... when resizing the browser, but my issue is that the
browser is never resized, but the content in the swf grows dynamically.
So I would like to get my swf-dimensions variable.

Best regards,
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
Sent: donderdag 30 juni 2011 17:50
To: Flash Coders List
Subject: Re: [Flashcoders] scrolling webpage with flash

then you should definitely check out SWFFIT, that can do what you're looking
for.

.m

On Thu, Jun 30, 2011 at 11:38 AM, Cor c...@chello.nl wrote:
 I need loaded content to be able to grow within my SWF to any height.
 If this overshoots the html-height then the scrollbar of the browser 
 will show.


 Best regards,
 Cor

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
 Sent: donderdag 30 juni 2011 17:33
 To: Flash Coders List
 Subject: Re: [Flashcoders] scrolling webpage with flash

 Not sure what you need exactly, but SWFFit is a nice little utility 
 for various flash resizing needs: http://swffit.millermedeiros.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 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] scrolling webpage with flash

2011-06-30 Thread Cor
Thanks Kevin!

I understand what you are saying, but I have no ideas how to do this.
Can you be more specific or perhaps some example?

Best regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Newman
Sent: donderdag 30 juni 2011 22:27
To: Flash Coders List
Subject: Re: [Flashcoders] scrolling webpage with flash

It sounds like you would need to use ExternalInterface and JavaScript to
resize your HTML container for the swf.

I'd suggest wrapping the swf container (whatever embedding solution you are
using) in a div, setting your swf container (object/embed tag, swfobject, or
whatever) to 100%, and setting the height of parent div when the content
size changes from within the swf, using ExternalInterface.

There is no way to set the size of the stage from within Flash.

Kevin N.



On 6/30/11 3:32 PM, Cor wrote:
 Thanks Matt,

 Swffit works fine... when resizing the browser, but my issue is that 
 the browser is never resized, but the content in the swf grows
dynamically.
 So I would like to get my swf-dimensions variable.

 Best regards,
 Cor

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
 Sent: donderdag 30 juni 2011 17:50
 To: Flash Coders List
 Subject: Re: [Flashcoders] scrolling webpage with flash

 then you should definitely check out SWFFIT, that can do what you're 
 looking for.

 .m

 On Thu, Jun 30, 2011 at 11:38 AM, Corc...@chello.nl  wrote:
 I need loaded content to be able to grow within my SWF to any height.
 If this overshoots the html-height then the scrollbar of the browser 
 will show.


 Best regards,
 Cor

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
 Sent: donderdag 30 juni 2011 17:33
 To: Flash Coders List
 Subject: Re: [Flashcoders] scrolling webpage with flash

 Not sure what you need exactly, but SWFFit is a nice little utility 
 for various flash resizing needs: http://swffit.millermedeiros.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 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] scrolling webpage with flash

2011-06-30 Thread Cor
Eric,

Thank you!
That's exactly the problem.
I don't know how to do this in javascript, etc.

Best regards,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don’t.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: donderdag 30 juni 2011 22:32
To: Flash Coders List
Subject: Re: [Flashcoders] scrolling webpage with flash

I think I know what you want. Have your app calculate how high it needs to be, 
then call out using javascript to a method which changes the dimensions of a 
div, where your SWF embed is made at 100%. It can keep calling that method. 
Just make sure your SWF has noScale, etc.
set within it. I've done this to generate charts that are a dynamic height 
based on data to represent... the page will expand to accommodate the div so 
your SWF never gets clipped.


  Google Voice: (508) 656-0622
  Twitter: eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
  http://blog.ericd.net



On Thu, Jun 30, 2011 at 3:32 PM, Cor c...@chello.nl wrote:
 Thanks Matt,

 Swffit works fine... when resizing the browser, but my issue is that 
 the browser is never resized, but the content in the swf grows dynamically.
 So I would like to get my swf-dimensions variable.

 Best regards,
 Cor

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
 Sent: donderdag 30 juni 2011 17:50
 To: Flash Coders List
 Subject: Re: [Flashcoders] scrolling webpage with flash

 then you should definitely check out SWFFIT, that can do what you're 
 looking for.

 .m

 On Thu, Jun 30, 2011 at 11:38 AM, Cor c...@chello.nl wrote:
 I need loaded content to be able to grow within my SWF to any height.
 If this overshoots the html-height then the scrollbar of the browser 
 will show.


 Best regards,
 Cor

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
 Sent: donderdag 30 juni 2011 17:33
 To: Flash Coders List
 Subject: Re: [Flashcoders] scrolling webpage with flash

 Not sure what you need exactly, but SWFFit is a nice little utility 
 for various flash resizing needs: http://swffit.millermedeiros.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 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] AS3 is it possbile to show a movieclip before its all frames loaded

2011-06-13 Thread Cor
Does this help you:

http://www.actionscript.org/forums/showthread.php3?t=151850

regards
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of B Shankar
PEDANA
Sent: maandag 13 juni 2011 10:36
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] AS3 is it possbile to show a movieclip before its all
frames loaded

Hi,

Is it possible to show a movieclip before all its frames(say 100 frames) or
when its first frame is loaded?

Thanks
Shankar
___
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 exploding and reassemble bitmap

2011-06-13 Thread Cor
Not sure, but look at:

www.greensock.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3 exploding and reassemble bitmap

2011-06-13 Thread Cor

Lee Brimelow did something with that:

http://www.gotoandlearn.com/play.php?id=57

http://www.gotoandlearn.com/play?id=107

HTH
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: maandag 13 juni 2011 15:40
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 exploding and reassemble bitmap

I don't need an animation package, a class that cuts a displayObject up, 
disassembles it on a pixel-level basis, explodes it out, and then reassembles 
the pixels of the displayObject in a different location. If I do this myself 
it's going to take a lot of time, looking for something out there that can do 
this already.


  Google Voice: (508) 656-0622
  Twitter: eric_dolecki  XBoxLive: edolecki  PSN: eric_dolecki
  http://blog.ericd.net



On Mon, Jun 13, 2011 at 9:31 AM, Cor c...@chello.nl wrote:

 Not sure, but look at:

 www.greensock.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 mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] using this in AS3 classes?

2011-06-08 Thread Cor
Micky,

There are no stupid questions!
Only stupid people who don't ask their question... and yes, there are stupid 
answers. :-)

As for the prefix, IMO it is unnecessary, but some people find it easier to 
read their code.
I'll will not call myself a pro, but I never use it.

HTH,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com 
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Micky Hulse
Sent: woensdag 8 juni 2011 6:55
To: Flash Coders List
Subject: [Flashcoders] using this in AS3 classes?

Hi,

Stupid question, but...

Let's say I have some class properties:

private var _mc1:MovieClip;
private var _mc2:MovieClip;

... and methods:

private function baz():void { ... }
private function foo():void { ... }

In my code, would it be overkill to always reference the above examples with a 
prefix of this?

For example:

this._mc1 = ...;
this._mc2 = this.mc1;
this.baz();
this.foo();

I could easily do this instead:

_mc1 = ...;
_mc2 = mc1;
baz();
foo();

Sorry if silly question, I am just kinda wondering what the pros do. :)

Best practices?

Thanks!
Micky
___
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 component screen redraw

2011-06-08 Thread Cor
Hoi Willem,

Je moet even je .htaccess aanpassen want je hebt de deur open staan:

http://www.vluchtelingenatlas.nl/php/


Groeten,
Cor van Dooren

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Geografiek
Sent: woensdag 8 juni 2011 14:21
To: Flash Coders List
Subject: [Flashcoders] as3 component screen redraw

Hi list,
In a large project I encounter a strange problem, which I don't know how to
tackle.
The project is almost done and only now it appears that a significant part
of the targetted users view the project on a thin client with NX (?
completely out of my league here).
On 'normal' computers the project behaves as expected but on thin clients
somethimes (not always) there are problems:
From what I have seen this is what happens:
- the project loads properly, pulling in all external assets
- regular Flash AS3 components do not redraw properly but behave as expected
(e.g.: a button is not drawn on screen but for its label (with wrong font).
But clicking the button label results in expected behaviour.
I know nothing about thin clients, except from what wikipedia learns me (one
of their drawbacks is poor multimedia performance) and, of course trouble
shooting is next to impossible as I have no access to a thin client.

My questions:
Does this sound familiar to anybody?
Is there anything I can do from the flash side?
TIA
Willem van den Goorbergh
ps
I put 2 screenshots online at
www.geografiek.nl/anderen/test/test110608thinClient
The lower image is what most users see, the upper image is what some thin
client users see




=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31)30-2719512 or
cell phone: (+31)6-26372378 or by fax: (+31)302719687 snail mail:
Hooghiemstraplein 89 3514 AX UTRECHT Visit our website at: www.geografiek.nl
twitter: @wvdgoorbergh
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=






___
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] reading a very simple XML file

2011-06-08 Thread Cor
Try this:

trace(xmlData.asset[i]);

 
instead of trace(xmlData.children()[i]); // === but I can;t get each node
here...

Groeten,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don't.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash
Sent: woensdag 8 juni 2011 17:10
To: Flash Coders List
Subject: [Flashcoders] reading a very simple XML file

Hi guys, I am pulling out my hair :(, my code can retrieve the xml file
without any problem. But I was not able to retrieve each node in the follow
case.

Would you please help me to take a look my code? am I mising somehing?

Cheers

= XML FILE

?xml version=1.0 encoding=UTF-8?
root
asset type=IMAGE url=www.google.com filename=googlefilename
size=1000/
asset type=IMAGE url=www.yahoo.com filename=yahoofilename
size=1200/
asset type=IMAGE url=www.bing.com filename=bingfilename size=1100/
/root


= AS3 

import flash.events.Event;
var loader:URLLoader = new URLLoader();var request:URLRequest = new
URLRequest(test.xml);var xmlData:XML;var childLength:uint;
loader.addEventListener(Event.COMPLETE,
completeHandler);loader.load(request);
function completeHandler(e:Event):void{
xmlData = XML(e.target.data);
childLength = xmlData.children().length();

//trace(xmlData.children()); // == I can retrieve the data here

for (var i:uint = 0; i  childLength; i++)
{
trace(xmlData.children()[i]); // === but I can;t get each
node here...
}
}


=== code online =

http://www.privatepaste.com/89e38a7292
___
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] reading a very simple XML file

2011-06-08 Thread Cor
I will create a fla and xml and get back to you...

Regards
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash
Sent: woensdag 8 juni 2011 17:29
To: Flash Coders List
Subject: Re: [Flashcoders] reading a very simple XML file

thanks Cor, I have already tried this and it returned nothing as well. It's
very weird!.

I was able to retrieve the length by this, it returned 3.

trace(xmlData.asset.length());



On Wed, Jun 8, 2011 at 11:17 AM, Cor c...@chello.nl wrote:

 Try this:

 trace(xmlData.asset[i]);


 instead of trace(xmlData.children()[i]); // === but I can;t get each 
 node here...

 Groeten,
 Cor van Dooren
 www.codobyte.com
 --
  There are only 10 types of people in the world:
   Those who understand binary and those who don't.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE 
 Flash
 Sent: woensdag 8 juni 2011 17:10
 To: Flash Coders List
 Subject: [Flashcoders] reading a very simple XML file

 Hi guys, I am pulling out my hair :(, my code can retrieve the xml 
 file without any problem. But I was not able to retrieve each node in 
 the follow case.

 Would you please help me to take a look my code? am I mising somehing?

 Cheers

 = XML FILE

 ?xml version=1.0 encoding=UTF-8? root asset type=IMAGE 
 url=www.google.com filename=googlefilename
 size=1000/
 asset type=IMAGE url=www.yahoo.com filename=yahoofilename
 size=1200/
 asset type=IMAGE url=www.bing.com filename=bingfilename
 size=1100/
 /root


 = AS3 

 import flash.events.Event;
 var loader:URLLoader = new URLLoader();var request:URLRequest = new 
 URLRequest(test.xml);var xmlData:XML;var childLength:uint; 
 loader.addEventListener(Event.COMPLETE,
 completeHandler);loader.load(request);
 function completeHandler(e:Event):void{
xmlData = XML(e.target.data);
childLength = xmlData.children().length();

//trace(xmlData.children()); // == I can retrieve the data 
 here

for (var i:uint = 0; i  childLength; i++)
{
trace(xmlData.children()[i]); // === but I can;t get 
 each node here...
}
}


 === code online =

 http://www.privatepaste.com/89e38a7292
 ___
 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] reading a very simple XML file

2011-06-08 Thread Cor
Aahh, I understand.

Your children are in fact empty!!
You use only attributes.

Try this: trace(xmlData.asset[i].@size)

Groeten,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don't.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash
Sent: woensdag 8 juni 2011 17:29
To: Flash Coders List
Subject: Re: [Flashcoders] reading a very simple XML file

thanks Cor, I have already tried this and it returned nothing as well. It's
very weird!.

I was able to retrieve the length by this, it returned 3.

trace(xmlData.asset.length());



On Wed, Jun 8, 2011 at 11:17 AM, Cor c...@chello.nl wrote:

 Try this:

 trace(xmlData.asset[i]);


 instead of trace(xmlData.children()[i]); // === but I can;t get each 
 node here...

 Groeten,
 Cor van Dooren
 www.codobyte.com
 --
  There are only 10 types of people in the world:
   Those who understand binary and those who don't.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE 
 Flash
 Sent: woensdag 8 juni 2011 17:10
 To: Flash Coders List
 Subject: [Flashcoders] reading a very simple XML file

 Hi guys, I am pulling out my hair :(, my code can retrieve the xml 
 file without any problem. But I was not able to retrieve each node in 
 the follow case.

 Would you please help me to take a look my code? am I mising somehing?

 Cheers

 = XML FILE

 ?xml version=1.0 encoding=UTF-8? root asset type=IMAGE 
 url=www.google.com filename=googlefilename
 size=1000/
 asset type=IMAGE url=www.yahoo.com filename=yahoofilename
 size=1200/
 asset type=IMAGE url=www.bing.com filename=bingfilename
 size=1100/
 /root


 = AS3 

 import flash.events.Event;
 var loader:URLLoader = new URLLoader();var request:URLRequest = new 
 URLRequest(test.xml);var xmlData:XML;var childLength:uint; 
 loader.addEventListener(Event.COMPLETE,
 completeHandler);loader.load(request);
 function completeHandler(e:Event):void{
xmlData = XML(e.target.data);
childLength = xmlData.children().length();

//trace(xmlData.children()); // == I can retrieve the data 
 here

for (var i:uint = 0; i  childLength; i++)
{
trace(xmlData.children()[i]); // === but I can;t get 
 each node here...
}
}


 === code online =

 http://www.privatepaste.com/89e38a7292
 ___
 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] reading a very simple XML file

2011-06-08 Thread Cor
This solves it:

//XML:

?xml version=1.0 encoding=UTF-8?
root
asset
 typeIMAGE/type
 urlwww.google.com/url
 filenamegooglefilename/filename
 size1000/size
/asset
asset
 typeIMAGE/type
 urlwww.yahoo.com/url
 filenameyahoofilename/filename
 size1200/size
/assetasset
 typeIMAGE/type
 urlwww.bing.com/url
 filenamebingfilename/filename
 size1100/size
/asset
/root

//FLA
import flash.events.Event;

var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(assets.xml);
var xmlData:XML;
var childLength:uint;

loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(request);

function completeHandler(e:Event):void {
xmlData = XML(e.target.data);
childLength = xmlData.children().length();
trace(xmlData.children().length());
//trace(xmlData.children()); // == I can retrieve the data here

for (var i:uint = 0; i  childLength; i++) {
trace(xmlData.asset[i]);// === but I can;t get each node
here...
}
}

HTH,
Cor 


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash
Sent: woensdag 8 juni 2011 17:29
To: Flash Coders List
Subject: Re: [Flashcoders] reading a very simple XML file

thanks Cor, I have already tried this and it returned nothing as well. It's
very weird!.

I was able to retrieve the length by this, it returned 3.

trace(xmlData.asset.length());



On Wed, Jun 8, 2011 at 11:17 AM, Cor c...@chello.nl wrote:

 Try this:

 trace(xmlData.asset[i]);


 instead of trace(xmlData.children()[i]); // === but I can;t get each 
 node here...

 Groeten,
 Cor van Dooren
 www.codobyte.com
 --
  There are only 10 types of people in the world:
   Those who understand binary and those who don't.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE 
 Flash
 Sent: woensdag 8 juni 2011 17:10
 To: Flash Coders List
 Subject: [Flashcoders] reading a very simple XML file

 Hi guys, I am pulling out my hair :(, my code can retrieve the xml 
 file without any problem. But I was not able to retrieve each node in 
 the follow case.

 Would you please help me to take a look my code? am I mising somehing?

 Cheers

 = XML FILE

 ?xml version=1.0 encoding=UTF-8? root asset type=IMAGE 
 url=www.google.com filename=googlefilename
 size=1000/
 asset type=IMAGE url=www.yahoo.com filename=yahoofilename
 size=1200/
 asset type=IMAGE url=www.bing.com filename=bingfilename
 size=1100/
 /root


 = AS3 

 import flash.events.Event;
 var loader:URLLoader = new URLLoader();var request:URLRequest = new 
 URLRequest(test.xml);var xmlData:XML;var childLength:uint; 
 loader.addEventListener(Event.COMPLETE,
 completeHandler);loader.load(request);
 function completeHandler(e:Event):void{
xmlData = XML(e.target.data);
childLength = xmlData.children().length();

//trace(xmlData.children()); // == I can retrieve the data 
 here

for (var i:uint = 0; i  childLength; i++)
{
trace(xmlData.children()[i]); // === but I can;t get 
 each node here...
}
}


 === code online =

 http://www.privatepaste.com/89e38a7292
 ___
 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] dynmically adding waves together problem

2011-06-07 Thread Cor
I draw my wave with this class:

package com.codobyte.display{
/*
@class: Sinus

@author:Cor van Dooren

@usage: Draw sinus dynamically
@syntax:var s:Sinus= new Sinus(params);
@params:positieX:int=0,
positieY:int=200,
lengte:int=200,
hoogte:int=200,
kleur:uint=0x00,
lijndikte:int=2
@methods:   s.startWave();
s.stopWave();   
*/
import flash.display.*;
import flash.events.*;

public class Sinus extends Sprite {

private var positieX:int;
private var positieY:int;
private var hoogte:int;
private var lengte:int;
private var kleur:uint;
private var lijndikte:int;
private var val:int;

public function Sinus(positieX:int=0, positieY:int=200,
lengte:int=200, hoogte:int=200, kleur:uint=0x00, lijndikte:int=2) {
this.positieX=positieX;
this.positieY= positieY;
this.lengte= lengte;
this.hoogte= hoogte;
this.kleur= kleur;
this.lijndikte=lijndikte;
val=0;
if (stage) {
init(null);
} else {
addEventListener(Event.ADDED_TO_STAGE, init,
false, 0, true);
}
}//end CONSTRUCTOR

private function init(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
graphics.lineStyle(lijndikte, kleur);
graphics.moveTo(positieX, positieY);
addEventListener(Event.REMOVED_FROM_STAGE, stopWave,
false,0,true);
}
public function startWave():void {
addEventListener(Event.ENTER_FRAME, enterframe,
false, 0, true);
}

public function stopWave():void {
removeEventListener(Event.ENTER_FRAME, enterframe);
removeEventListener(Event.REMOVED_FROM_STAGE,
stopWave);
}

private function enterframe(e:Event):void {
tekenSinus(val+=2);
}

private function tekenSinus(psdValue:int):void {
graphics.lineTo(positieX+psdValue+2,
positieY+hoogte*Math.sin(psdValue*360/lengte * Math.PI/180));
}
}
}

So how would I fit this in?
Reagrds,
Cor van Dooren


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steve Abaffy
Sent: maandag 6 juni 2011 21:41
To: 'Flash Coders List'
Subject: RE: [Flashcoders] dynmically adding waves together problem

It would seem to me that you are drawing the two waves with some kind of
sine function.

Y1 = Sin(x1+Phase1)
Y2 = Sin(x2+Phase2)

So all you have do to create the third is
Y3 = Sin(x1+Phase1) + Sin(x2+Phase2)

Remember of course that Y3 will have a max/min of +2/-2 assuming of course
that originals are +1/-1 range as they should be with no amplitude
adjustment.




-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cor
Sent: Monday, June 06, 2011 2:16 PM
To: Flash Coders List
Subject: [Flashcoders] dynmically adding waves together problem

Hi All,
 
I need to draw waves dynamically which can be influenced at runtime.
These waves then have to add together and show the result in a third wave.
 
Here you can see the problem graphically:
 
http://www.codobyte.com/waves/
 
Every help is welcome!
 
TIA,
Cor van Dooren
 
___
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] dynmically adding waves together problem

2011-06-06 Thread Cor
Hi All,
 
I need to draw waves dynamically which can be influenced at runtime.
These waves then have to add together and show the result in a third wave.
 
Here you can see the problem graphically:
 
http://www.codobyte.com/waves/
 
Every help is welcome!
 
TIA,
Cor van Dooren
 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Panorama creation

2011-05-23 Thread Cor
PTGui


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Randy Tinfow
Sent: zondag 22 mei 2011 23:07
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Panorama creation

Any applications recommended for creating panoramas for Flash?  I've seen
software like Panoweaver and FlashVR, but have not been able to get much
information from the publishers, such as Actionscript version supported.  I
need
AS3 to be supported so we can create a multi-touch UI.

TIA,

Randy Tinfow
___
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] typechecking ActionScript 3.0

2011-05-20 Thread Cor
Hi all,

Anyone encountered this error before?

Warning: 5004: The file 'playerglobal.swc', which is required for
typechecking ActionScript 3.0, could not be found. Please make sure the
directory '$(AppConfig)/ActionScript 3.0/Classes' is listed in the global
classpath of the ActionScript 3.0 Preferences.

I checked the directory and found that file is in there. I even reinstalled
the application only to have that error again later on.

Does anyone know how to solve this??

Regards
Cor

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] typechecking ActionScript 3.0

2011-05-20 Thread Cor
I found it at the location which was pointed in the error:

C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript
3.0\FP9

No errors any more

Thank you Kerry!

Regards,
Cor van Dooren
The Netherlands


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kerry
Thompson
Sent: vrijdag 20 mei 2011 13:53
To: Flash Coders List
Subject: Re: [Flashcoders] typechecking ActionScript 3.0

Cor wrote:

Anyone encountered this error before?

 Warning: 5004: The file 'playerglobal.swc', which is required for 
 typechecking ActionScript 3.0, could not be found. Please make sure 
 the directory '$(AppConfig)/ActionScript 3.0/Classes' is listed in the 
 global classpath of the ActionScript 3.0 Preferences.

 I checked the directory and found that file is in there. I even 
 reinstalled the application only to have that error again later on.


In Flash, File - Publish Settings - Flash tab - beside ActionScript 3.0,
Settings - Library path. You should see '$(AppConfig)/ActionScript
3.0/Classes' there. If it's not, click on the folder icon navigate to it,
choose it, and you should be good.

On my system, Windows 7, it's in C:\Users\Kerry\AppData\Local\Adobe\Flash
CS5.5\en_US\Configuration. It's the same on CS5 and CS4 (except, of course,
in  CS5 and CS4 folders). In CS3, the only difference is the folder is
called Flash CS3\en.

Cordially,

Kerry Thompson
___
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] send email from flash project (exe)

2011-05-10 Thread Cor
Hi Bassam,

You have to embed the Arabic characters.

Groeten,
Cor van Dooren
www.codobyte.com
--
 There are only 10 types of people in the world:
   Those who understand binary and those who don't.

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Bassam M
Sent: dinsdag 10 mei 2011 11:10
To: Flash Coders List
Subject: Re: [Flashcoders] send email from flash project (exe)

Hi Cor
do you know why I can't receive Arabic text ,if I try to send  Arabic text
flash send data  like this %D9%84%D8%A8%D9%84%D8%A7%D8%AA%EF%BB%99, and I'm
recieving empty email, asp.net code working fine.

any idea

Thanks
Bassam

On Thu, May 5, 2011 at 2:32 AM, Bassam M sense...@gmail.com wrote:

 Thanks you Cor
 my code now working the problem was in the server

 Regard's
 Bassam


 On Thu, May 5, 2011 at 12:54 AM, Cor c...@chello.nl wrote:

 Hi Bassam,

 Try this:

 newLoadVars = new URLVariables();
 loadvarSend=new 
 URLRequest((http://.sensemis.com/test/contact.aspx
 );
 loadvarSend.method=URLRequestMethod.POST;
 loadvarSend.data=newLoadVars;
 loadvarLoader=new URLLoader  ;
 loadvarLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
 loadvarLoader.addEventListener(Event.COMPLETE, completeLoginHandler, 
 false, 0, true);
  newLoadVars.myName1 = main.name.txt_name.text;
 newLoadVars.myEmail1 = main.email.txt_email.text;
 newLoadVars.mySubject1 = main.subject.txt_subject.text;
 newLoadVars.myMassage1 = main.msg.txt_msg.text; 
 loadvarLoader.load(loadvarSend);


 Regards,
 Cor van Dooren
 The Netherlands


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
 Bassam M
 Sent: donderdag 5 mei 2011 9:43
 To: Flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] send email from flash project (exe)

 Hi Guys
 I'm I want to send email from flash project file I tried to use 
 sendAndLoad but it's not working this is the Code

 var newLoadVars = new LoadVars();
newLoadVars.myName1 = main.name.txt_name.text;
newLoadVars.myEmail1 = main.email.txt_email.text;
newLoadVars.mySubject1 = main.subject.txt_subject.text;

newLoadVars.myMassage1 = main.msg.txt_msg.text;
newLoadVars.sendAndLoad(
 http://.sensemis.com/test/contact.aspx
 ,newLoadVars,POST);
trace(newLoadVars)

 I need help please

 Thanks
 Bassam
 ___
 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] load one swf movie after another

2011-05-06 Thread Cor
Look at (the tutorials) TimelineMax and LoaderMax on www.greensock.com

Regards
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
a...@yonearth.com
Sent: vrijdag 6 mei 2011 11:32
To: Flash Coders List
Subject: [Flashcoders] load one swf movie after another

Hi all,


Can anyone advise me the best way to load one swf movie after
another into main movie.
  I  have 12-15 seperate swf files in action script 2.0 

What I want to happen is have the first swf load in, start, play
fully, and then move on to the next one when it is finished. Ideally i want
one movie to the next to be seemless.
 Can I have the others swf`s loading in the background while the
first one is playing
   
   I am using as2.0


Thanks

Regards
amol
___
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] send email from flash project (exe)

2011-05-05 Thread Cor
Hi Bassam,

Try this:

newLoadVars = new URLVariables();
loadvarSend=new URLRequest((http://.sensemis.com/test/contact.aspx;);
loadvarSend.method=URLRequestMethod.POST;
loadvarSend.data=newLoadVars;
loadvarLoader=new URLLoader  ;
loadvarLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
loadvarLoader.addEventListener(Event.COMPLETE, completeLoginHandler, false,
0, true);
 newLoadVars.myName1 = main.name.txt_name.text;
newLoadVars.myEmail1 = main.email.txt_email.text;
newLoadVars.mySubject1 = main.subject.txt_subject.text;
newLoadVars.myMassage1 = main.msg.txt_msg.text;
loadvarLoader.load(loadvarSend);


Regards,
Cor van Dooren
The Netherlands


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Bassam M
Sent: donderdag 5 mei 2011 9:43
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] send email from flash project (exe)

Hi Guys
I'm I want to send email from flash project file I tried to use sendAndLoad
but it's not working this is the Code

var newLoadVars = new LoadVars();
newLoadVars.myName1 = main.name.txt_name.text;
newLoadVars.myEmail1 = main.email.txt_email.text;
newLoadVars.mySubject1 = main.subject.txt_subject.text;

newLoadVars.myMassage1 = main.msg.txt_msg.text;
newLoadVars.sendAndLoad(http://.sensemis.com/test/contact.aspx
,newLoadVars,POST);
trace(newLoadVars)

I need help please

Thanks
Bassam
___
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] 360 degree rotation

2011-04-25 Thread Cor
var obj:Sprite = new Sprite();
obj.graphics.beginFill(0xff);
obj.graphics.drawRect(0,0,20,20);
obj.graphics.endFill();

function init():void{
addEventListener(Event.ENTER_FRAME, rotate, false,0,true);  
}

function rotate(e:Event):void{
obj.rotation +=5;
}

//start the show
init();


regards
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
a...@yonearth.com
Sent: maandag 25 april 2011 8:45
To: Flash Coders List
Subject: [Flashcoders] 360 degree rotation

Hi all,

 any one have an idea how to create a 360 degree(spin,rotation)
views of a object. in as3.0 . 


thanks,
a
___
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] 360 degree rotation

2011-04-25 Thread Cor
Oops, forgot to put it on stage:

var obj:Sprite = new Sprite();
obj.graphics.beginFill(0xff);
obj.graphics.drawRect(0,0,20,20);
obj.graphics.endFill();
obj.x = 50;
obj.y = 50;
addChild(obj);

function init():void{
addEventListener(Event.ENTER_FRAME, rotate, false,0,true);  
}

function rotate(e:Event):void{
obj.rotation +=5;
}

//start the show
init();


regards
Cor


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] 360 degree rotation

2011-04-25 Thread Cor
Oh, OK look at Swift3D


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of
a...@yonearth.com
Sent: maandag 25 april 2011 9:47
To: Flash Coders List
Subject: Re: [Flashcoders] 360 degree rotation

thanx Cor

 But i need like this

http://www.somersetdesign.co.uk/3drotator.php

regards
amol

- Original Message - 
From: Cor c...@chello.nl
To: 'Flash Coders List' flashcoders@chattyfig.figleaf.com
Sent: Monday, April 25, 2011 12:26 PM
Subject: RE: [Flashcoders] 360 degree rotation


 Oops, forgot to put it on stage:
 
 var obj:Sprite = new Sprite();
 obj.graphics.beginFill(0xff);
 obj.graphics.drawRect(0,0,20,20);
 obj.graphics.endFill();
 obj.x = 50;
 obj.y = 50;
 addChild(obj);
 
 function init():void{
 addEventListener(Event.ENTER_FRAME, rotate, false,0,true); 
 }
 
 function rotate(e:Event):void{
 obj.rotation +=5;
 }
 
 //start the show
 init();
 
 
 regards
 Cor
 
 
 ___
 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] test

2011-04-24 Thread Cor
Got it.


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: zondag 24 april 2011 15:46
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] test

Traffic seems to have abruptly stopped..
___
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] test

2011-04-24 Thread Cor
It is Eastern, so hunting the bunny

Regards
Cor


-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Andrews
Sent: zondag 24 april 2011 16:08
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] test

On 24/04/2011 14:48, Cor wrote:
 Got it.
Thanks Cor. I guess the list is exceptionally quiet.
___
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] Flash writing/reading database on MS SQL server

2011-04-21 Thread Cor
Thanks Karl,

I will look into that.
Personally I like to use MySQL and PHP, but I am asked to create some app
which communicates with MS SQL server.

Regards,
Cor 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: donderdag 21 april 2011 3:27
To: Flash Coders List
Subject: Re: [Flashcoders] Flash writing/reading database on MS SQL server

Hi Cor,
There a lot of easy to implement php scripts out there.
That is what I use. PHP and MySQL.

But here is a simple connection script for php to MSSQL for you to try if
you'd like.
Have not tested myself. FYI.

http://www.jonasjohn.de/snippets/php/mssql-example.htm

Best,
Karl


On Apr 20, 2011, at 3:05 PM, Mattheis, Erik (MIN-WSW) wrote:

 I use Flash remoting with ColdFusion. There's examples for many server 
 side scripting languages that come up when searching for flash 
 femoting as3 [your preferred server thing].


 On 4/20/11 2:31 PM, Cor c...@chello.nl wrote:

 Hi List,

 I am looking for a way to read/write to a database in a MS SQL server.
 What do I need to do?
 What is the best approach?
 Do I need server side scripting, PHP or ASP?
 Is there anyone who can help me with a little example?

 TIA!
 Regards
 Cor

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



 _ _ _
 Erik Mattheis | Weber Shandwick
 P: (952) 346.6610
 M: (612) 377.2272
 ___
 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

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Flash writing/reading database on MS SQL server

2011-04-20 Thread Cor
Hi List,

I am looking for a way to read/write to a database in a MS SQL server.
What do I need to do?
What is the best approach?
Do I need server side scripting, PHP or ASP?
Is there anyone who can help me with a little example?

TIA!
Regards
Cor

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   3   4   5   6   >