Click to See Complete Forum and Search --> : Include a button accessed from within the Tweener List Scroll


visualizer03
03-21-2009, 04:32 PM
I have a flash swf that I am using Tweener to move a wide movieclip across the stage incrementally - accessing a forward arrow and backward arrow with the following code. It works perfectly for what I am trying to accomplish. The long movie clip is composed of Image and Movieclip symbols. I am working in Action Script 2.0

In addition to the above funcitonality I am also needing to have a button on the second movieclip (click the arrow once and on that "screen") that allows for an image gallery to fill the screen (I'm using the SlideShow pro component). From this gallery screen, I also need a button that closes the gallery and returns to the main movieclip with arrow controls.

I'm not sure how to add that functionality to the code. When I try making a button symbol and giving it on press functionality it does not work. Can someone help me?

The file was larger than 100kb even when zipped, but the code is below:
I can email you the file if needed.

Thanks!

import caurina.transitions.Tweener;

// Setup buttons

this.bBackward.onRollOver = function() {
Tweener.addTween(this, {_alpha:100, time:0.6});
};
this.bBackward.onRollOut = this.bBackward.onReleaseOutside = function() {
Tweener.addTween(this, {_alpha:100, time:0.6});
};
this.bBackward.onRelease = function() {
this._parent.scrollList(-1);
};

this.bForward.onRollOver = function() {
Tweener.addTween(this, {_alpha:100, time:0.6});
};
this.bForward.onRollOut = this.bForward.onReleaseOutside = function() {
Tweener.addTween(this, {_alpha:100, time:0.6});
};
this.bForward.onRelease = function() {
this._parent.scrollList(+1);
};

// Setup data (amount of arrow clicks)
this.currentPosition = 0;
this.maxPosition = 6;

// Moving functions
this.scrollList = function(p_offset:Number): Void {
this.gotoPosition(this.currentPosition + p_offset);
};

this.gotoPosition = function(p_position:Number): Void {
// Goes to a certain position
p_position = p_position < 0 ? 0 : p_position > this.maxPosition ? this.maxPosition : p_position;
if (p_position != this.currentPosition) {
this.currentPosition = p_position;
Tweener.addTween(this.itemList, {_x:4298.4 - (this.currentPosition * 745.0), time:3.0, transition:"easeoutback"});
}
};

this.stop();

};

Eye for Video
03-21-2009, 07:35 PM
So you have a main movie clip that you scroll across the page and then within that you have other movie clips? Are you properly "drilling down" to reach the second or third level movie clip?
Here's what I mean (from main timeline)
play15.pl1.art_btn.onRelease = function(){
gotoAndStop("ss6");
holder_mc.loadMovie("ss6/ss6.swf");
}
The MC "play15" contains another MC called "pl1" which contains a button called "art_btn" which has an onRelease function attached.
The drilling down process is just mainMC DOT subMC DOT button DOT function.
Is that the general proceedure you are talking about?
Best wishes,
Eye for Video
www.cidigitalmedia.com