Movie clips as masks
I'm trying to use a movie clip as a mask layer. The movie
clip contains both lines and fills. The fill areas are working
perfectly but the lines are appearing all weird and streaked (it's
actually quite cool looking but not what I'm ideally after). The
masked layer is just a block of plain colour fill. Has anyone had
the same problem as me and if so is there a work around? Do lines
and fills need to be on seperate layers or something?
I seem to remember reading something about declaring movie
clips as mask layers using actionscript but I've searched and found
nothing.
Any help or advice on this much appreciated.
Cheers,
Minky.
:)
Luxury Mince Pie wrote:
> I'm trying to use a movie clip as a mask layer. The
movie clip contains both
> lines and fills. The fill areas are working perfectly
but the lines are
> appearing all weird and streaked (it's actually quite
cool looking but not what
> I'm ideally after). The masked layer is just a block of
plain colour fill. Has
> anyone had the same problem as me and if so is there a
work around? Do lines
> and fills need to be on seperate layers or something?
Outlines can't be use as mask, they simply won't show up at
all. Outlines need to
be converted to solid fills.
> I seem to remember reading something about declaring
movie clips as mask
> layers using actionscript but I've searched and found
nothing.
search for setMask in your help files.
Best Regards
Urami
"Never play Leap-Frog with a Unicorn."
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami>
Similar Messages
-
Multi-layer movie clip as mask
Hello all,
I want to use as a mask a movie clip that has several layers
with tweens. Somehow this doesn't work for me - all I see when I
set this movie clip as mask is one of these layers - the others
remain invisible. For example, I have two layers - on layer 1, the
object I want to be masked; above it, on layer 2, the mask. This
mask is a MC that has several layers with animated (tweened) ovals
moving in different directions. When I preview the animation, only
one of these ovals is visible. How can I make it work properly?
thanks in advance,
Mikolajenable the cacheAsBitmap properties of your masked and
masking movieclips and see if your problem resolves. -
I am having difficulty with some movie clips under a mask. I
have a large movie clip with thumbnail photos underneath a mask.
The thumnails slide up and down using a scroll bar that is linked
through action script. When a thumbnail is clicked, it triggers
another movie clip to appear on stage. My first four work, but once
I have to scroll the fifth one into view, the fifth thumbnail
doesn't even register as clickable. Any thoughts?I removed the mask, and tested the movie after adding a trace
to the fourth thumbnail. It still came up undefined, even after I
used the target feature to call it. Any other thoughts? The fifth
thumbnail also came up undefined. All the thumbnails are labeled
printThumb#_mc, where # is the number of the thumbnail. -
Help with smooth scrolling (masked movie clip)
Ok, I really need help here, and I'll be very grateful for
help before Monday.
Someone has made a movie with a different set of text on each
frame, the text goes out of the viewable area.
I have been asked to make these frames appear in a pop-up on
another flash and be scrollable.
i thought this would be easy...just cut and paste them into a
movie clip, then using a mask to hide the rest of the text.
However, it is going painstakingly slow.
Seems to be a performance issue, but it might be my code.
Any help with the code, or optimisation elsewhere would be
helpfully.
Heres a simplified version of the flash;
www.darkflame.co.uk/flashwork/Flash_popuptest.fla
Code for the scrolling;
_global.MoveUp = function(text) {
_root.ITproduct.IT_productlist._y =
_root.ITproduct.IT_productlist._y+6;
updateAfterEvent();
//trace('press');
Called and stopped by;
on (press){
//this._parent.IT_productlist._y =
this._parent.IT_productlist._y +10;
//_global.scrollon = "yes";
clearInterval(IntervalID);
IntervalID = setInterval(MoveUp,100);
updateAfterEvent()
//updateAfterEvent();
//MoveUp();
//scroll on
on (release) {
//this._parent.IT_productlist._y =
this._parent.IT_productlist._y +10;
clearInterval(IntervalID);
updateAfterEvent();
//scroll off
which is linked to a button.
I dont know if this is a actionscript problem, or the way the
page is made, or both.
Any help would be appreciated.
Thanks in advance,
Thomas Wrobelyou have extraneous graphics on-stage that are slowing the
scrolling (and even causing problems in the authoring environment).
here's your file with those graphics removed:
http://www.gladstien.com/Files.popupTest.fla -
Can anyone point me in the right direction?
I've been playing around with making a draggable movie clip.
This movie clip appears within a container, holder_mc, which is
masked by a mask layer to control what is seen. I can drag
holder_mc around the screen, but the mask does not move with it.
When I hit the movie_btn, I cannot see my VideoPlayer.swf file. If
I do not drag holder_mc anywhere, and just press my movie_btn, I
cannot drag my swf file. Is there an easy way to have the mask and
holder_mc drag together, and have drag functionality even after my
swf is playing?
Here is what I'm using:
movie_btn.onRelease = function (){
holder_mc.loadMovie ("VideoPlayer.swf");
holder_mc.onPress = function(){
this.startDrag(false);
holder_mc.onRelease = function(){
stopDrag();
Thanks for any help.Couple of ways... simple enter_frame, or enter_frame TweenLite
addEventListener(Event.ENTER_FRAME, updateReflection, false, 0, true);
function updateReflection(e:Event):void
refClip.x = mouseX;
refClip.y = mouseY;
or using TweenLite to give it a little softer motion:
function updateReflection(e:Event):void
TweenLite.to(refClip, .5, {x:mouseX, y:mouseY}); -
Hi,
when I try to load a movie in a masked movieclip/placeholder
the clip
isn't loaded. When I check for getBytesTotal() it still is 18
bytes like
the paceholder. When I put the mask away the clip is loaded.
Can I have both?
TIAJust read your post in google groups, for some reason I can't
see it on
the newsgroupserver.
The problem ist that is just not loaded when there is a mask
on it. It
is just ignored without any error message or anything. Have
done it
without a mask now. Seems to be a bug or something. -
Drop menus with mask and invisible movie clip
please see this navigation interface:
http://www.hearightnow/yogamater/
when the mouse is outside of the drop menus, the drop menus "hide" behind the outside of a mask, when the mouse enters the drop menus, they move up. An invisible movie clip the traces the frame of the photos is in place to insert ROLL_OVER and ROLL_OUT code to "block" the event listener that functions the "yoga" drop menu.
This is all done in one frame, the scripts do all the animation of the drop menus.
the current code for this menu allows the mouse to travel from the photos to the "yoga" drop menu without triggering the menu to go up, however if the mouse travels from the "yoga" drop menu to the photos, the drop menu locks up until the mouse leaves the photos.
any ideas how this can be fixed? also, how do I apply the script on the invisible clip to all the drop menus?
definitely a newbie to AS3 so all help is greatly appreciated!!
here is the main script:
stop();
addEventListener(Event.ENTER_FRAME,upyoga);
addEventListener(Event.ENTER_FRAME,upteach);
addEventListener(Event.ENTER_FRAME,upsched);
addEventListener(Event.ENTER_FRAME,uppriv);
addEventListener(Event.ENTER_FRAME,upcont);
var speed:Number=.222;
function upyoga(e:Event) {
if ((yoga_menu.mouseY<yoga_menu.height&&yoga_menu.mouseY>0) &&
(yoga_menu.mouseX<80&&yoga_menu.mouseX>0)) {
yoga_menu.y-=(-58+yoga_menu.y)*speed;
} else {
yoga_menu.y-=(-134+yoga_menu.y)*speed;
function upteach(e:Event) {
if ((teach_menu.mouseY<teach_menu.height&&teach_menu.mouseY>0) &&
(teach_menu.mouseX<80&&teach_menu.mouseX>0)) {
teach_menu.y-=(-65+teach_menu.y)*speed;
} else {
teach_menu.y-=(-118+teach_menu.y)*speed;
function upsched(e:Event) {
if ((sched_menu.mouseY<sched_menu.height&&sched_menu.mouseY>0) &&
(sched_menu.mouseX<80&&sched_menu.mouseX>0)) {
sched_menu.y-=(-42+sched_menu.y)*speed;
} else {
sched_menu.y-=(-96+sched_menu.y)*speed;
function uppriv(e:Event) {
if ((priv_menu.mouseY<priv_menu.height&&priv_menu.mouseY>0) &&
(priv_menu.mouseX<80&&priv_menu.mouseX>0)) {
priv_menu.y-=(-28+priv_menu.y)*speed;
} else {
priv_menu.y-=(-74+priv_menu.y)*speed;
function upcont(e:Event) {
if ((cont_menu.mouseY<cont_menu.height&&cont_menu.mouseY>0) &&
(cont_menu.mouseX<80&&cont_menu.mouseX>0)) {
cont_menu.y-=(-40+cont_menu.y)*speed;
} else {
cont_menu.y-=(-88+cont_menu.y)*speed;
and here is the script on the invisible clip:
invisiClip.addEventListener(MouseEvent.ROLL_OVER, invisClipOver);
invisiClip.addEventListener(MouseEvent.ROLL_OVER, menuBack);
invisiClip.addEventListener(MouseEvent.ROLL_OUT, invisClipOut);
function invisClipOver(event:MouseEvent):void {
removeEventListener(Event.ENTER_FRAME,upyoga)
function menuBack(e:Event) {
yoga_menu.y-=(-134+yoga_menu.y)*speed;
function invisClipOut(event:MouseEvent):void {
addEventListener(Event.ENTER_FRAME,upyoga)I was having trouble attaching a zip or fla to this post so they can be retrieved at
http://www.hearightnow.com/yogamater/menu_45b.zip
or
http://www.hearightnow.com/yogamater/menu_45b.fla
the "menu" layer contains the mask that the drop menus hide behind
the "invis" layer contains the invisible movie clip that has the code that removes and adds the event listeners that move the "yoga" drop menu
the photos seen at http://www.hearightnow.com/yogamater/ are added with HTML DIV tags.
thanks! -
How load variables to a movie clip on a masked layer on my main time line
the problem I have is that I been trying to load text from a
text file news.txt into a movie clip on my main time line the
problem is when the layer where the video clip is locates is masked
the variables will not load, but it does work when the layer is
unmasked, but then the website does not work the way it is suposed
to look.
any Idea on how I can get arround this????PArt of the problem will be due to declaring the uiLoader inside of a function. When you do that you limit its scope to within that function. You should declare it outside of any function if you need to access it in more than one function.
import flash.events.MouseEvent;
import fl.motion.MotionEvent;
var uiLoader:UILoader;
var targetObj:Object;
The other problems I see regard the line you point to. It is not spelling the name the same, using a lowercase "l". Also, if you want to target what the UILoader contains, you should target its "content" property, as in...
targetObj = uiLoader.content.mask_01 -
Masking a movie clip that contains other movie clips
hi,
i am just trying out something in flash but it just doesnt
work.
I have a layer which has a movie clip which contains other
movieclips in itself.
Masking the layer that has the main movie clip causes the
other movieclips in the main one to disappear when running the swf.
Does any one have any idea how to get around this???
thanksHi,
Recently, I have been putting together a flash presentation.
And I am just wondering if the following might help you, in your
communication with the said swf file:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onComplete);
function onComplete(event:Event):void
event.target.content.thinggy_mc.y -= 100;
Not the best example, but this allows you to target a mc
within an external swf file. I think if you look up this code, you
will have an answer ;)
Kind Regards,
Boxing Boom -
How do I "mask" or blurr out sections of movie clips saved in windows media format in After Effects
I was informed that I needed to use After Effects to "mask" or blurr out sections of movie clips saved in windows media format.
I have the movie clip in composition, I see the effects and presets drop box on the lower right.
How do I insert the text blocks to mask certain areas of the movie clip?
Thank you,
PrestonGetting started with After Effects (CS4, CS5, CS5.5, CS6, & CC) | After Effects region of interest
There's seriously nothing more to say. Watch some tutorials, read the help, learn the program.
Mylenium -
Mask works in movie clip, not in scene
I've created a movie clip with a mask that I'm using in a
main scene. The mask looks fine while editing/working the movie
clip, but does not show up in the scene.
The really strange thing is that it was working, but suddenly
now it won't show up in the scene any longer. I've tried replacing
it, making a new layer and bringing it in again. But nothing works.
Does anyone have an idea of why this would be?
Any help GREATLY appreciated!
dmscenes are nothing more than the main timeline divided.
Nothing different from one scene to the
other in terms of layer and frame functionality - sounds to
me like you simply dont have the mask
and masked layers locked in that scene.
~~~~~~~~~~~~~~~~
--> Adobe Certified Expert
--> www.mudbubble.com
--> www.keyframer.com
~~~~~~~~~~~~~~~~
dkmiles wrote:
> I've created a movie clip with a mask that I'm using in
a main scene. The mask
> looks fine while editing/working the movie clip, but
does not show up in the
> scene.
>
> The really strange thing is that it was working, but
suddenly now it won't
> show up in the scene any longer. I've tried replacing
it, making a new layer
> and bringing it in again. But nothing works.
>
> Does anyone have an idea of why this would be?
>
> Any help GREATLY appreciated!
>
> dm
> -
Mask - movie clip loaded from .swf
Hi!
I have made an application where a movie clip (map_mc) is
masked by another movie_clip (map_window_mc:
map_mc.setMask("map_window_mc");
This works fine until I try to load an "external" .swf into
map_mc:
map_mc.loadMovie("Testmap.swf");
Then the mask does not work anymore......
Any suggestions?
(The testmap.swf is also displaced from map_mc.........)
I use Flash 2004 MX pro
terjemterjem,
> My problem is probably that I really don't know wath
event
> handler I should use...
Depending on the approach you're using, there may not even
be an event
handler when the external SWF loads. If you're using the
MovieClipLoader
class, there will be. If you're using a
MovieClip.onEnterFrame loop, there
won't be.
> Here is the first ("non-automatic") code that works:
Okay.
> map_mc.loadMovie("Testmap.swf");
> trace("Loading started!");
> this.onEnterFrame = function() {
> if (
> map_mc.getBytesLoaded() > 0 &&
> map_mc.getBytesLoaded() >= map_mc.getBytesTotal()
> ) {
> trace("Loading complete!");
> trace("File width: " + map_mc._width);
> delete this.onEnterFrame;
> } else {
> trace("File width: " + map_mc._width);
> }
> };
Okay. So far, so good. When bytes loaded is greater than
zero and
greater than or equal to bytes total, you'll know the
external SWF has fully
loaded. You'll know, because the "Loading complete!" trace
will be visible
in your Output panel. Well, that means the place in this
script that
represents "where to put additional code" is right were your
trace()
functions are. Not in the "else" clause, but the first one
this.onEnterFrame = function() {
if (
map_mc.getBytesLoaded() > 0 &&
map_mc.getBytesLoaded() >= map_mc.getBytesTotal()
trace("Loading complete!");
trace("File width: " + map_mc._width);
[delete these trace() functions, if you like]
[add your masking code here]
delete this.onEnterFrame;
// etc.
> The code below does not work (the positioning of the
> map_mc works, but not the setMask):
Your problem may be right here ...
> map_mc.setMask("map_window_mc");
... because "map_window_mc" is in quotes. Yes, the
ActionScript Language
Reference says the parameter of setMask() may be a string,
but leave the
quotes out and see what happens. In any case,
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design." -
How to stop a slideshow and show another movie clip at the end?
Currently my slideshow is in a loop. At the end of last slideshow, I want to show another movie clip (End_mv) that's on another layer. How do I do that? My current scripts are below:
import fl.transitions.Tween;
import fl.transitions.easing.*;
//change scale on an image
var fadeTween:Tween;
//To slide in on X axis
var slideXTween:Tween;
//To slide in on Y axis
var slideYTween:Tween;
//To fade IN
var alphaTween:Tween;
//To get bigger on its X axis
var scaleXTween:Tween;
//To get bigger on its Y axis
var scaleYTween:Tween;
//var fadeTween:Tween;
//description place holder
var strDescrp:String;
//source place holder
var strSource:String;
//x poistion
var posX:Number;
//y position
var posY:Number;
//degree rotation
var degreeRot:Number;
// delay between slides
//const TIMER_DELAY:int = 5000;
var TIMER_DELAY:int = 5000;
// fade time between slides
const FADE_TIME:int = 3;
// reference to the current slider container
var currentContainer:Sprite;
// index of the current slide
var intCurrentSlide:int = -1;
// total slides
var intSlideCount:int;
// timer for switching slides
var slideTimer:Timer;
// slides holder
var sprContainer1:Sprite;
var sprContainer2:Sprite;
// slides loader
var slideLoader:Loader;
// url to slideshow xml
var strXMLPath:String = "lstHouse.xml";
// slideshow xml loader
var xmlLoader:URLLoader;
// slideshow xml
var xmlSlideshow:XML;
var txtField:TextField = new TextField();
var formatText:TextFormat = new TextFormat();
//start of sound section is for sound
var soundReq:URLRequest = new URLRequest("PaukenBrumfiel_AngelsOnHigh.mp3");
var sound:Sound = new Sound();
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
//end of sound section
function onComplete(event:Event):void
sound.play();
function init():void
// create new urlloader for xml file
xmlLoader = new URLLoader();
// add listener for complete event
xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);
// load xml file
xmlLoader.load(new URLRequest(strXMLPath));
// create new timer with delay from constant
slideTimer = new Timer(TIMER_DELAY);
// add event listener for timer event
slideTimer.addEventListener(TimerEvent.TIMER, switchSlide);
// create 2 container sprite which will hold the slides and
// add them to the masked movieclip
sprContainer1 = new Sprite();
sprContainer2 = new Sprite();
mcSlideHolder.addChild(sprContainer1);
mcSlideHolder.addChild(sprContainer2);
// keep a reference of the container which is currently
// in the front
currentContainer = sprContainer2;
function onXMLLoadComplete(event:Event):void
// create new xml with the received data
xmlSlideshow = new XML(event.target.data);
// get total slide count
intSlideCount = xmlSlideshow..image.length();
// switch the first slide without a delay
switchSlide(null);
function fadeSlideIn(e:Event):void {
// add loaded slide from slide loader to the
// current container
currentContainer.addChild(slideLoader.content);
// clear preloader text
//mcInfo.lbl_loading.text = "";
// fade the current container in and start the slide timer
// when the tween is finished
//Tweener.addTween(currentContainer, {alpha:1, time:FADE_TIME, onComplete:function() { slideTimer.start(); }});
//strSource = xmlSlideshow.image[intCurrentSlide].@src;
fadeTween = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
//scale = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
slideTimer.start()
onComplete:function();
function switchSlide(e:Event):void
// check, if the timer is running (needed for the
// very first switch of the slide)
if(slideTimer.running)
slideTimer.stop();
// check if we have any slides left and increment
// current slide index
if(intCurrentSlide + 1 < intSlideCount)
intCurrentSlide++;
// if not, start slideshow from beginning
else
intCurrentSlide = 0;
// check which container is currently in the front and
// assign currentContainer to the one that's in the back with
// the old slide
if(currentContainer == sprContainer2)
currentContainer = sprContainer1;
else
currentContainer = sprContainer2;
// hide the old slide
currentContainer.alpha = 0;
// bring the old slide to the front
mcSlideHolder.swapChildren(sprContainer2, sprContainer1);
strDescrp = xmlSlideshow.image[intCurrentSlide].@desc;
//strSource = xmlSlideshow.image[intCurrentSlide].@src;
//txtField.border = true;
//txtField.x = 0;
//txtField.y = 600;
txtField.width = 855;
txtField.height = 200;
//txtField.background = true;
//txtField.backgroundColor = 0xEE9A00;
txtField.alpha = 20;
txtField.text = strDescrp;
formatText.align = TextFormatAlign.CENTER;
//txtField.autoSize = TextFieldAutoSize.LEFT;
formatText.color = 0x000;
formatText.size = 30;
txtField.x = 0;
txtField.y = 550;
posX = 0;
posY = 0;
degreeRot = 0;
// create a new loader for the slide
slideLoader = new Loader();
// add event listener when slide is loaded
slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
// load the next slide
slideLoader.load(new URLRequest(xmlSlideshow.image[intCurrentSlide].@src));
addChild(txtField);
txtField.setTextFormat(formatText)
// init slideshow
init();I got this error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/swapChildren()
at University_Advancement_Holiday_Greeting2012_fla::MainTimeline/switchSlide()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
And here's the code:
// import tweener
//import caurina.transitions.Tweener;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.MovieClip;
//change scale on an image
var fadeTween:Tween;
//To slide in on X axis
var slideXTween:Tween;
//To slide in on Y axis
var slideYTween:Tween;
//To fade IN
var alphaTween:Tween;
//To get bigger on its X axis
var scaleXTween:Tween;
//To get bigger on its Y axis
var scaleYTween:Tween;
//var fadeTween:Tween;
//description place holder
var strDescrp:String;
//source place holder
var strSource:String;
//x poistion
var posX:Number;
//y position
var posY:Number;
//degree rotation
var degreeRot:Number;
// delay between slides
//const TIMER_DELAY:int = 5000;
var TIMER_DELAY:int = 5000;
// fade time between slides
const FADE_TIME:int = 3;
// reference to the current slider container
var currentContainer:Sprite;
// index of the current slide
var intCurrentSlide:int = -1;
// total slides
var intSlideCount:int;
// timer for switching slides
var slideTimer:Timer;
// slides holder
var sprContainer1:Sprite;
var sprContainer2:Sprite;
// slides loader
var slideLoader:Loader;
// url to slideshow xml
var strXMLPath:String = "lstHouse.xml";
// slideshow xml loader
var xmlLoader:URLLoader;
// slideshow xml
var xmlSlideshow:XML;
var txtField:TextField = new TextField();
var formatText:TextFormat = new TextFormat();
//var myEnding:MovieClip = stage.getChildByName('End_mc') as MovieClip;
//start of sound section is for sound
var soundReq:URLRequest = new URLRequest("PaukenBrumfiel_AngelsOnHigh.mp3");
var sound:Sound = new Sound();
sound.load(soundReq);
sound.addEventListener(Event.COMPLETE, onComplete);
//end of sound section
function onComplete(event:Event):void
sound.play();
function init():void
//reference my movie clip "End_mc" oon the stage and turn its visibility off
MovieClip(getChildByName('End_mc')).visible = false;
// create new urlloader for xml file
xmlLoader = new URLLoader();
// add listener for complete event
xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);
// load xml file
xmlLoader.load(new URLRequest(strXMLPath));
// create new timer with delay from constant
slideTimer = new Timer(TIMER_DELAY);
// add event listener for timer event
slideTimer.addEventListener(TimerEvent.TIMER, switchSlide);
// create 2 container sprite which will hold the slides and
// add them to the masked movieclip
sprContainer1 = new Sprite();
sprContainer2 = new Sprite();
mcSlideHolder.addChild(sprContainer1);
mcSlideHolder.addChild(sprContainer2);
// keep a reference of the container which is currently
// in the front
currentContainer = sprContainer2;
//function onXMLLoadComplete(e:Event):void
function onXMLLoadComplete(event:Event):void
// create new xml with the received data
xmlSlideshow = new XML(event.target.data);
// get total slide count
intSlideCount = xmlSlideshow..image.length();
// switch the first slide without a delay
switchSlide(null);
function fadeSlideIn(e:Event):void {
// add loaded slide from slide loader to the
// current container
currentContainer.addChild(slideLoader.content);
// clear preloader text
//mcInfo.lbl_loading.text = "";
// fade the current container in and start the slide timer
// when the tween is finished
//Tweener.addTween(currentContainer, {alpha:1, time:FADE_TIME, onComplete:function() { slideTimer.start(); }});
//strSource = xmlSlideshow.image[intCurrentSlide].@src;
fadeTween = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
//scale = new Tween(currentContainer, "alpha", Regular.easeInOut, 0, 1, 2, true)
slideTimer.start()
onComplete:function();
function switchSlide(e:Event):void
// check, if the timer is running (needed for the
// very first switch of the slide)
if(slideTimer.running)
slideTimer.stop();
// ADDED: Check if using sprContainer2 and at the last slide
//if ((currentContainer == sprContainer2) && (intCurrentSlide == intSlideCount))
trace("Current Slide: " + intCurrentSlide);
trace("SlideCount: " + intSlideCount);
if ((currentContainer == sprContainer2) && ((intCurrentSlide + 1) == intSlideCount))
// hide the slideshow (and other related elements, or remove them if desired)
//mcSlideHolder.visible = false;
// remove any clips directly inside slideshow (any timers/etc need to be stopped too)
while (mcSlideHolder.numChildren > 0)
mcSlideHolder.removeChildAt(0);
// I do see a var named 'sound' playing so you might want to:
//sound.stop();
//sound = null;
// etc any other slideshow-only elements to hide/remove..
// play your movie
MovieClip(getChildByName('End_mc')).visible = true;
MovieClip(getChildByName('End_mc')).play();
// check if we have any slides left and increment
// current slide index
if(intCurrentSlide + 1 < intSlideCount)
intCurrentSlide++;
// if not, start slideshow from beginning
else
intCurrentSlide = 0;
// check which container is currently in the front and
// assign currentContainer to the one that's in the back with
// the old slide
if(currentContainer == sprContainer2)
currentContainer = sprContainer1;
else
currentContainer = sprContainer2;
// hide the old slide
currentContainer.alpha = 0;
// bring the old slide to the front
mcSlideHolder.swapChildren(sprContainer2, sprContainer1);
strDescrp = xmlSlideshow.image[intCurrentSlide].@desc;
//strSource = xmlSlideshow.image[intCurrentSlide].@src;
//txtField.border = true;
//txtField.x = 0;
//txtField.y = 600;
txtField.width = 855;
txtField.height = 200;
//txtField.background = true;
//txtField.backgroundColor = 0xEE9A00;
txtField.alpha = 20;
txtField.text = strDescrp;
formatText.align = TextFormatAlign.CENTER;
//txtField.autoSize = TextFieldAutoSize.LEFT;
formatText.color = 0x000;
formatText.size = 30;
txtField.x = 0;
txtField.y = 550;
posX = 0;
posY = 0;
degreeRot = 0;
// create a new loader for the slide
slideLoader = new Loader();
// add event listener when slide is loaded
slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
// add event listener for the progress
//slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
// load the next slide
slideLoader.load(new URLRequest(xmlSlideshow.image[intCurrentSlide].@src));
addChild(txtField);
txtField.setTextFormat(formatText)
// init slideshow
init(); -
AE How to Change the color of a movie clip?
I have a movie clip of a White Show Avalanche. How can I change the color from White to another earthly color. I would like to post 2 images, one still of the white avalanche and one still image of the color or look I am after. Can you post or attach images to this thread? If so how?
I am not just trying to change the Hue/Saturation.To elaborate on Ko's post: In RGB space, White is presented by full values of 1 (or 255, if you like that better) for Red, Green and Blue. Since there's no differential between the individual components, there's nothing to shift the Hue. Hence you will have to find alternate ways of recoloring your stuff.
A simplistic way would e.g. be using effects such as Tint, Tritone or Colorama based on the Luminance. A more elaborate way would be cutting up the whole thing in multiple pieces (debris, shadows, waves, edges) and color correct each part individually. In any case you will very likely have to work with multiple instances of your layer and apply some masking here and there.
Mylenium -
Animated drop down buttons not working in movie clip
Hi,
I am working on this site: (AS2)
http://www.steamandclean.com/Index_w_1.html
I have two types of drop down menu. One under Commercial and one under Technical
The buttons are movie clips. The drop downs are also movie clips that start in frame 2 and are triggered on rollover.
The child buttons are buttons living on the drop down movie clips. They are set to getURL
As you see they are not willing to neither link to any url or will they run their move clip animation. One is a button and one is a movie clip.
The left movie clip has a mask, but it makes no difference if I remove the mask . It also has a emboss filter and no difference is I take that away either.
All of it is in one flash movie right now, but I will be splitting it up in a master navigation movie and individual swf's soon.
Right now I have the main movie, then the button MC then the dropdown MC and in the drop down MC I have placed either a animated (button) MC or a button. So it nested in nested in.......
In both cases I scripting the child buttons like this:
on (rollOver) {
gotoAndPlay(2);
on (rollOut) {
gotoAndPlay(6);
on (release) {
getURL("http://steamandclean.com");
I have also tried to use
_parent.getURL and _root.getURL in stead of just get URL, but it does not work.
The drop down buttons seem to be buried. In the left side the whole drop down panel seems to act like a link?
What am I doing wrong?
Can you help?
ggaardeHi Ned
Thank you for your reply again.
I figured it out.
Your reply prompted me to have my main button on rollover to go to a frame number on the main time line and then move the content of the drop down movie clip to that frame.
The drop down panel now work and the child buttons animation now work as well. I just had to find a way to make the drop down panel disappear on rollout. Since I could not script the actual drop down panel I created three skinny invisible buttons and placed them on the right, left and button of the drop down panel. I scripted them to go back to frame 1 on both rollover and rollout. Done.
See the result there:
http://www.steamandclean.com/Index_w_1.html
(Left side only)
Thank you for your help.
ggaarde
Maybe you are looking for
-
How can i use session in this senario
Hi i am using a jsp,in which i am collecting a string variable and using that variable in sql query to get one row displayed,(there are 2 pages one to pass some variable and another to collect it),now if i pass a variable again and query it to get th
-
AS2 to AS3 conversion... external array files
I'm at the tail end of writing an app in ActionScript2 for a client and was just told that it needs to be rewritten in ActionScript3. ((8-0 I'm pretty good at AS2, very new to AS3. So here's a question (the first of many, I'm afraid): I currently hav
-
Reg:Master Child Details - AdvancedTable
Team, I have a below requirement. 1.Dept (Master Table) 2.Emp (Child Table) I implemented above design in Advanced Table in Master-Child Fashion. Please suggest me how to implement the below requirement . 1. I should allow the user add rows in Child
-
How can I find out the IP address of my airport base station, model number A1143?
I see an airport ID and an ethernet ID, but neither seems to be the IP address? How do I find that out? Thanks for your help!
-
Mixdown output of Javasound mixer to file
I'm currently using Javasound to render multiple audio files to speakers using multiple SourceDataLines obtained from the same Mixer. This allows me to easily adjust relative volumes and pan settings of the audio files during playback. Now I'd like t