Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

selecting a word in as3

Community Beginner ,
May 18, 2016 May 18, 2016

hi guys ....When i draw a line other than vertical or horizontal line not only hitting the letters which was under the line ,,it also hitting other letter too.. like which was show in image ...In second pic shows ..the whole letters which was inside the right angled triangle are shows hitting ..when i trace what are all hitting it shows all inside the right angled triangle  ..so i can keep the words in the cross form ...can

anyone knows whats the problem was.....

Untitled-3pblm.jpg

pblm.jpg

TOPICS
ActionScript
411
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2016 May 18, 2016

use the bitmapdata hittest or make your letters buttons and store which undergo a mouseover or make sure your letters have no border white space.

p.s.  i can see you would have problems, but i can't see how you would have that many letters extraneously added to the list of letters moused-over.  you must be using some pretty screwy way of detecting a mouseover/positive hittest.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 18, 2016 May 18, 2016

can u give some example or some reference for this

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2016 May 18, 2016

var lettersA:Array=[your letters]

var selected_lettersA:Array = [];

for(var i:int=0;i<lettersA.length;i++){

lettersA.addEventListener(MouseEvent.MOUSE_OVER,overF);

}

function new_word_selectionF():void{

selected_lettersA.length=0;

}

function overF(e:MouseEvent):void{

selected_lettersA.push(e.currentTarget);

}

function check_lettersF():void{

for(var i:int=0;i<selected_lettersA.length;i++){

trace(selected_lettersA.name);

}

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 19, 2016 May 19, 2016

Thanks ..i will try this way

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 20, 2016 May 20, 2016
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines