Re: [Flashcoders] Text area focus

2010-06-15 Thread Amol

Hi,

use set fouse  for text ,

sample_txt.onSetFocus = sample1_txt.onSetFocus = function ()
{
   this.border = true;
   this.borderColor = 13683368;
   this.background = true;
   this.backgroundColor = 13683368;
};
sample_txt.onKillFocus = sample1_txt.onKillFocus = function ()
{
   this.border = true;
   this.borderColor = 0;
   this.background = true;
   this.backgroundColor = 0;
};


Regards 
amol






- Original Message - 
From: Karl DeSaulniers k...@designdrumm.com

To: Flash List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, June 15, 2010 9:51 AM
Subject: [Flashcoders] Text area focus



Hello,
I have a text box or area on a form that I would like to know when a  
user has put the cursor in it or not.
Wither it has focus or not. I am working in AS2. Please don't grit  
your teeth too much :-)

For some reason I am not able to get the focus of my text area.

Anyone have this code in their scrap files?.. lol
TIA

Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


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


[Flashcoders] CS5 questions

2010-06-15 Thread Glen Pike

Hi,

Well feeling like a kid with a shiny new toy having just installed 
CS5 - first time in my career I have managed to get the latest version 
of Flash within a year of it being released, yay :)


(Will probably be shouting at my computer within about 5 minutes, 
but as long as it does not crash every 5 minutes like CS4 when I try to 
compile, my tourettes may not be triggered)


Anyway, playing with the different workspaces and I am trying to 
open the Projects panel in Designer layout, but it keeps coming up 
with Code Snippets instead.  Anyone know how I can get the Projects 
panel up in this mode, or am I being gently patronised by someone who 
does not think I can be a Devigner ;)


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


Re: [Flashcoders] CS5 questions

2010-06-15 Thread Glen Pike

Okay, that's a bit better maybe opening an FLA was useful there - oops  :-[

And it compiles without crashing - I might even go so far as to say 
it's fast, well faster than those that came before it, but not as fast 
as FD with fcsh :)


Looking forward to working with an IDE again...

On 15/06/2010 12:19, Glen Pike wrote:

Hi,

Well feeling like a kid with a shiny new toy having just installed 
CS5 - first time in my career I have managed to get the latest 
version of Flash within a year of it being released, yay :)


(Will probably be shouting at my computer within about 5 minutes, 
but as long as it does not crash every 5 minutes like CS4 when I try 
to compile, my tourettes may not be triggered)


Anyway, playing with the different workspaces and I am trying to 
open the Projects panel in Designer layout, but it keeps coming up 
with Code Snippets instead.  Anyone know how I can get the 
Projects panel up in this mode, or am I being gently patronised by 
someone who does not think I can be a Devigner ;)


Glen
___
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] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Karim Beyrouti
Hi All - 

Wondering if there are any hacks to trigger a 'RollOver' script when hovering 
over a 'a href' link in an html textfield. 
Currently using TextEvent.LINK,to trigger links - but would like to show a 
tooltip on rollover (of that part of text).

So far the only solution i can think of is using : 
TextField.getCharIndexAtPoint(x:Number, y:Number)
create this  - but it seems like this could be quite long winded solution. 

Any other ways of achieving this?


Thanks



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


Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Glen Pike

Why not use the mouse coordinates?

On 15/06/2010 13:24, Karim Beyrouti wrote:

Hi All -

Wondering if there are any hacks to trigger a 'RollOver' script when hovering 
over a 'a href' link in an html textfield.
Currently using TextEvent.LINK,to trigger links - but would like to show a 
tooltip on rollover (of that part of text).

So far the only solution i can think of is using : 
TextField.getCharIndexAtPoint(x:Number, y:Number)
create this  - but it seems like this could be quite long winded solution.

Any other ways of achieving this?


Thanks



Karim ___
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] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Ktu
This in a mouseMove or enterFrame event is what I've always used.


var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY);
var url = ;
if (index = 0) {
var fmt:TextFormat = txt.getTextFormat (index, index + 1);
if (fmt.url) url = fmt.url;
}
if (url) {
// begin tooltip code
}

ktu


On Tue, Jun 15, 2010 at 8:49 AM, Glen Pike g...@engineeredarts.co.ukwrote:

 Why not use the mouse coordinates?


 On 15/06/2010 13:24, Karim Beyrouti wrote:

 Hi All -

 Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show a
 tooltip on rollover (of that part of text).

 So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded solution.

 Any other ways of achieving this?


 Thanks



 Karim ___
 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] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Karim Beyrouti
The HREF link is only part the the textfields content, and each textfield can 
have more than one link amongst other copy
and need to show relevant tooltip only when user is hovering over the 'a HREF' 
parts of the html textfield.

On 15 Jun 2010, at 13:49, Glen Pike wrote:

 Why not use the mouse coordinates?
 
 On 15/06/2010 13:24, Karim Beyrouti wrote:
 Hi All -
 
 Wondering if there are any hacks to trigger a 'RollOver' script when 
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show a 
 tooltip on rollover (of that part of text).
 
 So far the only solution i can think of is using : 
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded solution.
 
 Any other ways of achieving this?
 
 
 Thanks
 
 
 
 Karim ___
 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] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Ktu
sorry, I tacked on that last if statement. It should probably read

if (url.length  0) {
// begin tooltip code
}

