RE: [Flashcoders] How to create Radio Buttons with Grouping

2008-05-01 Thread Cor
Wich Flash version? 

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens ACE Flash
Verzonden: woensdag 30 april 2008 22:20
Aan: flashcoders@chattyfig.figleaf.com
Onderwerp: [Flashcoders] How to create Radio Buttons with Grouping

I dragged 2 radio buttons on the Stage ( from Components panel ). I would
like to group them so when I click one of them, I could get radio 1 or 2
selected.

Does anyone know how to do this?

Thanks
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 269.23.7/1408 - Release Date: 4/30/2008
6:10 PM

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


[Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Alistair Colling
Hiya, thanks for checking this. I have a custom class that I am using  
as kind of button. The thing is I now want to remove the onPress and  
onRelease methods as there  is a nested movieclip I want to attach  
these events to.


What I would like to know is can I remove or nullify the methods of a  
superclass from the subclass?


Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){
trace(AnswerBut created);
}

public function onPress(){
//actions here
}

public function onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){
trace(NoAnswerBut created);
}

		// I want to remove the onPress / onRelease events in the class  
definition here

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


RE: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Karim Beyrouti
How about:

class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){trace(NoAnswerBut created);}

public function onPress(){}//no actions here
public function onRelease(){}//no actions here

}

Another option is to override the actions. 
Otherwise if you want to get rid of the mouse events you could do this:


class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){

trace(NoAnswerBut created);

onPress = undefined ;
onRelease = undefined ;

delete(onPress);
delete(onRelease);

}

}

However, I recommend this one:

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){

trace(AnswerBut created);
onPress = _onPress
onRelease = _onRelease

}

public function _onPress(){
//actions here
}

public function _onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){

trace(NoAnswerBut created);

// not sure if you even need to do this:
// as long as you don't call super();
onPress = undefined ;
onRelease = undefined ;

delete(onPress);
delete(onRelease);

}
}


Hope this helps...


Karim
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alistair
Colling
Sent: 01 May 2008 12:21
To: Flash Coders List
Subject: [Flashcoders] How do I remove methods of superclass in AS2?

Hiya, thanks for checking this. I have a custom class that I am using  
as kind of button. The thing is I now want to remove the onPress and  
onRelease methods as there  is a nested movieclip I want to attach  
these events to.

What I would like to know is can I remove or nullify the methods of a  
superclass from the subclass?

Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){
trace(AnswerBut created);
}

public function onPress(){
//actions here
}

public function onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){
trace(NoAnswerBut created);
}

// I want to remove the onPress / onRelease events in the
class  
definition here
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-- 
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 30/04/2008
18:10


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


RE: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Cor
You can with override 

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Alistair Colling
Verzonden: donderdag 1 mei 2008 13:21
Aan: Flash Coders List
Onderwerp: [Flashcoders] How do I remove methods of superclass in AS2?

Hiya, thanks for checking this. I have a custom class that I am using as
kind of button. The thing is I now want to remove the onPress and onRelease
methods as there  is a nested movieclip I want to attach these events to.

What I would like to know is can I remove or nullify the methods of a
superclass from the subclass?

Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){
trace(AnswerBut created);
}

public function onPress(){
//actions here
}

public function onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){
trace(NoAnswerBut created);
}

// I want to remove the onPress / onRelease events in the
class definition here } ___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 269.23.7/1408 - Release Date: 4/30/2008
6:10 PM

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


[Flashcoders] Random incriments [AS3]

2008-05-01 Thread SJM - Flash
Hi Guys

Im writing an application where you can manipulate images increse/decrease size 
rotate flip etc... but i need to keep the actual image size in memory for 
outputing (following on to my 'Reading position info X, Y, H  W' question). 

Im trying to set the values for the actual image so when its rotated i still 
have the correct height and width to output (as the box width/height will now 
be bigger than the image height/width).

The height and width are both set from the same XML source; W: 100  H: 80

// START OF FLOW

Push the increase button, here is the code from the button

 selectedImage.width *= 1.1;
 selectedImage.height *= 1.1;
 imgWidthVar *= 1.1;
 imgHeightVar *= 1.1;


The image and bounding MC change in size, here is the Trace info of the values 
(please note there has been no rotation)...

 IMGAGE W: 110 H: 88
 BOX W: 110 H: 88

 IMGAGE W: 121 H: 96
 BOX W: 121 H: 96.81

 IMGAGE W: 133 H: 105
 BOX W: 133.1 H: 106.5

 IMGAGE W: 146 H: 115
 BOX W: 146.4 H: 117.15

// END OF FLOW

Whats going wrong? Both image and box H/W should be identical

Thanks in advance
SJM
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Radley Marx




Hey all,

