Re: [Flashcoders] Reading and parsng binary file formats

2008-04-16 Thread Stuart (FunkDaWeb)
Im not sure fi this will work but try WinMerge www.winmerge.org
  - Original Message - 
  From: Rich Shupe 
  To: FlashCoders 
  Sent: Wednesday, April 16, 2008 7:16 PM
  Subject: [Flashcoders] Reading and parsng binary file formats


  Can anyone definitely tell me that this isn't possible, or point me to
  additional information?

  I want to compare two files, but they are binary. The nearest example I can
  think of is an encoded text file. That is, no audio, video, sound, etc. but
  something like Word vs. ASCII or Quicken vs. QIF, etc.

  The idea is to compare two files to see how they differ. For this reason,
  read-only is fine. I know the ByteArray can be used for similar things, but
  I don't know the limits of such an attempt.

  Rich
  http://www.LearningActionScript3.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] Reading properties of a textbox [AS3]

2008-04-15 Thread Stuart (FunkDaWeb)
Hi Cory ive finally got round to adding your code 'embedFonts = true ' but i 
still have the same problem! 

when i use the function it removes the text! then when i click again it 
displays the text again no bold/italic!
  - Original Message - 
  From: Cory Petosky 
  To: Flash Coders List 
  Sent: Thursday, April 03, 2008 8:43 PM
  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]


  Replace that with:

  formatter.italic = !currentFormat.italic;

  The conditionals aren't necessary in that situation. :)

  On Thu, Apr 3, 2008 at 1:21 PM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]> wrote:
  > YAY! It works! Thank you! :o)
  >
  >  Wont work with embedFonts = true thought! :o(
  >
  >  Onwards and upwards!
  >
  >  Thanks for your help!
  >
  >  SM
  >
  >
  >   - Original Message -
  >   From: jonathan howe
  >   To: Flash Coders List
  >   Sent: Thursday, April 03, 2008 6:53 PM
  >   Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >
  >
  >   Okay, but in the simple example, you are using it for both:
  >
  >   Okay, but formatter should not be treated as a property of _selectedBox.
  >   _selectedBox has no property named formatter.
  >
  >   This is the offending line:
  >
  >   if (_selectedBox.formatter.italic == false)
  >
  >   You already have set formatter to the value of 
_selectedBox.getTextFormat();
  >   Thus your conditional should read:
  >
  >   if (formatter.italic == false)
  >
  >   To simplify it to keeping formatter separate from the current format, 
let's
  >   rewrite:
  >
  >   var currentFormat:TextFormat = _selectedBox.getTextFormat();
  >   var formatter:TextFormat = new TextFormat();
  >
  > if (currentFormat.italic == false)
  > {
  >  formatter.italic = true;
  > }
  > else
  > {
  >  formatter.italic = false;
  > }
  >
  >_selectedBox.setTextFormat(formatter);
  >
  >
  >   -jonathan
  >
  >
  >   On Thu, Apr 3, 2008 at 1:19 PM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]>
  >   wrote:
  >
  >   > formatter is a blank variable and has nothing to do with reading the 
text
  >   > propperties its used for setting them! I need to figure out how to tell 
if a
  >   > text field is set to italic or not! once i can do this i can fix the if
  >   > statement!
  >   >
  >   > do you have any idea how to do this?
  >   >
  >   >
  >   >
  >   > 

  >   >
  >   >
  >   > FUI - New code is this
  >   >
  >   > var formatter:TextFormat = _selectedBox.getTextFormat();
  >   >
  >   >if (_selectedBox.formatter.italic == false)
  >   >{
  >   >formatter.italic = true;
  >   >   }
  >   >   else
  >   >   {
  >   >formatter.italic = false;
  >   >   }
  >   >
  >   >  _selectedBox.setTextFormat(formatter);
  >   >   - Original Message -
  >   >  From: jonathan howe
  >   >  To: Flash Coders List
  >   >   Sent: Thursday, April 03, 2008 5:53 PM
  >   >  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >   >
  >   >
  >   >  Hi, Stuart,
  >   >
  >   >  Based on the error message sounds like maybe you are trying to access
  >   >  _selectedBox.formatter or something else invalid. Can you repaste your
  >   > new
  >   >  code after the change?
  >   >
  >   >  -jonathan
  >   >
  >   >
  >   >  On Thu, Apr 3, 2008 at 11:15 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]
  >   > >
  >   >  wrote:
  >   >
  >   >  > thanks Jonathan for some reason i get this error when i change to 