maybe you want to check if its an appropriate web url with a regExp first,
but I think you get the idea.

Ktu

On Tue, Jun 15, 2010 at 9:05 AM, Ktu ktu_fl...@cataclysmicrewind.comwrote:


 This in a mouseMove or enterFrame event is what I've always used.


 var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY);
 var url = ;
 if (index = 0) {
 var fmt:TextFormat = txt.getTextFormat (index, index + 1);
 if (fmt.url) url = fmt.url;
 }
 if (url) {
 // begin tooltip code
 }

 ktu



 On Tue, Jun 15, 2010 at 8:49 AM, Glen Pike g...@engineeredarts.co.ukwrote:

 Why not use the mouse coordinates?


 On 15/06/2010 13:24, Karim Beyrouti wrote:

 Hi All -

 Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show
 a tooltip on rollover (of that part of text).

 So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded
 solution.

 Any other ways of achieving this?


 Thanks



 Karim ___
 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] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Karim Beyrouti
Got it - that's the one - thanks for the great solution

- karim

On 15 Jun 2010, at 14:07, Ktu wrote:

 sorry, I tacked on that last if statement. It should probably read
 
 if (url.length  0) {
// begin tooltip code
 }
 
 maybe you want to check if its an appropriate web url with a regExp first,
 but I think you get the idea.
 
 Ktu
 
 On Tue, Jun 15, 2010 at 9:05 AM, Ktu ktu_fl...@cataclysmicrewind.comwrote:
 
 
 This in a mouseMove or enterFrame event is what I've always used.
 
 
 var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY);
 var url = ;
 if (index = 0) {
var fmt:TextFormat = txt.getTextFormat (index, index + 1);
if (fmt.url) url = fmt.url;
 }
 if (url) {
// begin tooltip code
 }
 
 ktu
 
 
 
 On Tue, Jun 15, 2010 at 8:49 AM, Glen Pike g...@engineeredarts.co.ukwrote:
 
 Why not use the mouse coordinates?
 
 
 On 15/06/2010 13:24, Karim Beyrouti wrote:
 
 Hi All -
 
 Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show
 a tooltip on rollover (of that part of text).
 
 So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded
 solution.
 
 Any other ways of achieving this?
 
 
 Thanks
 
 
 
 Karim ___
 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] Naming a loaded swf

2010-06-15 Thread Lehr, Theodore
I am loading a swf via something like:

var loader:Loader = new Loader();

function startLoad(dfile:String)
{
   var nRequest:URLRequest = new URLRequest(dfile);
   loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
   loader.load(nRequest);
}

function onComplete(loadEvent:Event):void
{
   addChild(loadEvent.currentTarget.content);
}

startLoad(some.swf);

I want to be able to name the swf that gets loaded... right now it is just 
getting a random name like: instance77

How can I name it?

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


Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Ktu
Regardless of whether you are using multiple TextFormat objects or htmlText,
using getTextFormat(begin, end), the textFormat will have the appropriate
url.
This is a quick dirty test. Glad I could help out. I'm posting the code for
my test in case anyone else finds it useful.

One thing to note!
If text in a textfield does not fill the text field, a error can appear. In
my code below you can see that error. A link on the bottom line will
register when the cursor is in empty space below the link, but not directly
over it. The x property of the mouse is triggering the rollover. Maybe
someone else can explain this issue better.


AS3 - Timeline code

var txt:TextField = new TextField ();
txt.width = txt.height = 150;
txt.multiline = true;
txt.wordWrap = true;
txt.htmlText = when registered, all a href=\www.google.com\links/a in
text fields will update a href=\www.theflashblog.com\the status bar./a
hahahahah
txt.border = true;
txt.x = txt.y = 100;
addChild(txt);

addEventListener (Event.ENTER_FRAME, captureEnterFrame)

function captureEnterFrame (e:Event):void {
var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY);
var url = ;
if (index = 0) {
var fmt:TextFormat = txt.getTextFormat (index, index + 1);
if (fmt.url) url = fmt.url;
}
if (url) {
displayTooltip(url, new Point (mouseX, mouseY));
} else {
removeTooltip();
}
}

function displayTooltip(url:String, pos:Point):void {
if (getChildByName(ToolTip)) return;
var tf:TextField = new TextField ();
tf.name = ToolTip;
tf.autoSize = left;
tf.text = url;
tf.background = true; tf.border = true;
tf.backgroundColor = 0x00FF;
tf.x = pos.x + 5;
tf.y = pos.y + 15;
addChild(tf);

}
function removeTooltip ():void {
var t:TextField = getChildByName(ToolTip) as TextField;
if (t) removeChild(t);
}

On Tue, Jun 15, 2010 at 9:06 AM, Karim Beyrouti ka...@kurst.co.uk wrote:

 The HREF link is only part the the textfields content, and each textfield
 can have more than one link amongst other copy
 and need to show relevant tooltip only when user is hovering over the 'a
 HREF' parts of the html textfield.

 On 15 Jun 2010, at 13:49, Glen Pike wrote:

  Why not use the mouse coordinates?
 
  On 15/06/2010 13:24, Karim Beyrouti wrote:
  Hi All -
 
  Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
  Currently using TextEvent.LINK,to trigger links - but would like to show
 a tooltip on rollover (of that part of text).
 
  So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
  create this  - but it seems like this could be quite long winded
 solution.
 
  Any other ways of achieving this?
 
 
  Thanks
 
 
 
  Karim ___
  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] Naming a loaded swf

