buttons in movieclip problem

This is a discussion on buttons in movieclip problem within the Macromedia Flash forums in Adobe Tools category; Hello Flash-people, Even though i know not much of actionscripting, i like to make sites that are flash-based, so i keep on challanging myself with that. But now i stumbled into something, and i just cant find a solition! here is my problem: I have made dropdownmenu's in a movieclip and the mc works with hittest like this: onClipEvent (enterFrame) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { this.nextFrame(); } else { this.prevFrame(); } } In this dropdown-menu i have buttons, those should be able to load and unload movieclips into an emptymc and an emptymc2 in the main movie (_root). I ...

Go Back   Application Development Forum > Adobe Tools > Macromedia Flash

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-10-2008, 04:36 AM
Dansz_again
Guest
 
Default buttons in movieclip problem

Hello Flash-people,

Even though i know not much of actionscripting, i like to make sites that are
flash-based, so i keep on challanging myself with that. But now i stumbled into
something, and i just cant find a solition!

here is my problem:

I have made dropdownmenu's in a movieclip and the mc works with hittest like
this:

onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}

In this dropdown-menu i have buttons, those should be able to load and unload
movieclips into an emptymc and an emptymc2 in the main movie (_root). I need
them to load 2 things:
the background (background.swf) and the text that comes over te background.
And since i want only the text to change when another button is hit in the same
dropdown menu, i tried to work with this:

on (press) {
if (_root.emptymc.getBytesTotal()<10) {
loadMovie("background.swf", "emptymc");
}
loadMovie("text1.swf", "emptymc2");
}

But, no matter what i try to do, i just cant get it to work, it only works
when the button with this action is already in the _root, and i dont want that.
Neither can i put the emptymc or the emptymc2 in the same movieclip as the
dropdownmenu, because i want other buttons (from another dropdownmenu) also to
use the emptymc and emptymc2.

Maybe i have taken a wrong direction to begin with, i really dont know. But if
you do, please enlighten me! :-)

Reply With Quote
  #2  
Old 09-10-2008, 03:36 PM
kglad
Guest
 
Default Re: buttons in movieclip problem

use the correct paths to emptymc (_root.emptymc) and emptymc2 (likewise), don't
use strings for the movieclips and you really should use the loadMovie()
method, not the function so you avoid bad habits like you're currently
developing using strings instead of movieclips.

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 11:42 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.