your
  >   >  > code...
  >   >  >
  >   >  > ReferenceError: Error #1069: Property formatter not found on
  >   >  > flash.text.TextField and there is no default value.
  >   >  >   - Original Message -
  >   >  >  From: jonathan howe
  >   >  >  To: Flash Coders List
  >   >  >  Sent: Thursday, April 03, 2008 4:04 PM
  >   >  >  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >   >  >
  >   >  >
  >   >  >  var formatter:TextFormat = _selectedBox.getTextFormat();
  >   >  >
  >   >  >  On Thu, Apr 3, 2008 at 10:43 AM, Stuart (FunkDaWeb) <
  >   > [EMAIL PROTECTED]
  >   >  > >
  >   >  >  wrote:
  >   >  >
  >   >  >  > Hi all im tring to write a button that changes the format of a
  >   > textbox
  >   >  >  &g

Re: [Flashcoders] setting registration point via actionscript [AS3]

2008-04-14 Thread Stuart (FunkDaWeb)
I had a rethink after reading your emails and managed to get it to work, i now 
need to make this work on a dynamically generated textbox any ideas?
  - Original Message - 
  From: Michael William Ypes 
  To: Flash Coders List 
  Sent: Monday, April 14, 2008 4:32 PM
  Subject: Re: [Flashcoders] setting registration point via actionscript [AS3]


  Can you load the dynamic movieclip into a movieclip that extends  
  oscars class. That way you just change the coords on the container and  
  not necessarily on the dynamic movie. Either way it should have  
  exactly the same effect.

  Would that help or am I just not getting your problem?




  On 14 Apr 2008, at 15:47, Stuart (FunkDaWeb) wrote:

  > I have got the code working in the way they do it however i need to  
  > use it in a different way!
  >
  > I want to set the registration point to an already created movieclip  
  > and it seams using Oscars class you have to use his new dynamicmovie()
  >
  > I dont need all the functions that come with it i just want it to  
  > set a new X/Y position
  >  - Original Message -
  >  From: Michael William Ypes
  >  To: Flash Coders List
  >  Sent: Monday, April 14, 2008 1:54 PM
  >  Subject: Re: [Flashcoders] setting registration point via  
  > actionscript [AS3]
  >
  >
  >  I have used that class to great effect,
  >
  >  
http://www.fitnessfirst.co.uk/UK-Gym-Health-Club-Locator/Fitness-First-Gym-Locator.aspx
  >
  >  What seems to be the problem. the map mentioned above is in as3 and
  >  changes the registration point all the time depending on where the
  >  user clicks or pans to. What does your code look like?
  >
  >
  >  On 14 Apr 2008, at 13:05, Stuart (FunkDaWeb) wrote:
  >
  >> Hi guys ive been trying to figure this out now for over a week, i
  >> want to dynamically set the registration point of a dynamically
  >> created movieclip. ive come across a class by Oscar Trelles (a re-
  >> written AS1/2 class) that does what im after but it does not seam to
  >> be very portable and can not get it to work with my app.
  >>
  >> I have also tried to use negative values by creating a blank mc and
  >> loading the image into it, this gives me an image that's in the
  >> correct place but the blank MC does not use the negative values set
  >> so i have an overall MC thats bigger that it should be!
  >>
  >> So heres my question
  >>
  >> I want to create a movieclip with the X/Y set to 0 but have the
  >> actual registration point set to X = mc.width / 2 and Y =
  >> mc.height / 2 so when i use the transform controls ive created it
  >> scales, rotates etc... from the centre.
  >>
  >> I also have a second question how do i set the initial value of a
  >> colorpicker box via actionscript? this too also seams to be really
  >> hard to find the answer!
  >>
  >> SM
  >> ___
  >> 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] setting registration point via actionscript [AS3]

2008-04-14 Thread Stuart (FunkDaWeb)
I have got the code working in the way they do it however i need to use it in a 
different way!

I want to set the registration point to an already created movieclip and it 
seams using Oscars class you have to use his new dynamicmovie()

I dont need all the functions that come with it i just want it to set a new X/Y 
position 
  - Original Message - 
  From: Michael William Ypes 
  To: Flash Coders List 
  Sent: Monday, April 14, 2008 1:54 PM
  Subject: Re: [Flashcoders] setting registration point via actionscript [AS3]


  I have used that class to great effect,

  
