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 =
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
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
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
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
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
}
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
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
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
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
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!
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
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
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 =
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 :
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
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
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
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
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
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
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
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
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:
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
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
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
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 ,
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
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
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
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
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)
33 matches
Mail list logo