aarondm
02-20-2008, 05:38 AM
Hi,
I have created a scroller for thumnails of my videos, the user clicks them the larger image appears above and then they will click larger image to play video or rollout to go back to main thumbnail scroller.
How can I assign separate links to each of my larger images when there are no images actually on the stage - i brought them in at first, converted to movie, changed the settings to export to actionscript and deleted them from the stage so that they are controlled only by actionscript.
When I convert them to movie clips, how can assign a tag or instance name to be called to each individual image, that will link to a separate video when they are not actually on the stage? Can I write extra actionscript for this for each image name, eg, image1..blah blah blah getURL etc, image 2 getURL with an onRelease function.
Here is the code and go to positivimpact.co.uk to see it live, better in explorer 7 though.
import mx.transitions.Tween;
import mx.transitions.easing.*;
this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 20;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
myThumb_mc._x = (i-1)*myThumb_mc._width;
myThumb_mc._y = (Stage.height-myThumb_mc._height-3)
myThumb_mc._alpha=100;
myThumb_mc.largerImage = i;
myThumb_mc.onRollOver = function(){
this._alpha=100;
}
myThumb_mc.onRelease = function() {
_root.attachMovie("image"+this.largerImage,"large_mc",2);
large_mc._x = (Stage.width-large_mc._width)/2;
large_mc._y = (Stage.height-large_mc._height-70);
large_mc.onRollOut = function() {
this.removeMovieClip();
};
};
}
container.onEnterFrame = function() {
this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*10;
if (this._x>0) {
this._x = 0;
}
if (-this._x>(this._width-Stage.width)) {
this._x = -(this._width-Stage.width);
}
};
please help, many thANKS
I have created a scroller for thumnails of my videos, the user clicks them the larger image appears above and then they will click larger image to play video or rollout to go back to main thumbnail scroller.
How can I assign separate links to each of my larger images when there are no images actually on the stage - i brought them in at first, converted to movie, changed the settings to export to actionscript and deleted them from the stage so that they are controlled only by actionscript.
When I convert them to movie clips, how can assign a tag or instance name to be called to each individual image, that will link to a separate video when they are not actually on the stage? Can I write extra actionscript for this for each image name, eg, image1..blah blah blah getURL etc, image 2 getURL with an onRelease function.
Here is the code and go to positivimpact.co.uk to see it live, better in explorer 7 though.
import mx.transitions.Tween;
import mx.transitions.easing.*;
this.createEmptyMovieClip("container",1);
var imagesNumber:Number = 20;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
myThumb_mc._x = (i-1)*myThumb_mc._width;
myThumb_mc._y = (Stage.height-myThumb_mc._height-3)
myThumb_mc._alpha=100;
myThumb_mc.largerImage = i;
myThumb_mc.onRollOver = function(){
this._alpha=100;
}
myThumb_mc.onRelease = function() {
_root.attachMovie("image"+this.largerImage,"large_mc",2);
large_mc._x = (Stage.width-large_mc._width)/2;
large_mc._y = (Stage.height-large_mc._height-70);
large_mc.onRollOut = function() {
this.removeMovieClip();
};
};
}
container.onEnterFrame = function() {
this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*10;
if (this._x>0) {
this._x = 0;
}
if (-this._x>(this._width-Stage.width)) {
this._x = -(this._width-Stage.width);
}
};
please help, many thANKS