http://www.fitnessfirst.co.uk/UK-Gym-Health-Club-Locator/Fitness-First-Gym-Locator.aspx

  What seems to be the problem. the map mentioned above is in as3 and  
  changes the registration point all the time depending on where the  
  user clicks or pans to. What does your code look like?


  On 14 Apr 2008, at 13:05, Stuart (FunkDaWeb) wrote:

  > Hi guys ive been trying to figure this out now for over a week, i  
  > want to dynamically set the registration point of a dynamically  
  > created movieclip. ive come across a class by Oscar Trelles (a re- 
  > written AS1/2 class) that does what im after but it does not seam to  
  > be very portable and can not get it to work with my app.
  >
  > I have also tried to use negative values by creating a blank mc and  
  > loading the image into it, this gives me an image that's in the  
  > correct place but the blank MC does not use the negative values set  
  > so i have an overall MC thats bigger that it should be!
  >
  > So heres my question
  >
  > I want to create a movieclip with the X/Y set to 0 but have the  
  > actual registration point set to X = mc.width / 2 and Y =  
  > mc.height / 2 so when i use the transform controls ive created it  
  > scales, rotates etc... from the centre.
  >
  > I also have a second question how do i set the initial value of a  
  > colorpicker box via actionscript? this too also seams to be really  
  > hard to find the answer!
  >
  > SM
  > ___
  > 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] setting registration point via actionscript [AS3]

2008-04-14 Thread Stuart (FunkDaWeb)
Hi guys ive been trying to figure this out now for over a week, i want to 
dynamically set the registration point of a dynamically created movieclip. ive 
come across a class by Oscar Trelles (a re-written AS1/2 class) that does what 
im after but it does not seam to be very portable and can not get it to work 
with my app.

I have also tried to use negative values by creating a blank mc and loading the 
image into it, this gives me an image that's in the correct place but the blank 
MC does not use the negative values set so i have an overall MC thats bigger 
that it should be!

So heres my question

I want to create a movieclip with the X/Y set to 0 but have the actual 
registration point set to X = mc.width / 2 and Y = mc.height / 2 so when i use 
the transform controls ive created it scales, rotates etc... from the centre.

I also have a second question how do i set the initial value of a colorpicker 
box via actionscript? this too also seams to be really hard to find the answer!

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


Re: [Flashcoders] Problem when applying dynamic mask [AS3]

2008-04-10 Thread Stuart (FunkDaWeb)
Couldnt get this to work for some reason i think its because its used from 
within a class, soon as the mask is applyed it throws an error!

Ive decided to use SWFs insted of masking an image, but for some reason its not 
correctly sizing the file its loading!

then the actual code to initiate the load is...

banner.loadImage("banners/" + xmlClass.xmlData.BannerRef + ".swf", 0,0, 
bannerArea, 420, 173);

The code to load the file is

public function loadImage(filename:String, mcX:int, mcY:int, 
mcName:MovieClip, imgWidth:int, imgHeight:int):void
  {
   _mcName = mcName;
   _imgWidth = imgWidth;
   _imgHeight = imgHeight;   
   _mcY = mcY;
   _mcX = mcX;
   
   var imageLoader:Loader = new Loader(); // Set loader
   
   try
   {
var imageURL:URLRequest = new URLRequest(filename); // Set file name
imageLoader.load (imageURL);
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
imgLoadComplete);
trace("DEBUG [imageLib->loadImage]: Loading image: " + filename);
   }
   catch (err:Error)
   {
trace("WARNING [imageLib->loadImage]: No files are loading (" + err 
+ ")");
   }
  }

SM
  - Original Message - 
  From: jonathan howe 
  To: Flash Coders List 
  Sent: Thursday, April 10, 2008 1:50 PM
  Subject: Re: [Flashcoders] Problem when applying dynamic mask [AS3]


  Hi, Stuart,

  This looks like a job for global function getDefinitionByName(), my new bff
  (learned from this list).

  You can't instantiate "item" just as a string. You need to call
  getDefinitionByName(item) and then use that as your class def.
  var classReference:Class = getDefinitionByName(item);
  return classReference();

  -jonathan


  On Thu, Apr 10, 2008 at 7:55 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]>
  wrote:

  > Hi i have another problem this time its to do with masking an object, here
  > is the code that creates a movieclip then loads an image into to...
  >
  >bannerArea = newMovieClip(0xff, 0, 0, 420, 173);
  >addChildAt(bannerArea,0);
  >
  >banner.loadImage("banners/" + xmlClass.xmlData.BannerRef + ".jpg",
  > 0,0, bannerArea, 420, 173);
  >
  >
  > Then an item is called from the library and applyed as a mask...
  >
  >var maskClip = loadLibrary("maskMC" +
  > xmlClass.xmlData.Mask.toString());
  >addChild(maskClip);
  >
  >bannerArea.mask = maskClip;
  >
  > This is the function that calls the item from the library (this isnt
  > currently working correctly but we have found a quick fix till we have
  > worked out the masking problem)...
  >
  >private function loadLibrary(item)
  >  {
  >   var maskClip = new item();
  >   return maskClip;
  >  }
  >
  > Quick fix for code...
  >private function loadLibrary(item)
  >  {
  >   var maskClip = new maskMC1();
  >   return maskClip;
  >  }
  >
  > The problem areas is not loading items from teh library but its when it
  > applys the mask i.e. bannerArea.mask = maskClip;
  >
  > Any one have any ideas?
  >
  > SM
  >
  >
  >
  > ___
  > Flashcoders mailing list
  > Flashcoders@chattyfig.figleaf.com
  > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >



  -- 
  -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
  ___
  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] Problem when applying dynamic mask [AS3]

