# How Do I Replace Components with Custom Stuff

**URL:** https://forum.kirupa.com/t/how-do-i-replace-components-with-custom-stuff/220748
**Category:** flash
**Created:** [March 28, 2007, 8:58pm UTC](https://forum.kirupa.com/t/how-do-i-replace-components-with-custom-stuff/220748 "2007-03-28T20:58:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Zarahs](https://avatars.discourse-cdn.com/v4/letter/z/ed8c4c/32.png) [@Zarahs](https://forum.kirupa.com/u/Zarahs)
#### Post date: [March 28, 2007, 8:58pm UTC](https://forum.kirupa.com/t/how-do-i-replace-components-with-custom-stuff/220748/1 "2007-03-28T20:58:08Z")

</div>

Here is what I have working they way I like [http://shara.us/Practice/FlashDB/myTextBox.html](http://shara.us/Practice/FlashDB/myTextBox.html) the text box pulls data from a mySQL database and displays it just fine. But the default component buttons are ugly and I wish to use custom images either as a movie clip or button. Is this possible? Here is the actionscript I’m working with:

\_global.styles.TextArea.setStyle(“backgroundColor” , “false”);  
\_global.styles.TextArea.setStyle(“borderStyle”, “none”);  
\_global.styles.Button.setStyle(“backgroundColor” , “false”);  
\_global.styles.Button.setStyle(“borderStyle”, “none”);  
function loadEntries(act, increment) {  
// Define NumLow as a Number  
num = new Number(\_parent.NumLow);  
// Act accordingly  
if(act == “٧”) {  
// Add increment  
\_parent.NumLow = num + increment;  
} else if(act == “٨”) {  
\_parent.NumLow = num - increment;  
} else {  
// Load default - i.e. 0  
\_parent.NumLow = 0;  
}  
// Update Statistics  
\_parent.read.low.text = \_parent.NumLow;  
\_parent.read.high.text = Number(\_parent.NumLow) + 1;  
// Begin Loading  
myEntries = new LoadVars()  
entries.vScrollPolicy = false;  
myEntries.ref = this  
myEntries.load(“[http://shara.us/Practice/FlashDB/shara.php?action=read&r="+random(999)+"&NumLow=](http://shara.us/Practice/FlashDB/shara.php?action=read&r=%22+random(999)+%22&NumLow=)”+\_parent.NumLow)  
myEntries.onLoad = function(success){  
if(success){  
// Assign output to components and objects  
entries.text = this.entries;  
totalEntries.text = this.totalEntries;  
//Update values to calculate prev/next button visibility  
num = Number(\_parent.NumLow)  
var totalEntries = Number(this.totalEntries);  
var total = num+increment  
//Hide/show next button  
if(total\<totalEntries) this.ref.next\_button.\_visible = true;  
else this.ref.next\_button.\_visible = false;  
//Hide/show previous button  
if(num==0) prev\_button.\_visible = false;  
else prev\_button.\_visible = true;  
}  
}  
}  
// Load Default  
\_parent.read.loadEntries(“Default”, 1);  
stop();

Lastly, I would like to add a transition using a mask or whatever other means to make the text appear as if it is dropping down from the top of the screen when the next button is used (page down basically) and reverse when previous button is used (page up). Any help with either or both of these matters would be greatly appreciated. Thank you in advance.