I have a project containing a diagram that needs to be printed. Often  
the diagram is too large for a single page, so it's sliced/spread over  
multiple pages. Further, there's an option that the page may include a  
header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print  
will still work, but in one specific case (multi-page with header/ 
footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





--
Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
--




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


Re: [Flashcoders] Random incriments [AS3]

2008-05-01 Thread Glen Pike

Hi,

   This is possibly due to rounding errors.

   If you want the components to remain the same size, you should set 
the size of one using the size of the other...


   selectedImage.width *= 1.1;
   imgWidthVar = selectedImage.width;

   etc.

   Glen

SJM - Flash wrote:

Hi Guys

Im writing an application where you can manipulate images increse/decrease size rotate flip etc... but i need to keep the actual image size in memory for outputing (following on to my 'Reading position info X, Y, H  W' question). 


Im trying to set the values for the actual image so when its rotated i still 
have the correct height and width to output (as the box width/height will now 
be bigger than the image height/width).

The height and width are both set from the same XML source; W: 100  H: 80

// START OF FLOW

Push the increase button, here is the code from the button

 selectedImage.width *= 1.1;
 selectedImage.height *= 1.1;
 imgWidthVar *= 1.1;
 imgHeightVar *= 1.1;


The image and bounding MC change in size, here is the Trace info of the values 
(please note there has been no rotation)...

 IMGAGE W: 110 H: 88
 BOX W: 110 H: 88

 IMGAGE W: 121 H: 96
 BOX W: 121 H: 96.81

 IMGAGE W: 133 H: 105
 BOX W: 133.1 H: 106.5

 IMGAGE W: 146 H: 115
 BOX W: 146.4 H: 117.15

// END OF FLOW

Whats going wrong? Both image and box H/W should be identical

Thanks in advance
SJM
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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


Re: [Flashcoders] Random incriments [AS3]

2008-05-01 Thread SJM - Flash
Hi Glen thanks for your reply, this is a continuation really from what you told 
me about Pythagoras to do this i need the actual image height and width.

Normally i would do it this way but when the selected image is rotated 
selectedImage will be wider than imageWidth and will not output the correct 
information.

SJM
  - Original Message - 
  From: Glen Pike 
  To: Flash Coders List 
  Sent: Thursday, May 01, 2008 1:53 PM
  Subject: Re: [Flashcoders] Random incriments [AS3]


  Hi,

  This is possibly due to rounding errors.

  If you want the components to remain the same size, you should set 
  the size of one using the size of the other...

  selectedImage.width *= 1.1;
  imgWidthVar = selectedImage.width;

  etc.

  Glen

  SJM - Flash wrote:
   Hi Guys
  
   Im writing an application where you can manipulate images increse/decrease 
size rotate flip etc... but i need to keep the actual image size in memory for 
outputing (following on to my 'Reading position info X, Y, H  W' question). 
  
   Im trying to set the values for the actual image so when its rotated i 
still have the correct height and width to output (as the box width/height will 
now be bigger than the image height/width).
  
   The height and width are both set from the same XML source; W: 100  H: 80
  
   // START OF FLOW
  
   Push the increase button, here is the code from the button
  
selectedImage.width *= 1.1;
selectedImage.height *= 1.1;
imgWidthVar *= 1.1;
imgHeightVar *= 1.1;
  
  
   The image and bounding MC change in size, here is the Trace info of the 
values (please note there has been no rotation)...
  
IMGAGE W: 110 H: 88
BOX W: 110 H: 88
  
IMGAGE W: 121 H: 96
BOX W: 121 H: 96.81
  
IMGAGE W: 133 H: 105
BOX W: 133.1 H: 106.5
  
IMGAGE W: 146 H: 115
BOX W: 146.4 H: 117.15
  
   // END OF FLOW
  
   Whats going wrong? Both image and box H/W should be identical
  
   Thanks in advance
   SJM
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
 

  -- 

  Glen Pike
  01326 218440
  www.glenpike.co.uk http://www.glenpike.co.uk

  ___
  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] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Glen Pike

Hi,

   I have been doing some work with PrintJob in AS2  Flex recently.

   I managed to get it working okay for single pages in AS2 and 2 page 
spreads in AS3, not sure what you mean by a PDF error, but are you sure 
it's not your printer driver.  I have been using CutePDF Writer 
which has been fine on the PC.  For Mac, I think it was the Acrobat 
printer, but not 100% as it was a friends computer.


   Can you be more specific about the error - does it occur when 
printing, or is it when you open the resulting PDF?


   I have not done header  footers yet, but I guess this is just a 
case of making up your MovieClip / Sprite to include these, so should 
not have much of a bearing...


   Glen

Radley Marx wrote:




Hey all,

I have a project containing a diagram that needs to be printed. Often 
the diagram is too large for a single page, so it's sliced/spread over 
multiple pages. Further, there's an option that the page may include a 
header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print 
will still work, but in one specific case (multi-page with 
header/footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





-- 


Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
-- 






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




--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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


Re: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Alistair Colling
Thanks for your responses guys, I have removed onPress/onRelease  
events as you suggested

onPress = undefined ;
onRelease = undefined ;

delete(onPress);
delete(onRelease);
but now my nested mc will not fire any mouse events,  I am guessing  
that these mouse events have been removed for any nested clips in  
that mc too. I've un-nested my movie clip to solve the problem and it  
all works fine.


Your help is appreciated :)
Ali


On 1 May 2008, at 12:44, Karim Beyrouti wrote:


How about:

class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){trace(NoAnswerBut created);}

public function onPress(){}//no actions here
public function onRelease(){}//no actions here

}

Another option is to override the actions.
Otherwise if you want to get rid of the mouse events you could do  
this:



class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){

trace(NoAnswerBut created);

onPress = undefined ;
onRelease = undefined ;

delete(onPress);
delete(onRelease);

}

}

However, I recommend this one:

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){

trace(AnswerBut created);
onPress = _onPress
onRelease = _onRelease

}

public function _onPress(){
//actions here
}

public function _onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){

trace(NoAnswerBut created);

// not sure if you even need to do this:
// as long as you don't call super();
onPress = undefined ;
onRelease = undefined ;

delete(onPress);
delete(onRelease);

}
}


Hope this helps...


Karim
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of  
Alistair

Colling
Sent: 01 May 2008 12:21
To: Flash Coders List
Subject: [Flashcoders] How do I remove methods of superclass in AS2?

Hiya, thanks for checking this. I have a custom class that I am using
as kind of button. The thing is I now want to remove the onPress and
onRelease methods as there  is a nested movieclip I want to attach
these events to.

What I would like to know is can I remove or nullify the methods of a
superclass from the subclass?

Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){
trace(AnswerBut created);
}

public function onPress(){
//actions here
}

public function onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){
trace(NoAnswerBut created);
}

// I want to remove the onPress / onRelease events in the
class
definition here
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date:  
30/04/2008

18:10


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



--
Alistair Colling
Interactive Developer

FPP Brand Communications (Newcastle upon Tyne)
The Courtyard
Dinsdale Place
Sandyford
Newcastle upon Tyne NE2 1BD
Telephone: +44 (0)191 261 6662
Fax: +44 (0)191 233 2511

This transmission is confidential and intended solely for the person or 
organisation to whom it is addressed.
It may contain privileged and confidential information. If you are not the 
intended recipient, you should not
copy, distribute or take any action in reliance on it. If you have received 
this transmission in error, please
notify the sender at the e-mail address above. 
FPP Design Limited. Reg. Office: The Courtyard, Dinsdale Place, Sandyford, Newcastle upon Tyne NE2 1BD. 
Registered Number 3775564. Registered in 