2008-04-10 Thread Stuart (FunkDaWeb)
Hi i have another problem this time its to do with masking an object, here is 
the code that creates a movieclip then loads an image into to...

bannerArea = newMovieClip(0xff, 0, 0, 420, 173);
addChildAt(bannerArea,0);

banner.loadImage("banners/" + xmlClass.xmlData.BannerRef + ".jpg", 0,0, 
bannerArea, 420, 173);


Then an item is called from the library and applyed as a mask...

var maskClip = loadLibrary("maskMC" + xmlClass.xmlData.Mask.toString());
addChild(maskClip);

bannerArea.mask = maskClip;

This is the function that calls the item from the library (this isnt currently 
working correctly but we have found a quick fix till we have worked out the 
masking problem)...

private function loadLibrary(item)
  {
   var maskClip = new item();
   return maskClip;
  }

Quick fix for code...
private function loadLibrary(item)
  {
   var maskClip = new maskMC1();
   return maskClip;
  }

The problem areas is not loading items from teh library but its when it applys 
the mask i.e. bannerArea.mask = maskClip;

Any one have any ideas?

SM



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


[Flashcoders] [AS3] deselecting textbox

2008-04-07 Thread Stuart (FunkDaWeb)
How easy is it to deselect a textbox when clicking on anything other than the 
textbox using actionscript?

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


Re: [Flashcoders] Reading properties of a textbox [AS3]

2008-04-04 Thread Stuart (FunkDaWeb)
When you say replace do you mean like this?

  var formatter:TextFormat = new TextFormat();
  formatter.italic = !currentFormat.italic;
   _selectedBox.setTextFormat(formatter);

SM


  - Original Message - 
  From: Cory Petosky 
  To: Flash Coders List 
  Sent: Thursday, April 03, 2008 8:43 PM
  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]


  Replace that with:

  formatter.italic = !currentFormat.italic;

  The conditionals aren't necessary in that situation. :)

  On Thu, Apr 3, 2008 at 1:21 PM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]> wrote:
  > YAY! It works! Thank you! :o)
  >
  >  Wont work with embedFonts = true thought! :o(
  >
  >  Onwards and upwards!
  >
  >  Thanks for your help!
  >
  >  SM
  >
  >
  >   - Original Message -
  >   From: jonathan howe
  >   To: Flash Coders List
  >   Sent: Thursday, April 03, 2008 6:53 PM
  >   Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >
  >
  >   Okay, but in the simple example, you are using it for both:
  >
  >   Okay, but formatter should not be treated as a property of _selectedBox.
  >   _selectedBox has no property named formatter.
  >
  >   This is the offending line:
  >
  >   if (_selectedBox.formatter.italic == false)
  >
  >   You already have set formatter to the value of 
_selectedBox.getTextFormat();
  >   Thus your conditional should read:
  >
  >   if (formatter.italic == false)
  >
  >   To simplify it to keeping formatter separate from the current format, 
let's
  >   rewrite:
  >
  >   var currentFormat:TextFormat = _selectedBox.getTextFormat();
  >   var formatter:TextFormat = new TextFormat();
  >
  > if (currentFormat.italic == false)
  > {
  >  formatter.italic = true;
  > }
  > else
  > {
  >  formatter.italic = false;
  > }
  >
  >_selectedBox.setTextFormat(formatter);
  >
  >
  >   -jonathan
  >
  >
  >   On Thu, Apr 3, 2008 at 1:19 PM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]>
  >   wrote:
  >
  >   > formatter is a blank variable and has nothing to do with reading the 
text
  >   > propperties its used for setting them! I need to figure out how to tell 