2010-06-15 Thread Ktu
Loader.content is a DisplayObject. DisplayObject have a .name property

function onComplete(loadEvent:Event):void {
  var loadedContent = loadEvent.target.content;
  loadedContent.name = MyName;
  addChild(loadedContent);
}

Ktu

P.S. this is all right in as3 livedocs... Not that this is for you
specifically Ted, but more people need to learn how to read the
documentation.


On Tue, Jun 15, 2010 at 9:28 AM, Lehr, Theodore
ted_l...@federal.dell.comwrote:

 I am loading a swf via something like:

 var loader:Loader = new Loader();

 function startLoad(dfile:String)
 {
   var nRequest:URLRequest = new URLRequest(dfile);
   loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
   loader.load(nRequest);
 }

 function onComplete(loadEvent:Event):void
 {
   addChild(loadEvent.currentTarget.content);
 }

 startLoad(some.swf);

 I want to be able to name the swf that gets loaded... right now it is just
 getting a random name like: instance77

 How can I name it?

 ___
 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] Naming a loaded swf

2010-06-15 Thread Glen Pike

Cast it to a DisplayObject then give that a name?

var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
obj.name = my instance;

...

On 15/06/2010 14:28, Lehr, Theodore wrote:

I am loading a swf via something like:

var loader:Loader = new Loader();

function startLoad(dfile:String)
{
var nRequest:URLRequest = new URLRequest(dfile);
loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
loader.load(nRequest);
}

function onComplete(loadEvent:Event):void
{
addChild(loadEvent.currentTarget.content);
}

startLoad(some.swf);

I want to be able to name the swf that gets loaded... right now it is just 
getting a random name like: instance77

How can I name it?

___
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] Naming a loaded swf

2010-06-15 Thread Ktu
There is no need to cast. The Loader.content property is defined as a
DisplayObject -
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content

but I should have been more strictly typed.

function onComplete(loadEvent:Event):void {
  var loadedContent:DisplayObject = loadEvent.target.content;
  loadedContent.name = MyName;
  addChild(loadedContent);
}


On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.ukwrote:

 Cast it to a DisplayObject then give that a name?

 var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
 obj.name = my instance;

 ...


 On 15/06/2010 14:28, Lehr, Theodore wrote:

 I am loading a swf via something like:

 var loader:Loader = new Loader();

 function startLoad(dfile:String)
 {
var nRequest:URLRequest = new URLRequest(dfile);
loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
loader.load(nRequest);
 }

 function onComplete(loadEvent:Event):void
 {
addChild(loadEvent.currentTarget.content);
 }

 startLoad(some.swf);

 I want to be able to name the swf that gets loaded... right now it is just
 getting a random name like: instance77

 How can I name it?

 ___
 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] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Karim Beyrouti
I've added a boolean - to save a few function calls - and also using a Timer ( 
instead of an enterframe) on a slowish delay - to save a few processor cycles.

private var tooltipFlag : Boolean = false;
/**
* @method 
* @tooltip
* @param
* @return
*/
private function detectMouseOverLink( e : TimerEvent = null ) : void {

var index   : Number = label.getCharIndexAtPoint (label.mouseX, 
label.mouseY);
var url : String = ;

if (index  0) {

   var fmt:TextFormat = label.getTextFormat (index, index + 1);
   if (fmt.url) url = fmt.url;
   
}

if ( ( url.length  0 ) 
 ( ! tooltipFlag ) ) {

tooltipFlag = true;
trace('show - url: ' + url + ' tooltipFlag: ' + tooltipFlag );

} else if ( url.length == 0  tooltipFlag ) { 

tooltipFlag = false; 
trace('hide - url: ' + url + ' tooltipFlag: ' + tooltipFlag );

}

}

If i get time - i might turn this into a utility class - so you can do 
something like:

txtRollOverManger.addRollOverListener( txt , callback ) - 
or
txtRollOverManger.removeRollOverListener( txt , callback ) 

i have a few textfields - quite a few timers might affect performance...

thanks...

- karim