Re: [Flashcoders] Random incriments [AS3]

2008-05-01 Thread Glen Pike

Hi,

   I am a bit confused as to what you want to do...

   If you rotate the image, I think it will return the width and height 
of it's bounding box, but I think you are saying you want to shrink the 
bounding box so it matches your original size???  - If you do this, you 
will shrink the image too.


   I am guessing you are trying to store your original unrotated 
width and height of the image for later?


   But you can calculate your actual image size from the bounding box 
values you have too...


   From your diagram - I think you have X2 and X on the wrong axis - 
but using your variables and assuming 0, 0 is at the bottom left hand 
corner (it may not be in the Flash Player):


   w2 = Math.sqrt( (WIDTH - Y) * (WIDTH - Y) + (X2 * X2));

   h2 = Math.sqrt(Y * Y + (HEIGHT - X2) * (HEIGHT - X2));

   Look at Proof #4 on this page if you want to see what I mean.

   http://www.cut-the-knot.org/pythagoras/index.shtml

   HTH

   Glen
  


SJM - Flash wrote:

Hi Glen thanks for your reply, this is a continuation really from what you told 
me about Pythagoras to do this i need the actual image height and width.

Normally i would do it this way but when the selected image is rotated 
selectedImage will be wider than imageWidth and will not output the correct 
information.

SJM
  - Original Message - 
  From: Glen Pike 
  To: Flash Coders List 
  Sent: Thursday, May 01, 2008 1:53 PM

  Subject: Re: [Flashcoders] Random incriments [AS3]


  Hi,

  This is possibly due to rounding errors.

  If you want the components to remain the same size, you should set 
  the size of one using the size of the other...


  selectedImage.width *= 1.1;
  imgWidthVar = selectedImage.width;

  etc.

  Glen

  SJM - Flash wrote:
   Hi Guys
  
   Im writing an application where you can manipulate images increse/decrease size rotate flip etc... but i need to keep the actual image size in memory for outputing (following on to my 'Reading position info X, Y, H  W' question). 
  

   Im trying to set the values for the actual image so when its rotated i 
still have the correct height and width to output (as the box width/height will 
now be bigger than the image height/width).
  
   The height and width are both set from the same XML source; W: 100  H: 80
  
   // START OF FLOW
  
   Push the increase button, here is the code from the button
  
selectedImage.width *= 1.1;
selectedImage.height *= 1.1;
imgWidthVar *= 1.1;
imgHeightVar *= 1.1;
  
  
   The image and bounding MC change in size, here is the Trace info of the 
values (please note there has been no rotation)...
  
IMGAGE W: 110 H: 88
BOX W: 110 H: 88
  
IMGAGE W: 121 H: 96
BOX W: 121 H: 96.81
  
IMGAGE W: 133 H: 105
BOX W: 133.1 H: 106.5
  
IMGAGE W: 146 H: 115
BOX W: 146.4 H: 117.15
  
   // END OF FLOW
  
   Whats going wrong? Both image and box H/W should be identical
  
   Thanks in advance
   SJM
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
 

  -- 


  Glen Pike
  01326 218440
  www.glenpike.co.uk http://www.glenpike.co.uk

  ___
  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


  


--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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


Re: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Alistair Colling
Thanks for your responses guys, I have removed onPress/onRelease  
events as you suggested



onPress = undefined ;
onRelease = undefined ;

delete(onPress);
delete(onRelease);

but now my nested mc will not fire any mouse events,  I am guessing  
that these mouse events have been removed for any nested clips in  
that mc too. I've un-nested my movie clip to solve the problem and it  
all works fine.


Your help is appreciated :)
Ali


On 1 May 2008, at 12:46, Cor wrote:


You can with override

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Alistair  
Colling

Verzonden: donderdag 1 mei 2008 13:21
Aan: Flash Coders List
Onderwerp: [Flashcoders] How do I remove methods of superclass in AS2?

Hiya, thanks for checking this. I have a custom class that I am  
using as
kind of button. The thing is I now want to remove the onPress and  
onRelease
methods as there  is a nested movieclip I want to attach these  
events to.


What I would like to know is can I remove or nullify the methods of a
superclass from the subclass?

Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){
trace(AnswerBut created);
}

public function onPress(){
//actions here
}

public function onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){
trace(NoAnswerBut created);
}

// I want to remove the onPress / onRelease events in the
class definition here }  
___

Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.23.7/1408 - Release Date:  
4/30/2008

6:10 PM

___
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] Adobe Open Screen!

2008-05-01 Thread Patrick J. Jankun

Wow, seems Adobe makes a big turn!
Anybody ready that already?

Great news indeed, maybe finally we can drop that crappy flash ide :]

http://www.adobe.com/aboutadobe/pressroom/pressreleases/200804/050108AdobeOSP.html


--
fancy skills to pay the bills
www.jankun.org

Phone:  +43 660 96 969 - 01
web:jankun.org
mail:   p[at]jankun.org

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


RE: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Karim Beyrouti
That is why I recommend this approach:

 class Classes.AnswerBut extends MovieClip{ 

function AnswerBut(){

trace(AnswerBut created);
addMouseEvents();

}

public function _onPress(){
//actions here
}

public function _onRelease(){
//actions here
}

public function removeMouseEvents(){
onPress = undefined
onRelease = undefined
delete(onPress)
delete(onRelease)
}
public function addMouseEvents(){
onPress = _onPress
onRelease = _onRelease
}

 }

Which you can override in your class:

 class Classes.NoAnswerBut extends Classes.AnswerBut{   

function NoAnswerBut(){

addMouseEvents()

}

public function _onPress(){
//other actions here
}

public function _onRelease(){
// other actions here
}

 }

So that way when you removeMouseEvents(), you still keep the actions and can 
re-assign them at the onPress/onRelease handlers...
I would also recomend you use the Delegate class for this... to do something 
like ... 

onRelease = Delegate.create( this, _onRelease )

keeps the calls in scope if you are assigning events to sub movieclip.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alistair Colling
Sent: 01 May 2008 14:56
To: Flash Coders List
Subject: Re: [Flashcoders] How do I remove methods of superclass in AS2?

Thanks for your responses guys, I have removed onPress/onRelease  
events as you suggested
   onPress = undefined ;
   onRelease = undefined ;

   delete(onPress);
   delete(onRelease);
but now my nested mc will not fire any mouse events,  I am guessing  
that these mouse events have been removed for any nested clips in  
that mc too. I've un-nested my movie clip to solve the problem and it  
all works fine.

Your help is appreciated :)
Ali


On 1 May 2008, at 12:44, Karim Beyrouti wrote:

 How about:

 class Classes.NoAnswerBut extends Classes.AnswerBut{  

   function NoAnswerBut(){trace(NoAnswerBut created);}

   public function onPress(){}//no actions here
   public function onRelease(){}//no actions here

 }

 Another option is to override the actions.
 Otherwise if you want to get rid of the mouse events you could do  
 this:


 class Classes.NoAnswerBut extends Classes.AnswerBut{  

   function NoAnswerBut(){

   trace(NoAnswerBut created);

   onPress = undefined ;
   onRelease = undefined ;

   delete(onPress);
   delete(onRelease);

   }

 }

 However, I recommend this one:

   // superclass
 class Classes.AnswerBut extends MovieClip{

   function AnswerBut(){

   trace(AnswerBut created);
   onPress = _onPress
   onRelease = _onRelease

   }

   public function _onPress(){
   //actions here
   }

   public function _onRelease(){
   //actions here
   }
 }

   //subclass
 class Classes.NoAnswerBut extends Classes.AnswerBut{  

   function NoAnswerBut(){

   trace(NoAnswerBut created);

   // not sure if you even need to do this:
   // as long as you don't call super();
   onPress = undefined ;
   onRelease = undefined ;

   delete(onPress);
   delete(onRelease);

   }
 }


 Hope this helps...


 Karim
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of  
 Alistair
 Colling
 Sent: 01 May 2008 12:21
 To: Flash Coders List
 Subject: [Flashcoders] How do I remove methods of superclass in AS2?

 Hiya, thanks for checking this. I have a custom class that I am using
 as kind of button. The thing is I now want to remove the onPress and
 onRelease methods as there  is a nested movieclip I want to attach
 these events to.

 What I would like to know is can I remove or nullify the methods of a
 superclass from the subclass?

 Any help very much appreciated, an outline of my code is below.

 Thanks :)

 Ali

   // superclass
 class Classes.AnswerBut extends MovieClip{

   function AnswerBut(){
   

RE: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Merrill, Jason
Override the functions instead with the override keyword. Something like
this:

override public function onPress(e:Event):void
{
}



Jason Merrill 
Bank of America 
Global Technology  Operations LLD 
eTools  Multimedia 

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 

 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Alistair Colling
Sent: Thursday, May 01, 2008 7:21 AM
To: Flash Coders List
Subject: [Flashcoders] How do I remove methods of superclass in AS2?

Hiya, thanks for checking this. I have a custom class that I 
am using as kind of button. The thing is I now want to remove 
the onPress and onRelease methods as there  is a nested 
movieclip I want to attach these events to.

What I would like to know is can I remove or nullify the 
methods of a superclass from the subclass?

Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

  // superclass
class Classes.AnswerBut extends MovieClip{

  function AnswerBut(){
  trace(AnswerBut created);
  }

  public function onPress(){
  //actions here
  }

  public function onRelease(){
  //actions here
  }
}

  //subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{  

  function NoAnswerBut(){
  trace(NoAnswerBut created);
  }

  // I want to remove the onPress / onRelease 
events in the class definition here } 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Karim Beyrouti

Sadly - override is AS3 only ... not AS2... 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 01 May 2008 15:26
To: Flash Coders List
Subject: RE: [Flashcoders] How do I remove methods of superclass in AS2?

Override the functions instead with the override keyword. Something like
this:

override public function onPress(e:Event):void
{
}



Jason Merrill 
Bank of America 
Global Technology  Operations LLD 
eTools  Multimedia 

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 

 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Alistair Colling
Sent: Thursday, May 01, 2008 7:21 AM
To: Flash Coders List
Subject: [Flashcoders] How do I remove methods of superclass in AS2?

Hiya, thanks for checking this. I have a custom class that I 
am using as kind of button. The thing is I now want to remove 
the onPress and onRelease methods as there  is a nested 
movieclip I want to attach these events to.

What I would like to know is can I remove or nullify the 
methods of a superclass from the subclass?

Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

  // superclass
class Classes.AnswerBut extends MovieClip{

  function AnswerBut(){
  trace(AnswerBut created);
  }

  public function onPress(){
  //actions here
  }

  public function onRelease(){
  //actions here
  }
}

  //subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{  

  function NoAnswerBut(){
  trace(NoAnswerBut created);
  }

  // I want to remove the onPress / onRelease 
events in the class definition here } 
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


-- 
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 30/04/2008
18:10


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


Re: [Flashcoders] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Radley Marx



Thnx Glen,

I forgot to mention this is AS2 (an old project). No Flex involved,  
just Flash Player 8 ( above).


background
So, PrintJob offers the ability to spread out a large image over  
several pages. This works fine.


The trickier part is a printout that requires a header MC and footer  
MC with each page (this is for a building diagram). By header I mean  
the header contains title, logo, and other stuff. The footer is a  
legend with parts and specs.


Initially I tried to do this after PrintJob was fired, so I could know  
the size of the printout, but the extra frame needed for the new MCs  
to load caused the PrintJob to fail. As a workaround, prior to calling  
PrintJob, I calculate and layout pages for the most common formats.


How do I make the pages? There's a couple of extra steps involved, but  
this is the basic idea: I first add the header and footer to a new  
page MC. Then I add in a portion of the diagram (via BitmapData) in  
the middle of the page. This is done for as many pages as needed.


Then when I call PrintJob, I don't need to slice and dice... I just  
print a stack of page MCs.


/background


For testing, we're not actually printing out on paper, we're just  
creating PDF print-previews.



So, regular slice and dice multi-page PDFs in PrintJob works fine.  
Also, creating a single page PDF with header and footer works fine,  
however a PD error message does pop up on PCs (but not on Macs).