if a
  >   > text field is set to italic or not! once i can do this i can fix the if
  >   > statement!
  >   >
  >   > do you have any idea how to do this?
  >   >
  >   >
  >   >
  >   > 

  >   >
  >   >
  >   > FUI - New code is this
  >   >
  >   > var formatter:TextFormat = _selectedBox.getTextFormat();
  >   >
  >   >if (_selectedBox.formatter.italic == false)
  >   >{
  >   >formatter.italic = true;
  >   >   }
  >   >   else
  >   >   {
  >   >formatter.italic = false;
  >   >   }
  >   >
  >   >  _selectedBox.setTextFormat(formatter);
  >   >   - Original Message -
  >   >  From: jonathan howe
  >   >  To: Flash Coders List
  >   >   Sent: Thursday, April 03, 2008 5:53 PM
  >   >  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >   >
  >   >
  >   >  Hi, Stuart,
  >   >
  >   >  Based on the error message sounds like maybe you are trying to access
  >   >  _selectedBox.formatter or something else invalid. Can you repaste your
  >   > new
  >   >  code after the change?
  >   >
  >   >  -jonathan
  >   >
  >   >
  >   >  On Thu, Apr 3, 2008 at 11:15 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]
  >   > >
  >   >  wrote:
  >   >
  >   >  > thanks Jonathan for some reason i get this error when i change to 
your
  >   >  > code...
  >   >  >
  >   >  > ReferenceError: Error #1069: Property formatter not found on
  >   >  > flash.text.TextField and there is no default value.
  >   >  >   - Original Message -
  >   >  >  From: jonathan howe
  >   >  >  To: Flash Coders List
  >   >  >  Sent: Thursday, April 03, 2008 4:04 PM
  >   >  >  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >   >  >
  >   >  >
  >   >  >  var formatter:TextFormat = _selectedBox.getTextFormat();
  >   >  >
  >   >  >  On Thu, Apr 3, 2008 at 10:43 AM, Stuart (FunkDaWeb) <
  >   > [EMAIL PROTECTED]
  >   >  > >
  >   >  >  wrote:
  >   >  >
  >   >  >  > Hi all im tring to write a button that changes the format of a
  >   > textbox
  >   >  >  > from normal to italic and back again. I

Re: [Flashcoders] Reading properties of a textbox [AS3]

2008-04-03 Thread Stuart (FunkDaWeb)
YAY! It works! Thank you! :o)

Wont work with embedFonts = true thought! :o(

Onwards and upwards!

Thanks for your help!

SM
  - Original Message - 
  From: jonathan howe 
  To: Flash Coders List 
  Sent: Thursday, April 03, 2008 6:53 PM
  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]


  Okay, but in the simple example, you are using it for both:

  Okay, but formatter should not be treated as a property of _selectedBox.
  _selectedBox has no property named formatter.

  This is the offending line:

  if (_selectedBox.formatter.italic == false)

  You already have set formatter to the value of _selectedBox.getTextFormat();
  Thus your conditional should read:

  if (formatter.italic == false)

  To simplify it to keeping formatter separate from the current format, let's
  rewrite:

  var currentFormat:TextFormat = _selectedBox.getTextFormat();
  var formatter:TextFormat = new TextFormat();