On 15 Jun 2010, at 14:33, Ktu wrote:

 Regardless of whether you are using multiple TextFormat objects or htmlText,
 using getTextFormat(begin, end), the textFormat will have the appropriate
 url.
 This is a quick dirty test. Glad I could help out. I'm posting the code for
 my test in case anyone else finds it useful.
 
 One thing to note!
 If text in a textfield does not fill the text field, a error can appear. In
 my code below you can see that error. A link on the bottom line will
 register when the cursor is in empty space below the link, but not directly
 over it. The x property of the mouse is triggering the rollover. Maybe
 someone else can explain this issue better.
 
 
 AS3 - Timeline code
 
 var txt:TextField = new TextField ();
 txt.width = txt.height = 150;
 txt.multiline = true;
 txt.wordWrap = true;
 txt.htmlText = when registered, all a href=\www.google.com\links/a in
 text fields will update a href=\www.theflashblog.com\the status bar./a
 hahahahah
 txt.border = true;
 txt.x = txt.y = 100;
 addChild(txt);
 
 addEventListener (Event.ENTER_FRAME, captureEnterFrame)
 
 function captureEnterFrame (e:Event):void {
var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY);
var url = ;
if (index = 0) {
var fmt:TextFormat = txt.getTextFormat (index, index + 1);
if (fmt.url) url = fmt.url;
}
if (url) {
displayTooltip(url, new Point (mouseX, mouseY));
} else {
removeTooltip();
}
 }
 
 function displayTooltip(url:String, pos:Point):void {
if (getChildByName(ToolTip)) return;
var tf:TextField = new TextField ();
tf.name = ToolTip;
tf.autoSize = left;
tf.text = url;
tf.background = true; tf.border = true;
tf.backgroundColor = 0x00FF;
tf.x = pos.x + 5;
tf.y = pos.y + 15;
addChild(tf);
 
 }
 function removeTooltip ():void {
var t:TextField = getChildByName(ToolTip) as TextField;
if (t) removeChild(t);
 }
 
 On Tue, Jun 15, 2010 at 9:06 AM, Karim Beyrouti ka...@kurst.co.uk wrote:
 
 The HREF link is only part the the textfields content, and each textfield
 can have more than one link amongst other copy
 and need to show relevant tooltip only when user is hovering over the 'a
 HREF' parts of the html textfield.
 
 On 15 Jun 2010, at 13:49, Glen Pike wrote:
 
 Why not use the mouse coordinates?
 
 On 15/06/2010 13:24, Karim Beyrouti wrote:
 Hi All -
 
 Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show
 a tooltip on rollover (of that part of text).
 
 So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded
 solution.
 
 Any other ways of achieving this?
 
 
 Thanks
 
 
 
 Karim ___
 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

RE: [Flashcoders] Naming a loaded swf

2010-06-15 Thread Lehr, Theodore
Actually - both ways are giving me the same error:

Error #2078: The name property of a Timeline-placed object cannot be modified


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu 
[ktu_fl...@cataclysmicrewind.com]
Sent: Tuesday, June 15, 2010 9:49 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Naming a loaded swf

There is no need to cast. The Loader.content property is defined as a
DisplayObject -
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content

but I should have been more strictly typed.

function onComplete(loadEvent:Event):void {
  var loadedContent:DisplayObject = loadEvent.target.content;
  loadedContent.name = MyName;
  addChild(loadedContent);
}


On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.ukwrote:

 Cast it to a DisplayObject then give that a name?

 var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
 obj.name = my instance;

 ...


 On 15/06/2010 14:28, Lehr, Theodore wrote:

 I am loading a swf via something like:

 var loader:Loader = new Loader();

 function startLoad(dfile:String)
 {
var nRequest:URLRequest = new URLRequest(dfile);
loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
loader.load(nRequest);
 }

 function onComplete(loadEvent:Event):void
 {
addChild(loadEvent.currentTarget.content);
 }

 startLoad(some.swf);

 I want to be able to name the swf that gets loaded... right now it is just
 getting a random name like: instance77

 How can I name it?

 ___
 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] Naming a loaded swf

2010-06-15 Thread Ktu
It's possible that because the content property is the root class of the
loaded swf that you have to set the name property of your document class.

parent.swf
Loader.load(child.swf)

child.swf
this.name = MyName;

Maybe that is what you need to do. I'm going to run a test to find out

Ktu


On Tue, Jun 15, 2010 at 10:49 AM, Lehr, Theodore
ted_l...@federal.dell.comwrote:

 Actually - both ways are giving me the same error:

 Error #2078: The name property of a Timeline-placed object cannot be
 modified

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [
 ktu_fl...@cataclysmicrewind.com]
 Sent: Tuesday, June 15, 2010 9:49 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Naming a loaded swf

 There is no need to cast. The Loader.content property is defined as a
 DisplayObject -

 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content

 but I should have been more strictly typed.

 function onComplete(loadEvent:Event):void {
  var loadedContent:DisplayObject = loadEvent.target.content;
  loadedContent.name = MyName;
  addChild(loadedContent);
 }


 On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.uk
 wrote:

  Cast it to a DisplayObject then give that a name?
 
  var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
  obj.name = my instance;
 
  ...
 
 
  On 15/06/2010 14:28, Lehr, Theodore wrote:
 
  I am loading a swf via something like:
 
  var loader:Loader = new Loader();
 
  function startLoad(dfile:String)
  {
 var nRequest:URLRequest = new URLRequest(dfile);
 
  loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
 loader.load(nRequest);
  }
 
  function onComplete(loadEvent:Event):void
  {
 addChild(loadEvent.currentTarget.content);
  }
 
  startLoad(some.swf);
 
  I want to be able to name the swf that gets loaded... right now it is
 just
  getting a random name like: instance77
 
  How can I name it?
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


[Flashcoders] colorpallete pngencoder

2010-06-15 Thread Jiri

Hello,

i am using the PNGEncoder to create png's.Does someone know how and if 
it is possible to set the colorpalette of the bitmap data, before 
encoding it into a png?


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


Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Kevin Newman

a:hover works in a css style sheet:

var ss:StyleSheet = new StyleSheet();
ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration: 
underline;color: #FF;});

var tf:TextField = new TextField();
tf.autoSize = TextFieldAutoSize.LEFT;
tf.styleSheet = ss;
tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus 
Projects/a/p';

addChild(tf);


Kevin N.



On 6/15/10 8:24 AM, Karim Beyrouti wrote:

Hi All -

