Author Message

Posted: Fri Feb 11, 2011 9:06 am   Post subject: How to add slidecounter to CNavigationPanelSkin AS2


Looking at the sdk samples i would like to modify the navigation_panel.fla in order to fit our GUI. However i need to add a slidecounter just like the skin_with_thumbnails.fla file. I think these two samples are using different approaches to add the controlpanel,so i cant understand how to add the slidecounter label MC to the navigation panel. These are the related functions to the slidecounter


private var m_slideCountLabel:Label;

m_slideCountLabel = parent["slideCountLabel"];

public function onSetCurrentSlide(index:Number)
      m_slideCountLabel.text = "Slide: " + String(index + 1) + " / " + String(m_player.getPresentationInfo().getSlides().getVisibleSlidesCount());

So i would like to add this to the createControls function in the lP
CNavigationPanelSkin but no luck. Any idea or samples on this ?



Tried to add a label as a mc into the library an added it to the panel as a button with the addButton function,it works (of course) but i would like to attach it as a MC and take advantage of the onCurrentSlideIbdexChange function which has the current slideindex as add the to the label.text. But i haven't figured it out yet how to do all this.

Profile profile test

Posted: Fri Feb 11, 2011 9:17 pm   Post subject: Re: How to add slidecounter to CNavigationPanelSkin AS2

Simple solution: Straightforwad,just create it in as

m_target.textBox.createTextField("myText",m_target.textBox.getNextHighestDepth(),0,0, 200, 320);
//set text properties
m_target.textBox.myText.text = "myText";

And update the text upon slideChange function

Hopes it helps someone in the future.

Very cool this ispring, will suggest it as a tool for our rapid/short e-learning courses, working in the automotive industry.


Profile profile test
Display posts from previous:  Sort by  


Who is online
Who is online In total there are 10 users online :: 2 registered, 0 hidden and 8 guests (based on users active over the past 5 minutes)
Most users ever online was 803 on Sat Dec 12, 2020 9:21 am

Registered users: Bing [Bot], Google [Bot]