Finding _x and _y coordinates of a word within a string

FLASH

    Next

  • 1. please help to slove my problem....thank you....
    please help me to slove the problem of "load sound from library" behavior for multiple sounds object.
  • 2. instance name problems
    Can anyone tell me why this works on 4 out of 5 of my menu buttons? I had the problem with one more till i renamed the instances. Also, how would i put all this code into one place and not in the button. on (rollOver) { if (_root.link<>11) { this.gotoAndPlay("s1"); } } on (releaseOutside, rollOut) { if (_root.link<>11) { this.gotoAndPlay("s2"); } } on (release) { if (_root.link<>11) { _root["Menu"+_root.link].gotoAndPlay("s2"); _root.link = 11; _root.gotoAndPlay("s4"); _root.scroller.scroller.gotoAndStop(3);:confused;

Finding _x and _y coordinates of a word within a string

Postby AnnF » Sun, 12 Nov 2006 03:31:45 GMT

Is this possible? I have a dynamic text within a TextField. I want the
user to be able to select a word within the text they've inputted and
for me to place a gap (a TextInput component) where this word is. I've
messed around with getTextExtent but that only allows me to find the
hieght or width of the entire text and not a specific word.


Similar Threads:

1.finding char/string _x and _y in a text field

I having a bit of an emergency and am trying to find out if this is even 
possible.  Does anyone know if there is a way to find the _x and _y position of 
a specific character/string in a text field.  So, if I have an HTML formatted 
text field with PRINTIMAGE somewhere in it I want to be able to find the 
position of PRINTIMAGE and attach a movie clip to the stage at those 
coordinates.

2._x and _y coordinate question

Hello:

 I have a movieclip that is navigated by buttons to various _x and _y 
coordinates. When the user clicks on "button 1" is takes them to a specified 
area, then when the user clicks "button2" is takes them to another area. 
However, the pathway is a straight line between the two. 

 I would like the "path" to negotiate a determined route, (such as a curved or 
"S" shaped route). Is it possible to put a series of _x and _y coordinates into 
the onClipEvent then the final _x and _y coordinate for a final destination, 
(Similar to waypoints in a GPS).

 If so, is there a simple way that "people that know what they are doing" 
calculate  _x and _y coordinates within a movieclip?

 Regards,

 Stephen

3.AlertBox Component _x and _y coordinates

Hi,

      In using the Alert Box component how do you control where the AlertBox is displayed?

Thanks for any help!

4.absolute or relative _x/_y coordinates

Hello friends,

allrite here it goes. 

I have three clips.

Lets call'em: clip0,clip1 and clip2

clip1 is INSIDE clip0

clip2 and clip0 are on the same level. How do allign clip2 to clip1?

So what I do need to find out I guess, is how I do retrieve the _x and _y coordinates of clip1 relative to the _root stage?

did this make sense? I sure hope so

thanks a lot, any help or pointers are wastly appreciated

V



5.Need to find a word within a string

Hi Brian,

Please try to send once

I type it here so watch typos
dim test as integer
dim TestString as string = "One Tow ICE Three"

When the case is not important
test =  TestString.tolower.IndexOf("ice")
if test <> -1 then
    test = TestString.tolower.IndexOf("nc")
end if
if test <> -1 then
  '  it exist
end if

When it are more you can first make an array and when it are a lot more use
REGEX.
When it has to be Upercase than remove that tolower and the test in Upercase

I hope this helps?

Cor





> I am trying to find "NC" or "ICE" in a string that will vary in length
>
> Example:
> String = "One Two ICE Three"
> Or
> String = "One NC Two Three"
>
> I need to know if the word  "ICE" or "NC" is within the text string.
>
> I have tried "InStr" but it shows true if there is a word that has the
letters "NC" within the word.
>
> Any Help
>
> Thank you
>


6. Double post (was: Need to find a word within a string)

7. find search word within a string

8. _x and _y wrong



Return to FLASH

 

Who is online

Users browsing this forum: No registered users and 39 guest