Wondering if there are any hacks to trigger a 'RollOver' script when hovering 
over a 'a href' link in an html textfield.
Currently using TextEvent.LINK,to trigger links - but would like to show a 
tooltip on rollover (of that part of text).

So far the only solution i can think of is using : 
TextField.getCharIndexAtPoint(x:Number, y:Number)
create this  - but it seems like this could be quite long winded solution.

Any other ways of achieving this?


Thanks



Karim ___
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] Naming a loaded swf

2010-06-15 Thread Glen Pike
Okay - can you store a reference to the loaded content that you can use 
to access it later, either as an instance variable or in an array?


On 15/06/2010 15:49, Lehr, Theodore wrote:

Actually - both ways are giving me the same error:

Error #2078: The name property of a Timeline-placed object cannot be modified


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu 
[ktu_fl...@cataclysmicrewind.com]
Sent: Tuesday, June 15, 2010 9:49 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Naming a loaded swf

There is no need to cast. The Loader.content property is defined as a
DisplayObject -
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content

but I should have been more strictly typed.

function onComplete(loadEvent:Event):void {
   var loadedContent:DisplayObject = loadEvent.target.content;
   loadedContent.name = MyName;
   addChild(loadedContent);
}


On Tue, Jun 15, 2010 at 9:47 AM, Glen Pikeg...@engineeredarts.co.ukwrote:

   

Cast it to a DisplayObject then give that a name?

var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
obj.name = my instance;

...


On 15/06/2010 14:28, Lehr, Theodore wrote:

 

I am loading a swf via something like:

var loader:Loader = new Loader();

function startLoad(dfile:String)
{
var nRequest:URLRequest = new URLRequest(dfile);
loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
loader.load(nRequest);
}

function onComplete(loadEvent:Event):void
{
addChild(loadEvent.currentTarget.content);
}

startLoad(some.swf);

I want to be able to name the swf that gets loaded... right now it is just
getting a random name like: instance77

How can I name it?

___
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] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Henrik Andersson
The flash.text.engine package supports mirror regions. I think that 
would be appropiate for this.

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


Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Karim Beyrouti
Yep... However I was trying to get roll overs to trigger a function.  
Am going to build a textfield roll over utility class... Will post the  
results here when it's done...


Thanks...

Karim



On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote:


a:hover works in a css style sheet:

var ss:StyleSheet = new StyleSheet();
ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration:  
underline;color: #FF;});

var tf:TextField = new TextField();
tf.autoSize = TextFieldAutoSize.LEFT;
tf.styleSheet = ss;
tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus  
Projects/a/p';

addChild(tf);


Kevin N.



On 6/15/10 8:24 AM, Karim Beyrouti wrote:

Hi All -

Wondering if there are any hacks to trigger a 'RollOver' script  
when hovering over a 'a href' link in an html textfield.
Currently using TextEvent.LINK,to trigger links - but would like to  
show a tooltip on rollover (of that part of text).


So far the only solution i can think of is using :  
TextField.getCharIndexAtPoint(x:Number, y:Number)
create this  - but it seems like this could be quite long winded  
solution.


Any other ways of achieving this?


Thanks



Karim ___
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] Naming a loaded swf

2010-06-15 Thread Lehr, Theodore
awesome - thanks


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu 
[ktu_fl...@cataclysmicrewind.com]
Sent: Tuesday, June 15, 2010 11:03 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Naming a loaded swf

It's possible that because the content property is the root class of the
loaded swf that you have to set the name property of your document class.

parent.swf
Loader.load(child.swf)

child.swf
this.name = MyName;

Maybe that is what you need to do. I'm going to run a test to find out

Ktu