if (currentFormat.italic == false)
{
 formatter.italic = true;
}
else
{
 formatter.italic = false;
}

   _selectedBox.setTextFormat(formatter);


  -jonathan


  On Thu, Apr 3, 2008 at 1:19 PM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]>
  wrote:

  > formatter is a blank variable and has nothing to do with reading the text
  > propperties its used for setting them! I need to figure out how to tell if a
  > text field is set to italic or not! once i can do this i can fix the if
  > statement!
  >
  > do you have any idea how to do this?
  >
  >
  >
  > 

  >
  >
  > FUI - New code is this
  >
  > var formatter:TextFormat = _selectedBox.getTextFormat();
  >
  >if (_selectedBox.formatter.italic == false)
  >{
  >formatter.italic = true;
  >   }
  >   else
  >   {
  >formatter.italic = false;
  >   }
  >
  >  _selectedBox.setTextFormat(formatter);
  >   - Original Message -
  >  From: jonathan howe
  >  To: Flash Coders List
  >   Sent: Thursday, April 03, 2008 5:53 PM
  >  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >
  >
  >  Hi, Stuart,
  >
  >  Based on the error message sounds like maybe you are trying to access
  >  _selectedBox.formatter or something else invalid. Can you repaste your
  > new
  >  code after the change?
  >
  >  -jonathan
  >
  >
  >  On Thu, Apr 3, 2008 at 11:15 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]
  > >
  >  wrote:
  >
  >  > thanks Jonathan for some reason i get this error when i change to your
  >  > code...
  >  >
  >  > ReferenceError: Error #1069: Property formatter not found on
  >  > flash.text.TextField and there is no default value.
  >  >   - Original Message -
  >  >  From: jonathan howe
  >  >  To: Flash Coders List
  >  >  Sent: Thursday, April 03, 2008 4:04 PM
  >  >  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >  >
  >  >
  >  >  var formatter:TextFormat = _selectedBox.getTextFormat();
  >  >
  >  >  On Thu, Apr 3, 2008 at 10:43 AM, Stuart (FunkDaWeb) <
  > [EMAIL PROTECTED]
  >  > >
  >  >  wrote:
  >  >
  >  >  > Hi all im tring to write a button that changes the format of a
  > textbox
  >  >  > from normal to italic and back again. I have written the below code
  > but
  >  > i
  >  >  > cannot seam to get it to work!
  >  >  >
  >  >  > var formatter:TextFormat = new TextFormat();
  >  >  >
  >  >  >   if (formatter.italic == false)
  >  >  >   {
  >  >  >formatter.italic = true;
  >  >  >   }
  >  >  >   else
  >  >  >   {
  >  >  >formatter.italic = false;
  >  >  >   }
  >  >  >
  >  >  >   _selectedBox.setTextFormat(formatter);
  >  >  >
  >  >  > So my question is how do i read the properties of a textbox in order
  > to
  >  >  > create an if statment to change the properties?
  >  >  >
  >  >  > SM
  >  >  > ___
  >  >  > Flashcoders mailing list
  >  >  > Flashcoders@chattyfig.figleaf.com
  >  >  > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >  >  >
  >  >
  >  >
  >  >
  >  >  --
  >  >  -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME
  > 04101
  >  >  ___
  >  >  Flashcoders mailing list
  >  >  Flashcoders@chattyfig.figleaf.com
  >  >  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >  > ___

Re: [Flashcoders] Reading properties of a textbox [AS3]

2008-04-03 Thread Stuart (FunkDaWeb)
formatter is a blank variable and has nothing to do with reading the text 
propperties its used for setting them! I need to figure out how to tell if a 
text field is set to italic or not! once i can do this i can fix the if 
statement!

do you have any idea how to do this?





FUI - New code is this

var formatter:TextFormat = _selectedBox.getTextFormat();
   
   if (_selectedBox.formatter.italic == false)
   {
formatter.italic = true;
   }
   else
   {
formatter.italic = false;
   }
   
 _selectedBox.setTextFormat(formatter);
  - Original Message - 
  From: jonathan howe 
  To: Flash Coders List 
  Sent: Thursday, April 03, 2008 5:53 PM
  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]


  Hi, Stuart,

  Based on the error message sounds like maybe you are trying to access
  _selectedBox.formatter or something else invalid. Can you repaste your new
  code after the change?

  -jonathan


  On Thu, Apr 3, 2008 at 11:15 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]>
  wrote:

  > thanks Jonathan for some reason i get this error when i change to your
  > code...
  >
  > ReferenceError: Error #1069: Property formatter not found on
  > flash.text.TextField and there is no default value.
  >   - Original Message -
  >  From: jonathan howe
  >  To: Flash Coders List
  >  Sent: Thursday, April 03, 2008 4:04 PM
  >  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]
  >
  >
  >  var formatter:TextFormat = _selectedBox.getTextFormat();
  >
  >  On Thu, Apr 3, 2008 at 10:43 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]
  > >
  >  wrote:
  >
  >  > Hi all im tring to write a button that changes the format of a textbox
  >  > from normal to italic and back again. I have written the below code but
  > i
  >  > cannot seam to get it to work!
  >  >
  >  > var formatter:TextFormat = new TextFormat();
  >  >
  >  >   if (formatter.italic == false)
  >  >   {
  >  >formatter.italic = true;
  >  >   }
  >  >   else
  >  >   {
  >  >formatter.italic = false;
  >  >   }
  >  >
  >  >   _selectedBox.setTextFormat(formatter);
  >  >
  >  > So my question is how do i read the properties of a textbox in order to
  >  > create an if statment to change the properties?
  >  >
  >  > SM
  >  > ___
  >  > Flashcoders mailing list
  >  > Flashcoders@chattyfig.figleaf.com
  >  > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >  >
  >
  >
  >
  >  --
  >  -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
  >  ___
  >  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
  >



  -- 
  -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
  ___
  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] embedded fonts

