LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-27-2006, 03:45 PM
jwhittlestone jwhittlestone is offline
Registered User
 
Join Date: Apr 2006
Posts: 1
Rep Power: 0
jwhittlestone is on a distinguished road
SWF Bar graph, _xscale property and referencing movieclips

I think I may have the referncing incorrect to alter the _xscale property of a movie clip within a movie clip

The bars should be showing as I alter the _xscale property in a function, but this is not happening. I hope someone may be able to help an AS newbie (as I'm close to tears )

As you can see, the vote data is fetched from the db ok and displays.

Percentages are calculated from the vote figures and this is functioning ok as you can see from the text box on the left. ie.
var percent1 = (Number(votes1) / total) * 100;

In the same frame where these percentages are worked out, this code is executed to alter the _xscale property ie.
percentBar1.setPos(percent);

The function definition to this is in the first frame of the movieclip of which percentBar1 is an instance. ie.
function setPos (percent){
bar._xscale = percent;
}


bar is an instance on the timeline in the same frame as this definition (the timeline is only one frame long.

I'm used to director - and am not too sure about referencing of instance vars. The fla file can be found here http://www.jonwhittlestone.co.uk/cashcade/results2.fla

thanks so much in advance

Jon
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump




All times are GMT. The time now is 07:20 AM.