On Tue, Jun 15, 2010 at 10:49 AM, Lehr, Theodore
ted_l...@federal.dell.comwrote:

 Actually - both ways are giving me the same error:

 Error #2078: The name property of a Timeline-placed object cannot be
 modified

 
 From: flashcoders-boun...@chattyfig.figleaf.com [
 flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu [
 ktu_fl...@cataclysmicrewind.com]
 Sent: Tuesday, June 15, 2010 9:49 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Naming a loaded swf

 There is no need to cast. The Loader.content property is defined as a
 DisplayObject -

 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content

 but I should have been more strictly typed.

 function onComplete(loadEvent:Event):void {
  var loadedContent:DisplayObject = loadEvent.target.content;
  loadedContent.name = MyName;
  addChild(loadedContent);
 }


 On Tue, Jun 15, 2010 at 9:47 AM, Glen Pike g...@engineeredarts.co.uk
 wrote:

  Cast it to a DisplayObject then give that a name?
 
  var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
  obj.name = my instance;
 
  ...
 
 
  On 15/06/2010 14:28, Lehr, Theodore wrote:
 
  I am loading a swf via something like:
 
  var loader:Loader = new Loader();
 
  function startLoad(dfile:String)
  {
 var nRequest:URLRequest = new URLRequest(dfile);
 
  loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
 loader.load(nRequest);
  }
 
  function onComplete(loadEvent:Event):void
  {
 addChild(loadEvent.currentTarget.content);
  }
 
  startLoad(some.swf);
 
  I want to be able to name the swf that gets loaded... right now it is
 just
  getting a random name like: instance77
 
  How can I name it?
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


RE: [Flashcoders] Naming a loaded swf

2010-06-15 Thread Lehr, Theodore
that did the trick - thanks everyone...


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike 
[g...@engineeredarts.co.uk]
Sent: Tuesday, June 15, 2010 11:10 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Naming a loaded swf

Okay - can you store a reference to the loaded content that you can use
to access it later, either as an instance variable or in an array?

On 15/06/2010 15:49, Lehr, Theodore wrote:
 Actually - both ways are giving me the same error:

 Error #2078: The name property of a Timeline-placed object cannot be modified

 
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Ktu 
 [ktu_fl...@cataclysmicrewind.com]
 Sent: Tuesday, June 15, 2010 9:49 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Naming a loaded swf

 There is no need to cast. The Loader.content property is defined as a
 DisplayObject -
 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html#content

 but I should have been more strictly typed.

 function onComplete(loadEvent:Event):void {
var loadedContent:DisplayObject = loadEvent.target.content;
loadedContent.name = MyName;
addChild(loadedContent);
 }


 On Tue, Jun 15, 2010 at 9:47 AM, Glen Pikeg...@engineeredarts.co.ukwrote:


 Cast it to a DisplayObject then give that a name?

 var obj:DisplayObject = loadEvent.currentTarget as DisplayObject;
 obj.name = my instance;

 ...


 On 15/06/2010 14:28, Lehr, Theodore wrote:


 I am loading a swf via something like:

 var loader:Loader = new Loader();

 function startLoad(dfile:String)
 {
 var nRequest:URLRequest = new URLRequest(dfile);
 loader.contentLoaderInfo.addEventListener(Evenet.COMPLETE.onComplete);
 loader.load(nRequest);
 }

 function onComplete(loadEvent:Event):void
 {
 addChild(loadEvent.currentTarget.content);
 }

 startLoad(some.swf);

 I want to be able to name the swf that gets loaded... right now it is just
 getting a random name like: instance77

 How can I name it?

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





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


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




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


Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Ktu
Did you know that for htmlText using a you can specify the
href=event:myText
Then register a TextEvent. This is how links inside of text fields can
trigger functions

http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#htmlText

Ktu

On Tue, Jun 15, 2010 at 12:14 PM, Karim Beyrouti ka...@kurst.co.uk wrote:

 Yep... However I was trying to get roll overs to trigger a function. Am
 going to build a textfield roll over utility class... Will post the results
 here when it's done...

 Thanks...

 Karim




 On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote:

  a:hover works in a css style sheet:

 var ss:StyleSheet = new StyleSheet();
 ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration:
 underline;color: #FF;});
 var tf:TextField = new TextField();
 tf.autoSize = TextFieldAutoSize.LEFT;
 tf.styleSheet = ss;
 tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus
 Projects/a/p';
 addChild(tf);


 Kevin N.



 On 6/15/10 8:24 AM, Karim Beyrouti wrote:

 Hi All -

 Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show
 a tooltip on rollover (of that part of text).

 So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded
 solution.

 Any other ways of achieving this?


 Thanks



 Karim ___
 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] html in textfield

2010-06-15 Thread Lehr, Theodore
I have bold tags causing line returns - the text is coming from xml any 
idea why that would be?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Karim Beyrouti
TextEvents were a big improvement over asfunction (AS2 hack) - still - it 
would be nice if TextEvent had listeners for link rollovers / rollouts. 

I like the fact you can still get to the url through using 
textformat/getCharAtPoint.
Tooltip data is stored in the link:  
a href=event:http://www.url.com/#this is a tooltip/a
So it's easily updatable.

thanks again very useful bit of code.

@ Henrik - Not used the TextLineMirrorRegion or the flash.text.engine - but 
will look into it
when i get some time - looks like that could provide the functionality for 
rollover / rollouts.

http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/engine/TextLineMirrorRegion.html

Cheers


- karim


On 15 Jun 2010, at 17:24, Ktu wrote:

 Did you know that for htmlText using a you can specify the
 href=event:myText
 Then register a TextEvent. This is how links inside of text fields can
 trigger functions
 
 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#htmlText
 
 Ktu
 
 On Tue, Jun 15, 2010 at 12:14 PM, Karim Beyrouti ka...@kurst.co.uk wrote:
 
 Yep... However I was trying to get roll overs to trigger a function. Am
 going to build a textfield roll over utility class... Will post the results
 here when it's done...
 
 Thanks...
 
 Karim
 
 
 
 
 On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote:
 
 a:hover works in a css style sheet:
 
 var ss:StyleSheet = new StyleSheet();
 ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration:
 underline;color: #FF;});
 var tf:TextField = new TextField();
 tf.autoSize = TextFieldAutoSize.LEFT;
 tf.styleSheet = ss;
 tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus
 Projects/a/p';
 addChild(tf);
 
 
 Kevin N.
 
 
 
 On 6/15/10 8:24 AM, Karim Beyrouti wrote:
 
 Hi All -
 
 Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show
 a tooltip on rollover (of that part of text).
 
 So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded
 solution.
 
 Any other ways of achieving this?
 
 
 Thanks
 
 
 
 Karim ___
 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] html in textfield

2010-06-15 Thread Karim Beyrouti
try trashing returns before setting the htmltext in your field: 

function trashReturns ( val:String , charToReplace:String =  ) :String {

return replaceChar( val, \r, charToReplace ) ;

}

function replaceChar( str : String, charToRemove : String , charToReplace : 
String) : String {

var temparray:Array = str.split(charToRemove);
return temparray.join(charToReplace);   

}


