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

Adding a border to an image

New Here ,
Feb 09, 2009 Feb 09, 2009


I have thumbnails of pictures (which are buttons inside a movie clip) and I want them to have a white border on:
1) RollOver
2) When buttons the main timeline that correspond to each thumb (i.e., interact_btn, watch_btn, read_btn, listen_btn & watch_btn) are pressed

Here's what it looks like so far.

Here's an example of my code for each thumbnail (i.e., img1_btn):

img1_btn.onRollOver = function(){
this._alpha = 100;
_parent.read_btn._alpha = 100;
_parent.listen_btn._alpha = 100;
_parent.watch_btn._alpha = 100;
_parent.see_btn._alpha = 100;
_parent.interact_btn._alpha = 100;
}
img1_btn.onRollOut = function(){
if(allowRollOut == true){
this._alpha = 40;
_parent.read_btn._alpha = 40;
_parent.listen_btn._alpha = 40;
_parent.watch_btn._alpha = 40;
_parent.see_btn._alpha = 40;
_parent.interact_btn._alpha = 40;
} else {
this._alpha = 100;
_parent.read_btn._alpha = 100;
_parent.listen_btn._alpha = 100;
_parent.watch_btn._alpha = 100;
_parent.see_btn._alpha = 100;
_parent.interact_btn._alpha = 100;
}
}

I've seen in other pages people have used the _border property, but I'm not sure how to use it.
I tried adding it as I did the _alpha but that didn't work.
Any hints?

Thanks.
TOPICS
ActionScript
386
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

correct answers 1 Correct answer

Community Expert , Feb 09, 2009 Feb 09, 2009
add a white rectangel behind your images in your thumbnail movieclips. make the rectangle a little larger than your images and position the rectangle so it looks like a border. convert it to a movieclip and give it an instance name. by assigning the white rectangle's _visible property to false and true you can make it appear the border is disappearing and reappearing.
Translate
Community Expert ,
Feb 09, 2009 Feb 09, 2009
add a white rectangel behind your images in your thumbnail movieclips. make the rectangle a little larger than your images and position the rectangle so it looks like a border. convert it to a movieclip and give it an instance name. by assigning the white rectangle's _visible property to false and true you can make it appear the border is disappearing and reappearing.
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
New Here ,
Feb 10, 2009 Feb 10, 2009
That's easy. Thanks!
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 ,
Feb 10, 2009 Feb 10, 2009
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