Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help w/ CS4 - buttons from flash 8 version not working right

Status
Not open for further replies.

fedtrain

Instructor
Jun 23, 2004
142
US
Hello tek'ers...been gone a while but now stuck again with the new CS4 version of Flash.

We have an app that we built way back in Flash 8 with AS2. There have been many updates to it using CS3...and everything was working fine. Now when you open source in CS4...there are no labels on the buttons.

The buttons show up...and they click...but the text field for the buttons is not showing up.

We do not have the time to recode the whole thing to AS3 as we have so many other priorities. Any help with fixing this issue would be greatly appreciated. This is the code making the buttons:
Code:
// This is the action to build the buttons based on array
for (i=0; i < toolsArray.length; i ++){
	//Generic button building code
	this.buttonContainer.startButtons.attachMovie ("toolButton", "bt"+toolsArray[i], this.buttonContainer.startButtons.getNextHighestDepth());
		this.buttonContainer.startButtons["bt"+toolsArray[i]]._x = 13 //This sets the buttons to start location for x
		this.buttonContainer.startButtons["bt"+toolsArray[i]]._y = 3 +(i *25)// The number i is multiplied by sets the distance between buttons
		this.buttonContainer.startButtons["bt"+toolsArray[i]].toolTab._visible = false
		this.buttonContainer.startButtons["bt"+toolsArray[i]].toolText.text = toolsArray[i]
		
		//This assigns generic button functions
			this.buttonContainer.startButtons["bt"+toolsArray[i]].onRelease = function(){
				var buttonPush = this.toolText.text

				// Loop through the buttons and reset them in position and tab visibility
				for (r=0; r < toolsArray.length; r ++){
					//Need to target back to the parent (stage) to get the buttons info
					if (this._parent["bt"+toolsArray[r]] !=13){
						this._parent["bt"+toolsArray[r]]._x = 13
						this._parent["bt"+toolsArray[r]].toolTab._visible = false
					}
				}
				
				// Once the buttons are reset, the clicked button must be set
				this.toolTab._visible = true
				this.toolTab._alpha = 100
					if (this._x == 13){
						this._x -= 7
					}
				showTool (buttonPush)
			}
				
		//Additional button functions
			this.buttonContainer.startButtons["bt"+toolsArray[i]].onRollOver = function(){
				if (this._x == 13){
					this.toolTab._visible = true;
					this.toolTab._alpha = 50;
					}
			}
			this.buttonContainer.startButtons["bt"+toolsArray[i]].onRollOut = function (){
				if (this._x ==13) {
					this.toolTab._visible = false;
				}
			}	
}

"Credit belongs to the man who is actually in the arena - T.Roosevelt
 
If I drop a trace right after the text is pulled from the array....

Code:
trace (this.buttonContainer.startButtons["bt"+toolsArray[i]].toolText.text)

Then I get output in both CS3 and CS4...but I will try in other areas too...unless you have suggested areas you think it is breaking.

ps...if i do just the toolText.text it throws out undefined

"Credit belongs to the man who is actually in the arena - T.Roosevelt
 
Ok...moved that trace all the way down to just before last bracket and I get the right information for each button.

Also traced the visibility and it is showing as true. Hmmmm.

"Credit belongs to the man who is actually in the arena - T.Roosevelt
 
Checked the embed just a bit ago. Thinking it may be the use of dynamic text field at this point...as other changes to the button graphic shows.
Will test more...ideas are helping me think of areas to look at.

"Credit belongs to the man who is actually in the arena - T.Roosevelt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top