On 15 Jun 2010, at 18:23, Lehr, Theodore wrote:

 I have bold tags causing line returns - the text is coming from xml any 
 idea why that would be?
 ___
 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] Dynamically Creating an XML Request

2010-06-15 Thread Lehr, Theodore
I need to create a dynamic XML request (not sure that is the right 
terminology).  I've put a sample of what I need below.

I need to turn

XMLdata.test[0].elements(myTest);

into

var req:String = test[0].elements('myTest');
XMLdata[req];

anyone ever try that?  Thanks for any help
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] HTML TextFields - 'A HREF' RollOvers..

2010-06-15 Thread Karim Beyrouti

Created a utility class for a href rollovers in html textfields - 


https://code.google.com/p/kurstcode/source/browse/trunk/libs/com/kurst/utils/TextFieldUtils.as

Might be a little buggy - needs some testing, seems ok so far... 

usage: 

import com.kurst.utils.TextFieldUtils

TextFieldUtils.addHTMLRollOver( label, htmlHrefEvent , this );

function htmlHrefEvent( dataItem : TextFieldDataItem ) : void {

trace('MouseOverStatus: ' + dataItem.overFlag + ' htmlHrefEvent: ' + 
dataItem.href )

}


Hope this helps someone...


- karim

On 15 Jun 2010, at 18:47, Karim Beyrouti wrote:

 TextEvents were a big improvement over asfunction (AS2 hack) - still - it 
 would be nice if TextEvent had listeners for link rollovers / rollouts. 
 
 I like the fact you can still get to the url through using 
 textformat/getCharAtPoint.
 Tooltip data is stored in the link:  
   a href=event:http://www.url.com/#this is a tooltip/a
 So it's easily updatable.
 
 thanks again very useful bit of code.
 
 @ Henrik - Not used the TextLineMirrorRegion or the flash.text.engine - but 
 will look into it
 when i get some time - looks like that could provide the functionality for 
 rollover / rollouts.
 
 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/engine/TextLineMirrorRegion.html
 
 Cheers
 
 
 - karim
 
 
 On 15 Jun 2010, at 17:24, Ktu wrote:
 
 Did you know that for htmlText using a you can specify the
 href=event:myText
 Then register a TextEvent. This is how links inside of text fields can
 trigger functions
 
 http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#htmlText
 
 Ktu
 
 On Tue, Jun 15, 2010 at 12:14 PM, Karim Beyrouti ka...@kurst.co.uk wrote:
 
 Yep... However I was trying to get roll overs to trigger a function. Am
 going to build a textfield roll over utility class... Will post the results
 here when it's done...
 
 Thanks...
 
 Karim
 
 
 
 
 On 15 Jun 2010, at 16:08, Kevin Newman capta...@unfocus.com wrote:
 
 a:hover works in a css style sheet:
 
 var ss:StyleSheet = new StyleSheet();
 ss.parseCSS(a:link{color: #FF;}a:hover{text-decoration:
 underline;color: #FF;});
 var tf:TextField = new TextField();
 tf.autoSize = TextFieldAutoSize.LEFT;
 tf.styleSheet = ss;
 tf.htmlText = 'pA link: a href=http://www.unfocus.com;unFocus
 Projects/a/p';
 addChild(tf);
 
 
 Kevin N.
 
 
 
 On 6/15/10 8:24 AM, Karim Beyrouti wrote:
 
 Hi All -
 
 Wondering if there are any hacks to trigger a 'RollOver' script when
 hovering over a 'a href' link in an html textfield.
 Currently using TextEvent.LINK,to trigger links - but would like to show
 a tooltip on rollover (of that part of text).
 
 So far the only solution i can think of is using :
 TextField.getCharIndexAtPoint(x:Number, y:Number)
 create this  - but it seems like this could be quite long winded
 solution.
 
 Any other ways of achieving this?
 
 
 Thanks
 
 
 
 Karim ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Text area focus

2010-06-15 Thread Karl DeSaulniers

PERFECTO!

Thanks Amol,

For anyone who might want this. I have made a script that will read  
the length of a text field and display the number of characters left  
while someone was typing.
The reason for the code I was seeking with this request was because  
the code previously would eat up a lot of memory. It made my computer  
fan run wild if the form sat in my browser.

Now it does not thanks to Amol.  :))

Here is the code competed. Again, it is as2, but would love to see an  
as3 conversion.

I might get to that later, but welcome any comers.

//commentxt_mc is the textfield name, 650 is the number of characters  
allowed. You will also want to set the text box max characters to  
this when creating your text box.

var numChar;
commentxt_mc.onSetFocus = function() {
   onEnterFrame = function() {
numChar = 650 - commentxt_mc.length;
if (numChar == 0) {
maxChar = Max Characters Reached;
} else {
		maxChar = Max Char:  + numChar.toString(); //Have another text  
box with the var maxChar to display the results while typing.

}
   }
};
commentxt_mc.onKillFocus = function() {
  onEnterFrame = null;
};

Best,

Karl


On Jun 15, 2010, at 1:34 AM, Amol wrote:


Hi,

use set fouse  for text ,

sample_txt.onSetFocus = sample1_txt.onSetFocus = function ()
{
   this.border = true;
   this.borderColor = 13683368;
   this.background = true;
   this.backgroundColor = 13683368;
};
sample_txt.onKillFocus = sample1_txt.onKillFocus = function ()
{
   this.border = true;
   this.borderColor = 0;
   this.background = true;
   this.backgroundColor = 0;
};