For a stack of pages (with header): PDFs are fine on my Mac but fail  
on PC, showing only a single blank page.



I'm not familiar with PDF printing on PCs. It's just built-in for OSX  
so I assume that's the same for PC.



-radley






On May 1, 2008, at 6:28 AM, Glen Pike wrote:


Hi,

  I have been doing some work with PrintJob in AS2  Flex recently.

  I managed to get it working okay for single pages in AS2 and 2  
page spreads in AS3, not sure what you mean by a PDF error, but are  
you sure it's not your printer driver.  I have been using CutePDF  
Writer which has been fine on the PC.  For Mac, I think it was the  
Acrobat printer, but not 100% as it was a friends computer.


  Can you be more specific about the error - does it occur when  
printing, or is it when you open the resulting PDF?


  I have not done header  footers yet, but I guess this is just  
a case of making up your MovieClip / Sprite to include these, so  
should not have much of a bearing...


  Glen

Radley Marx wrote:




Hey all,

I have a project containing a diagram that needs to be printed.  
Often the diagram is too large for a single page, so it's sliced/ 
spread over multiple pages. Further, there's an option that the  
page may include a header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print  
will still work, but in one specific case (multi-page with header/ 
footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





--
Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
--




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




--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

___
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] Random incriments [AS3]

2008-05-01 Thread SJM - Flash
Glen, no i do not want to shrink the image i just want to maintain the original 
valuesthen calculate the increas/decreas info (ie original W 100, H 80 + [1 
click] = W 110, H 90) so i can use Pythagoras in asp to do its job as you 
mentioned!!

  ... I am guessing you are trying to store your original unrotated width 
and height of the image for later?...

Yes i am, I am also tring to multiply the value at the sametime so i can output 
W2  H2

  ... From your diagram - I think you have X2 and X on the wrong axis - but 
using your variables and assuming 0, 0 is at the bottom left hand corner... 

0,0 is the XY point (top right of actual photo), X2 does not exist and i can 
not get the information, if i could then it would be great!

Thanks agin for your help!
SJM
  - Original Message - 
  From: Glen Pike 
  To: Flash Coders List 
  Sent: Thursday, May 01, 2008 3:02 PM
  Subject: Re: [Flashcoders] Random incriments [AS3]


  Hi,

  I am a bit confused as to what you want to do...

  If you rotate the image, I think it will return the width and height 
  of it's bounding box, but I think you are saying you want to shrink the 
  bounding box so it matches your original size???  - If you do this, you 
  will shrink the image too.

  I am guessing you are trying to store your original unrotated 
  width and height of the image for later?

  But you can calculate your actual image size from the bounding box 
  values you have too...

  From your diagram - I think you have X2 and X on the wrong axis - 
  but using your variables and assuming 0, 0 is at the bottom left hand 
  corner (it may not be in the Flash Player):

  w2 = Math.sqrt( (WIDTH - Y) * (WIDTH - Y) + (X2 * X2));

  h2 = Math.sqrt(Y * Y + (HEIGHT - X2) * (HEIGHT - X2));

  Look at Proof #4 on this page if you want to see what I mean.

  http://www.cut-the-knot.org/pythagoras/index.shtml

  HTH

  Glen
 

  SJM - Flash wrote:
   Hi Glen thanks for your reply, this is a continuation really from what you 
told me about Pythagoras to do this i need the actual image height and width.
  
   Normally i would do it this way but when the selected image is rotated 
selectedImage will be wider than imageWidth and will not output the correct 
information.
  
   SJM
 - Original Message - 
 From: Glen Pike 
 To: Flash Coders List 
 Sent: Thursday, May 01, 2008 1:53 PM
 Subject: Re: [Flashcoders] Random incriments [AS3]
  
  
 Hi,
  
 This is possibly due to rounding errors.
  
 If you want the components to remain the same size, you should set 
 the size of one using the size of the other...
  
 selectedImage.width *= 1.1;
 imgWidthVar = selectedImage.width;
  
 etc.
  
 Glen
  
 SJM - Flash wrote:
  Hi Guys
 
  Im writing an application where you can manipulate images 
increse/decrease size rotate flip etc... but i need to keep the actual image 
size in memory for outputing (following on to my 'Reading position info X, Y, H 
 W' question). 
 
  Im trying to set the values for the actual image so when its rotated i 
still have the correct height and width to output (as the box width/height will 
now be bigger than the image height/width).
 
  The height and width are both set from the same XML source; W: 100  H: 
80
 
  // START OF FLOW
 
  Push the increase button, here is the code from the button
 
   selectedImage.width *= 1.1;
   selectedImage.height *= 1.1;
   imgWidthVar *= 1.1;
   imgHeightVar *= 1.1;
 
 
  The image and bounding MC change in size, here is the Trace info of the 
values (please note there has been no rotation)...
 
   IMGAGE W: 110 H: 88
   BOX W: 110 H: 88
 
   IMGAGE W: 121 H: 96
   BOX W: 121 H: 96.81
 
   IMGAGE W: 133 H: 105
   BOX W: 133.1 H: 106.5
 
   IMGAGE W: 146 H: 115
   BOX W: 146.4 H: 117.15
 
  // END OF FLOW
 
  Whats going wrong? Both image and box H/W should be identical
 
  Thanks in advance
  SJM
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 

  
 -- 
  
 Glen Pike
 01326 218440
 www.glenpike.co.uk http://www.glenpike.co.uk
  
 ___
 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
  
  
 

  -- 

  Glen Pike
  01326 218440
  www.glenpike.co.uk http://www.glenpike.co.uk

  

RE: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Merrill, Jason
Yeah, I just noticed the poster said AS2, not 3... disregard.

Jason Merrill 
Bank of America 
Global Technology  Operations LLD 
eTools  Multimedia 

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 

 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Karim Beyrouti
Sent: Thursday, May 01, 2008 10:37 AM
To: 'Flash Coders List'
Subject: RE: [Flashcoders] How do I remove methods of 
superclass in AS2?


Sadly - override is AS3 only ... not AS2... 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf 
Of Merrill, Jason
Sent: 01 May 2008 15:26
To: Flash Coders List
Subject: RE: [Flashcoders] How do I remove methods of 
superclass in AS2?

Override the functions instead with the override keyword. 
Something like
this:

override public function onPress(e:Event):void { }



Jason Merrill
Bank of America
Global Technology  Operations LLD
eTools  Multimedia 

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative 
learning ideas and technologies?
Check out our internal  GTO Innovative Learning Blog  subscribe. 

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of 
Alistair Colling
Sent: Thursday, May 01, 2008 7:21 AM
To: Flash Coders List
Subject: [Flashcoders] How do I remove methods of superclass in AS2?

Hiya, thanks for checking this. I have a custom class that 
I am using 
as kind of button. The thing is I now want to remove the 
onPress and 
onRelease methods as there  is a nested movieclip I want to attach 
these events to.

What I would like to know is can I remove or nullify the 
methods of a 
superclass from the subclass?

Any help very much appreciated, an outline of my code is below.

Thanks :)

