Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Flash - ActionScript

dynamically position button with action inside

 
Jump to:  
 
tobycraftse
PostPosted: Wed Jul 23, 2008 10:11 pm    Post subject: dynamically position button with action inside
       
I have 100 button icon, when flash program runs, how to dynamically choose
button i want and put it on canvas using action script?

for example, when user choose computer - all icon button related to computer
will get put on canvas ... etc

each button will have action script attach to it and do something.

any examples?
 

 
kglad
PostPosted: Wed Jul 23, 2008 11:53 pm    Post subject: Re: dynamically position button with action inside
       
use the attachMovie() method of movieclips if all your icons are in your fla's
library:



useBtn.onRelease=function(){
yourbutton = maintimeline.attachMovie(userselectedID,"mc"+dep,dep++);
yourbutton.onRelease=function(){
// do whatever
}
}
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

grecja Matura Są pewne sprawy - Grzegorz Turnau Ang cytaty siłownia gryf