2008-04-03 Thread Stuart (FunkDaWeb)
I too have a wierd problem with embeded fonts! When i set embededFont = true; 
it removes the text! :o(
  - Original Message - 
  From: Allandt Bik-Elliott (Receptacle) 
  To: flashcoders 
  Sent: Thursday, April 03, 2008 4:50 PM
  Subject: [Flashcoders] embedded fonts


  wotcha

  i have a quick query about embedded fonts.

  I thought that when you used them in the movie, that you should call  
  them by the Class name in the linkage identifier however when I try  
  to do this, my text disappears (i have embedFonts set to true and  
  I've triple checked the names), however when i use the font's  
  original name, export, close the fonts and then open the swf,  
  everything works as it should.

  Was I originally wrong or is there something screwy going on with this?

  examples:

  original font: Helvetica 75 Bold
  Linkage class name: Helvetica75Bold
  Name used as .font property: "Helvetica75Bold" // causes text to  
  disappear
  Name used as .font property: "Helvetica 75 Bold" // causes text to  
  reappear

  original font: Helvetica with B selected
  Linkage class name: HelveticaBold
  Name used as .font property: "HelveticaBold" // causes text to disappear
  Name used as .font property: "Helvetica" // causes text to reappear

  hope you can help because this doesn't seem right to me.

  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] Reading properties of a textbox [AS3]

2008-04-03 Thread Stuart (FunkDaWeb)
thanks Jonathan for some reason i get this error when i change to your code...

ReferenceError: Error #1069: Property formatter not found on 
flash.text.TextField and there is no default value.
  - Original Message - 
  From: jonathan howe 
  To: Flash Coders List 
  Sent: Thursday, April 03, 2008 4:04 PM
  Subject: Re: [Flashcoders] Reading properties of a textbox [AS3]


  var formatter:TextFormat = _selectedBox.getTextFormat();

  On Thu, Apr 3, 2008 at 10:43 AM, Stuart (FunkDaWeb) <[EMAIL PROTECTED]>
  wrote:

  > Hi all im tring to write a button that changes the format of a textbox
  > from normal to italic and back again. I have written the below code but i
  > cannot seam to get it to work!
  >
  > var formatter:TextFormat = new TextFormat();
  >
  >   if (formatter.italic == false)
  >   {
  >formatter.italic = true;
  >   }
  >   else
  >   {
  >formatter.italic = false;
  >   }
  >
  >   _selectedBox.setTextFormat(formatter);
  >
  > So my question is how do i read the properties of a textbox in order to
  > create an if statment to change the properties?
  >
  > SM
  > ___
  > Flashcoders mailing list
  > Flashcoders@chattyfig.figleaf.com
  > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >



  -- 
  -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
  ___
  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] Reading properties of a textbox [AS3]

2008-04-03 Thread Stuart (FunkDaWeb)
Hi all im tring to write a button that changes the format of a textbox from 
normal to italic and back again. I have written the below code but i cannot 
seam to get it to work!

var formatter:TextFormat = new TextFormat();
   
   if (formatter.italic == false)
   {
formatter.italic = true;
   }
   else
   {
formatter.italic = false;
   }
   
   _selectedBox.setTextFormat(formatter);

So my question is how do i read the properties of a textbox in order to create 
an if statment to change the properties?

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


Re: [Flashcoders] Access

2008-04-02 Thread Stuart (FunkDaWeb)
Hi tried this but didn't work! here is my code in its most simple form...

package {
 
 import flash.display.MovieClip;
 
 public class mainClass extends MovieClip
 {
  // Instantiate our classes
  public var banner:imageLib = new imageLib();
 
  public function mainClass()
  {
banner.loadImage("banners/banner1.jpg", bannerArea);
  }
 }
 
}

Now the problem is bannerArea is undefined even though its on the root timeline 
and we have no way of directly accessing it from within the class now _root is 
no longer in use!

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


[Flashcoders] Access

2008-04-02 Thread Stuart (FunkDaWeb)
Hello,

I'm having some trouble with AS3, basically if I create a movieclip using the 
Flash IDE and give it an instance name of "mc_one", I'm unsure how to access it 
from an external actionscript class.

Currently on the root timeline I have...

var _mainClass:mainClass = new mainClass();

Which instantiates the mainClass and within the class I need to access 
"mc_one", but obviously "_root.mc_one" will no longer work.

I have tried this:

/* ... */
public class mainClass {
public var mc_one:MovieClip;

public function mainClass()
{

trace(mc_one); // Outputs "null"

}
}