Ali

// superclass
class Classes.AnswerBut extends MovieClip{  

function AnswerBut(){
trace(AnswerBut created);
}

public function onPress(){
//actions here
}

public function onRelease(){
//actions here
}
}

//subclass
class Classes.NoAnswerBut extends Classes.AnswerBut{

function NoAnswerBut(){
trace(NoAnswerBut created);
}

// I want to remove the onPress / onRelease 
events in the class 
definition here } ___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


--
No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release 
Date: 30/04/2008 18:10


___
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] Import image on runtime

2008-05-01 Thread Omar Fouad
Hi list,
In an Air - Flash CS3 application I am trying to Import an image with
browseForOpen() and getting the event.currentTarget of the File Object and
converting it to a BitmapData like this:

private function OnFileSelect(e:Event):void {
   var BD:BitmapData = new BitmapData(300, 400, false);
   var B:Bitmap = new Bitmap();
   BD.draw(B);
   addChild(B);// just in case

  }
It is not working... Have I missed something?

Thanks

-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] PrintJob - Mac vs. PC PDF error

2008-05-01 Thread Glen Pike

Hi,

   It sounds like you are going through the right process.

   Are you checking the return value of PrintJob.addPage()

   If it does not like what you are doing, it will return false, so you 
can catch this and maybe trace out an error to see if that is a problem
  
   I have just been using BitmapData to create a flat image of 
something I want to print and I found that I was ending up with blank 
pages unless I specified the 2nd matrix parameter of the 
BitmapData.draw method


   Don't know if that helps.

   PC's - you may need to install a PDF printer driver - like CutePDF 
Writer, which is free - unless you already have something there which 
does this.  Saying that I noticed that Vista has a Microsoft Printer 
Driver that will create images in XP? format - you can do the same thing 
with this to save paper...


   I would recommend trying another printer driver to make sure your 
current one is behaving properly and eliminate that as the problem.


   http://www.cutepdf.com/Products/CutePDF/writer.asp

   Glen

  


Radley Marx wrote:



Thnx Glen,

I forgot to mention this is AS2 (an old project). No Flex involved, 
just Flash Player 8 ( above).


background
So, PrintJob offers the ability to spread out a large image over 
several pages. This works fine.


The trickier part is a printout that requires a header MC and footer 
MC with each page (this is for a building diagram). By header I mean 
the header contains title, logo, and other stuff. The footer is a 
legend with parts and specs.


Initially I tried to do this after PrintJob was fired, so I could know 
the size of the printout, but the extra frame needed for the new MCs 
to load caused the PrintJob to fail. As a workaround, prior to calling 
PrintJob, I calculate and layout pages for the most common formats.


How do I make the pages? There's a couple of extra steps involved, but 
this is the basic idea: I first add the header and footer to a new 
page MC. Then I add in a portion of the diagram (via BitmapData) in 
the middle of the page. This is done for as many pages as needed.


Then when I call PrintJob, I don't need to slice and dice... I just 
print a stack of page MCs.


/background


For testing, we're not actually printing out on paper, we're just 
creating PDF print-previews.



So, regular slice and dice multi-page PDFs in PrintJob works fine. 
Also, creating a single page PDF with header and footer works fine, 
however a PD error message does pop up on PCs (but not on Macs).


For a stack of pages (with header): PDFs are fine on my Mac but fail 
on PC, showing only a single blank page.



I'm not familiar with PDF printing on PCs. It's just built-in for OSX 
so I assume that's the same for PC.



-radley






On May 1, 2008, at 6:28 AM, Glen Pike wrote:


Hi,

  I have been doing some work with PrintJob in AS2  Flex recently.

  I managed to get it working okay for single pages in AS2 and 2 page 
spreads in AS3, not sure what you mean by a PDF error, but are you 
sure it's not your printer driver.  I have been using CutePDF 
Writer which has been fine on the PC.  For Mac, I think it was the 
Acrobat printer, but not 100% as it was a friends computer.


  Can you be more specific about the error - does it occur when 
printing, or is it when you open the resulting PDF?


  I have not done header  footers yet, but I guess this is just 
a case of making up your MovieClip / Sprite to include these, so 
should not have much of a bearing...


  Glen

Radley Marx wrote:




Hey all,

I have a project containing a diagram that needs to be printed. 
Often the diagram is too large for a single page, so it's 
sliced/spread over multiple pages. Further, there's an option that 
the page may include a header and footer.


The code was all developed and tested on a Mac and works great.

When we print on a PC, we get a PDF error. In most cases the print 
will still work, but in one specific case (multi-page with 
header/footer) it doesn't work at all on PC.


Curious if anyone has seen this issue before...

Thnx!

-radley





-- 


Radley Marx
www.radleymarx.com
[EMAIL PROTECTED]
-- 






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




--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

___
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




--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

___

Re: [Flashcoders] Import image on runtime

2008-05-01 Thread Glen Pike
You will probably need to load your file as an image/MC/similar first, 
then draw that into your bitmap.


Omar Fouad wrote:

Hi list,
In an Air - Flash CS3 application I am trying to Import an image with
browseForOpen() and getting the event.currentTarget of the File Object and
converting it to a BitmapData like this:

private function OnFileSelect(e:Event):void {
   var BD:BitmapData = new BitmapData(300, 400, false);
   var B:Bitmap = new Bitmap();
   BD.draw(B);
   addChild(B);// just in case

  }
It is not working... Have I missed something?

Thanks

  


--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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


Re: [Flashcoders] Random incriments [AS3]

2008-05-01 Thread Glen Pike

Hi,

   You can do some trigonometry to get the missing dimensions.

   The distance from 0, 0, to X,0 - top corner of your image = X2, the 
distance from 0,0 to 0, Y - the LH corner of your image = Y2:
  
   theta = selectedImage._rotation * Math.Pi / 180; //(How much your 
image is rotated in radians).
  
   X2 = _selectedImage._height * Math.sin(theta);

   Y2 = _selectedImage._height * Math.cos(theta);

   Glen

SJM - Flash wrote:

Glen, no i do not want to shrink the image i just want to maintain the original 
valuesthen calculate the increas/decreas info (ie original W 100, H 80 + [1 
click] = W 110, H 90) so i can use Pythagoras in asp to do its job as you 
mentioned!!

  ... I am guessing you are trying to store your original unrotated width 
and height of the image for later?...

Yes i am, I am also tring to multiply the value at the sametime so i can output W2 
 H2

  ... From your diagram - I think you have X2 and X on the wrong axis - but using your variables and assuming 0, 0 is at the bottom left hand corner... 


0,0 is the XY point (top right of actual photo), X2 does not exist and i can 
not get the information, if i could then it would be great!

Thanks agin for your help!
SJM
  - Original Message - 
  From: Glen Pike 
  To: Flash Coders List 
  Sent: Thursday, May 01, 2008 3:02 PM

  Subject: Re: [Flashcoders] Random incriments [AS3]


  Hi,

  I am a bit confused as to what you want to do...

  If you rotate the image, I think it will return the width and height 
  of it's bounding box, but I think you are saying you want to shrink the 
  bounding box so it matches your original size???  - If you do this, you 
  will shrink the image too.


  I am guessing you are trying to store your original unrotated 
  width and height of the image for later?


  But you can calculate your actual image size from the bounding box 
  values you have too...


  From your diagram - I think you have X2 and X on the wrong axis - 
  but using your variables and assuming 0, 0 is at the bottom left hand 
  corner (it may not be in the Flash Player):


  w2 = Math.sqrt( (WIDTH - Y) * (WIDTH - Y) + (X2 * X2));

  h2 = Math.sqrt(Y * Y + (HEIGHT - X2) * (HEIGHT - X2));

  Look at Proof #4 on this page if you want to see what I mean.

  http://www.cut-the-knot.org/pythagoras/index.shtml

  HTH

  Glen
 


  SJM - Flash wrote:
   Hi Glen thanks for your reply, this is a continuation really from what you 
told me about Pythagoras to do this i need the actual image height and width.
  
   Normally i would do it this way but when the selected image is rotated 
selectedImage will be wider than imageWidth and will not output the correct 
information.
  
   SJM
 - Original Message - 
 From: Glen Pike 
 To: Flash Coders List 
 Sent: Thursday, May 01, 2008 1:53 PM

 Subject: Re: [Flashcoders] Random incriments [AS3]
  
  
 Hi,
  
 This is possibly due to rounding errors.
  
 If you want the components to remain the same size, you should set 
 the size of one using the size of the other...

  
 selectedImage.width *= 1.1;
 imgWidthVar = selectedImage.width;
  
 etc.
  
 Glen
  
 SJM - Flash wrote:
  Hi Guys
 
  Im writing an application where you can manipulate images increse/decrease size rotate flip etc... but i need to keep the actual image size in memory for outputing (following on to my 'Reading position info X, Y, H  W' question). 
 

  Im trying to set the values for the actual image so when its rotated i 
still have the correct height and width to output (as the box width/height will now 
be bigger than the image height/width).
 
  The height and width are both set from the same XML source; W: 100  H: 
80
 
  // START OF FLOW
 
  Push the increase button, here is the code from the button
 
   selectedImage.width *= 1.1;
   selectedImage.height *= 1.1;
   imgWidthVar *= 1.1;
   imgHeightVar *= 1.1;
 
 
  The image and bounding MC change in size, here is the Trace info of the 
values (please note there has been no rotation)...
 
   IMGAGE W: 110 H: 88
   BOX W: 110 H: 88
 
   IMGAGE W: 121 H: 96
   BOX W: 121 H: 96.81
 
   IMGAGE W: 133 H: 105
   BOX W: 133.1 H: 106.5
 
   IMGAGE W: 146 H: 115
   BOX W: 146.4 H: 117.15
 
  // END OF FLOW
 
  Whats going wrong? Both image and box H/W should be identical
 
  Thanks in advance
  SJM
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 

  
 -- 
  

 Glen Pike
 01326 218440
 www.glenpike.co.uk http://www.glenpike.co.uk
  
 

Re: [Flashcoders] How do I remove methods of superclass in AS2?

2008-05-01 Thread Ian Thomas
Doesn't make any difference - the same thing works in AS2, you just
don't use the 'override' keyword. Override has been added to AS3 to
perform additional compile checking (and possibly to allow
optimisation), not to add new functionality.

And, from whatever the other bit of the thread was:

onPress = undefined ;
onRelease = undefined ;

 delete(onPress);
delete(onRelease);

You don't need both these operations - either setting to undefined
(null is better) or calling delete will do the job, no need for both.

Ian