Regards amol




- Original Message - From: Karl DeSaulniers  
k...@designdrumm.com

To: Flash List flashcoders@chattyfig.figleaf.com
Sent: Tuesday, June 15, 2010 9:51 AM
Subject: [Flashcoders] Text area focus



Hello,
I have a text box or area on a form that I would like to know when  
a  user has put the cursor in it or not.
Wither it has focus or not. I am working in AS2. Please don't  
grit  your teeth too much :-)

For some reason I am not able to get the focus of my text area.
Anyone have this code in their scrap files?.. lol
TIA
Karl DeSaulniers
Design Drumm
http://designdrumm.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


[Flashcoders] anone else @flashbelt10?

2010-06-15 Thread Mattheis, Erik (MIN-WSW)
Predicted winners: CS5, cornstarch AIR 2.0 4or mobile, cornstarch;. Losers: 
Apple, Apple.

Flash 10.1 on Android 2.2 is unbelievably fast. Saw a a 2000 triangle 3-d 
flight simulator on a NexusOne - flawless. Lots of wink-wink stuff about 10.1 
for RIM too.

The big letdown (and quick presentation  repurposing) about no Flash generated 
apps on the iThingies has not been all bad - at least two presenters have 
instead chosen to demonstrate cornstarch and water on audio speakers instead: 
http://www.youtube.com/watch?v=kevqQHZSeao ... and FWIW, I saw a Flash app 
exported to an iPhone - yup, in native code, although 5MB for a hello world 
app.

It was funny noticing many of the attendees sporting iPads Monday - hardly any 
today. Apparently, the word the bruhaha had not gotten out to all attendees, 
but it's impossible to miss the Apple animosity at the conference - there's 
been only a single presenter that did not at least take a couple humorous jabs 
at Apple, most speak directly about the dust-up.

Look me up at tomorrow if you're here.

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


Re: [Flashcoders] Text area focus

2010-06-15 Thread Juan Pablo Califano
It seems like you don't really need to bother about gaining or losing focus
here. Just listening to the change event will do the job and you could
remove the enter_frame.


commentxt_mc.onChanged = function(tf:TextField):Void {
   var numChar:Number = 650 - tf.length;
   if (numChar == 0) {
   maxChar = Max Characters Reached;
   } else {
   maxChar = Max Char:  + numChar.toString(); //Have another
text box with the var maxChar to display the results while typing.
   }
};

The equivalent in AS 3.0 is very similar, though a bit more verbose (as
usual!):

commentxt_mc.addEventListener(Event.CHANGE,handleTextChange);

function handleTextChange(e:Event):void {
var tf:TextField = e.target as TextField;
if(!tf) {
return;
}
var numChar:Number = 650 - tf.length;
var maxChar:String = ;
if (numChar == 0) {
maxChar = Max Characters Reached;
} else {
maxChar = Max Char:  + numChar.toString(); //Have another text box with
the var maxChar to display the results while typing.
}
}

Cheers
Juan Pablo Califano

2010/6/15 Karl DeSaulniers k...@designdrumm.com

 PERFECTO!

 Thanks Amol,

 For anyone who might want this. I have made a script that will read the
 length of a text field and display the number of characters left while
 someone was typing.
 The reason for the code I was seeking with this request was because the
 code previously would eat up a lot of memory. It made my computer fan run
 wild if the form sat in my browser.
 Now it does not thanks to Amol.  :))

 Here is the code competed. Again, it is as2, but would love to see an as3
 conversion.
 I might get to that later, but welcome any comers.

 //commentxt_mc is the textfield name, 650 is the number of characters
 allowed. You will also want to set the text box max characters to this when
 creating your text box.
 var numChar;
 commentxt_mc.onSetFocus = function() {
   onEnterFrame = function() {
numChar = 650 - commentxt_mc.length;
if (numChar == 0) {
maxChar = Max Characters Reached;
} else {
maxChar = Max Char:  + numChar.toString(); //Have another
 text box with the var maxChar to display the results while typing.
}
   }
 };
 commentxt_mc.onKillFocus = function() {
  onEnterFrame = null;
 };

 Best,

 Karl



 On Jun 15, 2010, at 1:34 AM, Amol wrote:

  Hi,

 use set fouse  for text ,

 sample_txt.onSetFocus = sample1_txt.onSetFocus = function ()
 {
   this.border = true;
   this.borderColor = 13683368;
   this.background = true;
   this.backgroundColor = 13683368;
 };
 sample_txt.onKillFocus = sample1_txt.onKillFocus = function ()
 {
   this.border = true;
   this.borderColor = 0;
   this.background = true;
   this.backgroundColor = 0;
 };


 Regards amol




 - Original Message - From: Karl DeSaulniers 
 k...@designdrumm.com
 To: Flash List flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, June 15, 2010 9:51 AM
 Subject: [Flashcoders] Text area focus


  Hello,
 I have a text box or area on a form that I would like to know when a
  user has put the cursor in it or not.
 Wither it has focus or not. I am working in AS2. Please don't grit  your
 teeth too much :-)
 For some reason I am not able to get the focus of my text area.
 Anyone have this code in their scrap files?.. lol
 TIA
 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com

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

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