The trouble is this solution does not work, it outputs null rather than [Object 
MovieClip]

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


Re: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Stuart (FunkDaWeb)
Worked like a charm many thanks! :o)

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


[Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Stuart (FunkDaWeb)
Hi All

Is there any way to autosize the height of a textfield only? I want to manually 
set the width of a dynamic textbox but have the user increase the size of the 
text via a button. I currently have it working how i need but the textbox cuts 
off the bottom of the text when its bigger than the textbox.

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


Re: [Flashcoders] query string

2008-03-28 Thread Stuart (FunkDaWeb)
In as2...

on( Release ){
 getURL("home.php?location=boston", "_blank")
}

in as3...

locationLink.addEventListener(MouseEvent.CLICK, location_CLICK);

function location_CLICK(ev:MouseEvent):void
{
 var url:String = "home.php?location=boston";
 var request:URLRequest = new URLRequest(url);
 navigateToURL(request, '_blank');
}

Only use the _blank' if you want to open in new window! 

SM


  - Original Message - 
  From: Laert Jansen 
  To: flashcoders@chattyfig.figleaf.com 
  Sent: Friday, March 28, 2008 4:36 AM
  Subject: [Flashcoders] query string


  Hello folks!

  I have to link one button to this link: home.php?location=boston

  How do I do this? getURL ?

  Thanks a lot

  -- 
  Laert Jansen
  www.laertjansen.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] books for flash programming

2008-03-24 Thread Stuart (FunkDaWeb)
 have purchased these following books...

 Adobe Flash CS3 Professional Bible

 ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application 
Developers

 How to Cheat in Adobe Flash CS3: The Art of Design and Animation

 Advanced Actionscript 3 with Design Patterns 

   Flash CS3 Professional for Windows and Macintosh:Visual QuickStart Guide 


SM
  - Original Message - 
  From: Allandt Bik-Elliott (Receptacle) 
  To: Flash Coders List 
  Sent: Monday, March 24, 2008 11:56 AM
  Subject: Re: [Flashcoders] books for flash programming


  gotoandlearn.com
  learnflash.com
  flashkit.com

  essential actionscript 3.0 (colin moock)

  i'd start at these

  a


  On 24 Mar 2008, at 07:21, Naveen Bhaskar wrote:

  >
  > I am a flash designer and I am in intermediate in programming.(AS2).
  >
  > anybody pls tellme what are the good books I can refer.
  > or is there any good website for learning programming and also have  
  > good
  > tutorials...
  >
  >
  > thanks 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


Re: [Flashcoders] need:: Flex 3 & AS3 // tutorials, links, book recs.

2008-03-17 Thread Stuart (FunkDaWeb)
I have purchased these following books...

 Adobe Flash CS3 Professional Bible

 ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application 
Developers

 How to Cheat in Adobe Flash CS3: The Art of Design and Animation

 Advanced Actionscript 3 with Design Patterns 
   
   Flash CS3 Professional for Windows and Macintosh:Visual QuickStart Guide 


SM


  - Original Message - 
  From: artur 
  To: flashcoders 
  Sent: Monday, March 17, 2008 5:48 PM
  Subject: [Flashcoders] need:: Flex 3 & AS3 // tutorials, links, book recs.


  2nd try..

  can ANYONE please send me their links and book recommendations
  for migrating from Flex2-->3 and AS2-->3

  it would be greatly appreciated.

  thanks
  ___
  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] Recources for planning flash projects

2008-03-13 Thread Stuart (FunkDaWeb)
Hi all, i want to thoroughly plan a flash project before we start to save any 
messing later in the project.

Can you point me to any sites that could give me some help with planning a 
flash project??

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


[Flashcoders] Extending Flash [AS3]

2008-02-29 Thread Stuart (FunkDaWeb)
Hi i need to convert text to a shape via actionscript i have come accross this 
while on my search...
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=3895.html

Unfortunaly i get an errror when trying to use it 1180: Call to a possibly 
undefined method getDocumentDOM.

Can anyone give me any idea how to go about using it?

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


[Flashcoders] 3 questions

2008-02-28 Thread Stuart (FunkDaWeb)
1 - In AS3 is it possible to add a class to a dynamically loaded image? (like 
right clicking and viewing properties if it was in the library) If so can 
anyone point me to an example of how to go about it?

2 - Is there a simple way to convert text to a shape (break apart) using 
actionscript? (not using double break apart in flash)

3 - Does anyone have an idea how to fix this error... ArgumentError: Error 
#2015: Invalid BitmapData.

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