On Thu, May 1, 2008 at 4:02 PM, Merrill, Jason
[EMAIL PROTECTED] wrote:
 Yeah, I just noticed the poster said AS2, not 3... disregard.


  Jason Merrill
  Bank of America
  Global Technology  Operations LLD
  eTools  Multimedia

  Join the Bank of America Flash Platform Developer Community

  Are you a Bank of America associate interested in innovative learning
  ideas and technologies?
  Check out our internal  GTO Innovative Learning Blog  subscribe.



  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf

 Of Karim Beyrouti
  Sent: Thursday, May 01, 2008 10:37 AM
  To: 'Flash Coders List'


 Subject: RE: [Flashcoders] How do I remove methods of
  superclass in AS2?
  
  
  Sadly - override is AS3 only ... not AS2...
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf
  Of Merrill, Jason
  Sent: 01 May 2008 15:26
  To: Flash Coders List
  Subject: RE: [Flashcoders] How do I remove methods of
  superclass in AS2?
  
  Override the functions instead with the override keyword.
  Something like
  this:
  
  override public function onPress(e:Event):void { }
  
  
  
  Jason Merrill
  Bank of America
  Global Technology  Operations LLD
  eTools  Multimedia
  
  Join the Bank of America Flash Platform Developer Community
  
  Are you a Bank of America associate interested in innovative
  learning ideas and technologies?
  Check out our internal  GTO Innovative Learning Blog  subscribe.
  
  
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  Alistair Colling
  Sent: Thursday, May 01, 2008 7:21 AM
  To: Flash Coders List
  Subject: [Flashcoders] How do I remove methods of superclass in AS2?
  
  Hiya, thanks for checking this. I have a custom class that
  I am using
  as kind of button. The thing is I now want to remove the
  onPress and
  onRelease methods as there  is a nested movieclip I want to attach
  these events to.
  
  What I would like to know is can I remove or nullify the
  methods of a
  superclass from the subclass?
  
  Any help very much appreciated, an outline of my code is below.
  
  Thanks :)
  
  Ali
  
  // superclass
  class Classes.AnswerBut extends MovieClip{
  
  function AnswerBut(){
  trace(AnswerBut created);
  }
  
  public function onPress(){
  //actions here
  }
  
  public function onRelease(){
  //actions here
  }
  }
  
  //subclass
  class Classes.NoAnswerBut extends Classes.AnswerBut{
  
  function NoAnswerBut(){
  trace(NoAnswerBut created);
  }
  
  // I want to remove the onPress / onRelease
  events in the class
  definition here } ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
  --
  No virus found in this incoming message.
  Checked by AVG.
  Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release
  Date: 30/04/2008 18:10
  
  
  ___
  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] Import image on runtime

2008-05-01 Thread Omar Fouad
You mean Loading it using the path from resolvePath()?

On Thu, May 1, 2008 at 6:20 PM, Glen Pike [EMAIL PROTECTED] wrote:

 You will probably need to load your file as an image/MC/similar first,
 then draw that into your bitmap.

 Omar Fouad wrote:

  Hi list,
  In an Air - Flash CS3 application I am trying to Import an image with
  browseForOpen() and getting the event.currentTarget of the File Object
  and
  converting it to a BitmapData like this:
 
  private function OnFileSelect(e:Event):void {
var BD:BitmapData = new BitmapData(300, 400, false);
var B:Bitmap = new Bitmap();
BD.draw(B);
addChild(B);// just in case
 
   }
  It is not working... Have I missed something?
 
  Thanks
 
 
 

 --

 Glen Pike
 01326 218440
 www.glenpike.co.uk http://www.glenpike.co.uk

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




-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Import image on runtime

2008-05-01 Thread Glen Pike
I am not sure because I am not familiar with AIR and files, but to get 
BitmapData you usually need a source, I don't think AIR will be able to 
join up the source with a reference to a file without you actually 
opening up the file somehow.


For Flash / Flex, you have to load it with Image / Loader from either an 
absolute path or a relative one.  I guess similar rules apply to AIR, 
you just get access to the file system here...


Sorry I can't be of more help.

Glen

Omar Fouad wrote:

You mean Loading it using the path from resolvePath()?

On Thu, May 1, 2008 at 6:20 PM, Glen Pike [EMAIL PROTECTED] wrote:

  

You will probably need to load your file as an image/MC/similar first,
then draw that into your bitmap.

Omar Fouad wrote:



Hi list,
In an Air - Flash CS3 application I am trying to Import an image with
browseForOpen() and getting the event.currentTarget of the File Object
and
converting it to a BitmapData like this:

private function OnFileSelect(e:Event):void {
  var BD:BitmapData = new BitmapData(300, 400, false);
  var B:Bitmap = new Bitmap();
  BD.draw(B);
  addChild(B);// just in case

 }
It is not working... Have I missed something?

Thanks



  

--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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






  


--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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


Re: [Flashcoders] Import image on runtime

2008-05-01 Thread Omar Fouad
OK Glen. Thanks for your help by the way.

Hasta

On Fri, May 2, 2008 at 1:17 AM, Glen Pike [EMAIL PROTECTED] wrote:

 I am not sure because I am not familiar with AIR and files, but to get
 BitmapData you usually need a source, I don't think AIR will be able to join
 up the source with a reference to a file without you actually opening up the
 file somehow.

 For Flash / Flex, you have to load it with Image / Loader from either an
 absolute path or a relative one.  I guess similar rules apply to AIR, you
 just get access to the file system here...

 Sorry I can't be of more help.

 Glen


 Omar Fouad wrote:

  You mean Loading it using the path from resolvePath()?
 
  On Thu, May 1, 2008 at 6:20 PM, Glen Pike [EMAIL PROTECTED]
  wrote:
 
 
 
   You will probably need to load your file as an image/MC/similar first,
   then draw that into your bitmap.
  
   Omar Fouad wrote:
  
  
  
Hi list,
In an Air - Flash CS3 application I am trying to Import an image
with
browseForOpen() and getting the event.currentTarget of the File
Object
and
converting it to a BitmapData like this:
   
private function OnFileSelect(e:Event):void {
 var BD:BitmapData = new BitmapData(300, 400, false);
 var B:Bitmap = new Bitmap();
 BD.draw(B);
 addChild(B);// just in case
   
 }
It is not working... Have I missed something?
   
Thanks
   
   
   
   
   
   --
  
   Glen Pike
   01326 218440
   www.glenpike.co.uk http://www.glenpike.co.uk
  
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
  
 
 
 
 
 

 --

 Glen Pike
 01326 218440
 www.glenpike.co.uk http://www.glenpike.co.uk

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




-- 
Omar M. Fouad - Digital Emotions
http://www.omarfouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders