Myformat.url

hi.

i’ve got a text field with text in it that i want to hyperlink to a url. so i use a new text format: myformat.url, which makes the text hyperlinkable.

the problem is that you can be in that textfield and your cursor doesn’t change to cue that it is linkable unless you are over the text inside.

how can i make the whole text field clickable instead of the just the text in it?

thanks. fumeng.

make an invisbile button, and than resize it to textbox’ height and width, change position to text box’ coordinates (x,y).
this will make your whole textbox clickable.

i can’t do that because the movie clip is created dynamically in a loop. the text field is created in the same loop at the same time and resides inside the movie clip.

when i first started thinking about how to hyperlink this text field, i came across myformat.url in the reference panel…it says that it “indicates the url that text in this text format hyperlinks to”.

so that means that it’s the text which is hyperlinked and not the text field?? that’s what i’m confused on. what i’m really looking to do is make the entire text field clickable. is there another way to go about this?

thanks.

fumeng.

try to make a new movieclip that includes an empty button and empty dynamic textbox.give the this movieclip a Linkage name.Than attach this MC into your movieclips that created in a loop ( myMc.attachMovie(“linkageName”,“newName”,Depth); ).

than u can change theh text in the dynamic box and url of the button…

u can improve this idea for your work.

actually, that’s a really good idea. i changed it a little bit and instead used an onRelease handler for the original movie clip i created. now i’m trying to send it to a url using:


getURL(ArrDate[k].attributes.urlPath);

and that’s not working. how do i convert what i have in this array into s/thing that getURL will understand (i.e. a string)?

thanks for helping me to figure this out.

fumeng.

actually, with testing, it appears to be a problem of scope.

for example, in the loop within which this exists i can trace the following out:


ArrDate[k].attributes.urlPath

but within this loop is my handler:


// Use onRelease Handler to getURL
_root["dateClip"+(ArrDate[k].attributes.day)].onRelease = function(){
trace(_root[ArrDate[k].attributes.urlPath]);	};

and it returns ‘undefined’.

ArrDate[k].attributes.urlPath – try to add quotes start and end of it. (make this in the source file,where you get urls);

or you can add following code to your loop:

myURL = _root[ArrDate[k].attributes.urlPath].toString();
trace(myURL);

just tried it and it’s not working. the problem is that it’s nested so deep that i’ve completely lost scope. i’m trying to uncomplicate my code a little bit to see if i can target it. thanks, though.

fumeng.