Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Quick Mask Ques



Im sure this is an easy one.. on the foofighters website http://www.foofighters.com When U click a button that flourish/swashy graphic looks like it is unwinding or growing rather. I would like to get the same effect.. Its obviously a mask of some sort. I know who to mask, im just figuring its a mask that is animated somehow. Anyone have an idea? Appreciate any insight into this. Peace

-R



Ultrashock Forums > Flash > Flash Professional
Posted on: 2005-08-02


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Quick Actionscript Ques.
Ok so im building a portfolio website and basically if you click on the art image it goes tothe next art image..I have it set up so the art images are buttons and when u click it, it is coded to goto next scene..On one scene however the art image is a movieclip (fading effect)...now how do you write the actionscript so if you click on the movieclip it goes to the next scene? I dk im right but...my guess is to put the MC within a button symbol? But I dk. Thanks guys.

<> QUICK QUES RE:Positioning After Dupe
Hi Im using a while loop and the dupliacteMovieClip() to dupe a certain number of my Mc's. I want to postion each duped Mc after its created with setProperty but I cant figure out how to do this within the same loop.
It complains in output box:

Symbol=playlist_Mc, Layer=Layer 2, Frame=1: Line 9: Expected a field name after '.' operator.setProperty(_root.playlist."box" + count, _y, vertpos);

Obviously I cant do the <"box" + count> bit, but how else can i do it?
(see code below)



Code:
onClipEvent(load){

var vertpos = 46;
var count = 0;
//create
while(count!=4)
{
duplicateMovieClip(_root.playlist.box, "box" + count, 1);
-->this doesnt work//setProperty(_root.playlist."box" + count, _y, vertpos);

trace(count);
count++;
}
//position
}


-Rich

Loading Clips Into Levels? -quick Ques
Hi, I need a quick bit of code or at least somebody to give me an idea on how to actually have a clip load itelf into a specific level depending on the value of a variable. I want to do this as my duplicateMovieClip() code is putting MC's on higher levels than other elements (other Mc's) in my movie, and one of these elements in perticular needs to be the 'highest'.

I tried using setProperty() as below but it doesnt work, flash complains (I gather it doesnt consider '_level' as a property?)

Code:

setProperty(need2BHighest_Mc, _level, highestLevel);




Any help appreciated

Quick Way To Make Mask From Photograph Of A Face?
I am trying to integrate crazytalk talking heads with flash mx. I can create a flash talking head fine, but now I want to put the head on a body that I will animate in flash. To do this, I need to create a mask over the frames created from the crazytalk avi export. See here:

http://www.reallusion.com/crazytalk/ct_flash_tut.asp

I have not really used masks much, and I have being working with both flash mx and paintshop pro (3.0) to try and create mask from the original photograph that was used to create the talking head. I just cannot seem to figure it out. Yes, I do realize the lasso tool works, but it seems imprecise. There must be a way to simply turn a photo into a mask, no?

thanks.

Couple Of Quick Questions. Mask And Button Problem.
Hi guys could someone please help me with the following…

I’m trying to learn how to do something via the free samples that cone packaged with flash mx.

If you take a look at the following link…

www.dital.co.uk/help

You will see the swf that I’m working on, the problem is that the movie starts only when the red button is pressed? I would like it to start as soon as it loads rather than pressing a button first.

This is the action script that is within the swf…

// ***Initial State Settings***
// Start bar mask and make it draggable when drag button is pressed
_root.onEnterFrame = function() {
play();
with (circle) {
if (dragging) {
_rotation += 0;
_y += (_root._ymouse-_y)*.3;
}
}
};
drag.onPress = function() {
// Set visibility of Masks and Maskees
scenery._visible = true;
circle._visible = true;
angel._visible = true;
stripes1._visible = true;
stripes2._visible = true;
// start dragging and move button indicator
dragging = true;
depressed._y = drag._y;
// setMask for each maskee
angel.setMask(circle);
scenery.setMask(null);
};

The second problem that I have is that the images appear to ripple when the mask is moved up and down? How can I stop this from happening? I have tried setting the alpha value to 99% on both of them, yet that doesn’t solve it?

Nav Ques
Hey guys I seem to remember a thread regarding how to make this kinda of NAV :

http://dopepope.com/ntps/Build_onff/


Anyone remember the thread or have a link on a tutorial to dup that kind of load jpg and have the window resize automatically...thanks all

_parent. Ques
im trying to load an external jpg. and the file name of this jpg is the name of the mc 2 levels above the command.
if u dont understand this is thi code im trying to use

Code:
x = _parent._parent._name;
loadMovieNum("x".jpg, 1);

i also tried putting th eparent crap in the load move itself like this

Code:
loadMovieNum("_parent._parent._name".jpg, 1);

and its still not working. any one able to give some advice

AttachMovie Ques
Hi -
I'm using the code below to bring mcs from the Library to the stage. It works fine until I tried to add the x,y at the end.
I thought there was a way to include _x and _y coordinates to the same statement as the attactMovie. Is there?

TIA the correct way to accomplish this.

jl







Attach Code

mc_btn2.btn2.onRelease = function():Void {

attachMovie("Q2WithGame","Q2Game",this.getNextHighestDepth,[_x=45,_y=110]);

};

Simple AS 1.0 Ques
AS 1.0
I have this code in a keyframe on the main timeline:

var score = 0;
if (score == 2500){trace("winner")}

Othe stage in the maintimeline i have a dynamic text field I labeled "score" in the var box. The instance name is "pts" but i wasnt sure if i needed an instance name anyway here. The score box works fine as far as keeping score but when it reaches 2500, I dont get my trace. What am I missing? Thanks

-Chris

Stupid Ques
hello new be ere (welsh) i got a prob wanderin if some1 could help im tryin to get a news page that updates ive got this off yahoo

this

so now tryin to use it but flash does ntlike it im prob doin some thing stupidly wrong now on the verge of not botherin

PLEASE HELP

Attaching MC Ques
hi.. anyone out there can give me a tutorial which teaches attaching a MC to another MC?? urgent..

Stupid Ques
hello new be ere (welsh) i got a prob wanderin if some1 could help im tryin to get a news page that updates ive got this off yahoo

this

so now tryin to use it but flash does ntlike it im prob doin some thing stupidly wrong now on the verge of not botherin

PLEASE HELP

Flash Ques
please can you explane me how can I make this file like on this site:
http://www.t-s-k-b.com .You go on this site and press SAKUBA WORKS and then button Painting/Drawing

I would like to make a picture gallery like in Painting/Drawing: So how I can make when the mause on the button to show small image of the picture and when I press the image to open the picture how is on the site(not in a new window)?
Please tell give me advice how could I make it!
thank you

Another Loading Ques
Is it possible to make the movie load let's say... only the 1st 2 frames of movie that has 8?

Button Ques
Ok real dumb ques..I have this animation..u can dl it from here: www.zeroxposur.com/test/nav.fla
So what I want to do is have 5 buttons fade in ..onto the bar as it finishes its animation..but I dont know how to do it.. Can anyone point me in the right direction. Thanks

Easy AS Ques.
ok so I have a flash doc..theres a an MC called target on mainstage that has the entite site in it (doing a fullscreen centered website)..now I have MC nav buttons on the stage (inside target). Inside one of the nav buttons I have a line of AS that says


ActionScript Code:
this.onRelease = function(){
    _root.target.loadMovie("bioresume.swf", "loader");
}


Now im not sure If im doing that right..but what i want to happen is; after u release the button, load the ext swf into the empty MC called "loader". But what seems to be happening is it loads the ext swf but everything else on the site disappears. See I originally had this as my AS cause i thought this made sense but it ends up not doing anything:


ActionScript Code:
this.onRelease = function(){
    loadMovie("bioresume.swf", "loader");
}


So if anyone knows what I did wrong, much appreciation. Heres the site link if u want a visual:

www.josephsernio.com/test

Easy As Ques.
Ok for some reason the end of this code doesnt work.. on release, i want it to take me to frame 2..and it wont...btw this a movie clip that has button properties through AS:



stop();

this.onEnterFrame = function(){

if(rewind == true){

prevFrame();

}

}

this.onRollOver = function(){

rewind = false;
play();

}

this.onRollOut = function(){

rewind = true;

}

this.onRelease = function(){
gotoAndStop(2);

}

MC Loader As Ques.
im working with the moviecliploader AS..so a button loads an ext SWF and also has a percentage loader .. so on my mainstage i have a loader mc (instance name "loader")and a holder mc (instance name "holder")..heres my AS on the main timeline:

var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function(target,loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}

mclL.onLoadInit = function() {
loader._visible = false;
loader.percent.text = "";
}

mcl.addListener(mclL);





Now i have another MC that houses about 20 or so buttons..so within the buttons MC i have say this for one of the buttons:

b4sub.onRelease = function() {
_root.loader._visible = true;
_root.mcl.loadClip("LevisCampaign.swf",holder);



And unfortunetly it doesnt to load the ext. swf..did I code the _root incorrectly?

Thanks for your help.

Fscommand Ques
Hi all, I was working with fscommand, when it struck me what FSCOMMAND stands for.

"Future Splash Command"

Can anybody confirm this, or am I mad, lol

Later

ORANGE900

LoadVariables Button Ques
Hello all. I have this code attached to a button calling up a different text file to a dynamic text field and it works fine, except I'm having to hit the button "twice" for it to work. Can't figure out why. Can someone enlighten me please?


code:

on (release) {
scrolltext = scrolltext1;
loadVariables ("scrolltext1.txt", scrolltext1);
}

Thanks in advance

Easy - Pong AI Ques.
Ok just to see if I could do it(never really got into game programming) I tried to make a pong game everything works so far but I have a problem with this:
Flash code:

PHP Code:



onClipEvent(enterFrame) {
if(_global.cspeed == 0) {
}else{
    if (this._y != _root.ball._y){
        if(_root.ball._y < this._y){
                this._y -= _global.cspeed;
        }else if(_root.ball._y > this._y){
                this._y += _global.cspeed;
        }else{
                this._y = this._y;
        }
    }
}
}




The problem is that instead of moving smoothly up the screen it looks like it s shaking up and down really quickly, but I would like it to be smooth.
Please help.

Movie Clip Ques
Hey i just started doing flash yesterday and i am doing a text fade

I made the motion tween and and everything and when i go to control and play everything is smooth but when i go to test movie nothing it just stays the same and doesnt fade :> plz help me

Movie Clip Ques
Hey i just started doing flash yesterday and i am doing a text fade

I made the motion tween and and everything and when i go to control and play everything is smooth but when i go to test movie nothing it just stays the same and doesnt fade :> plz help me

UI Text Input Ques.
Ok so Im making a form in flashmx2004..I drag out onto the stage the UI compnent textinput box..now I want to make this box multiline but it doesnt give me the option to do so. Do I have to make input boxes in a different way?

Motion Guide Ques
Hi all,
Is it possible to create a motion guide, so the object connected to the motion guide is always in the centre of the screen.

What I mean is, if we were trying to go from point A to point B
we could see the full journey of the object travelling along motion guide in the centre of the screen.

A-------->--------->-------->------B

The sort of thing I mean is included, but with no motion guide instead, the car remains in the centre of screen and is able to move around the track which in turns moves the the track below.

Thanks for your time, sorry for the broken language. Hope you can help.

--------------
FLA = MM2004

Pleez Help With Random Keyframe Ques.
I have four different movie clips on four different keyframes (2-5) the first key frame has a clip with an invisible button over it. WHat I would like to achieve is onMouseover of the button in the first frame......I would like the playhead to randomly gotoAndStop on of the other frames (2-5). To give the illusion of random movement. The on mouseout return to the first keyframe. any help greatly appreciated....either a .fla I can study or some AS would be great.

Probably Simple LoadMovie Ques. For JPEGs
I have a target MC that I want to load some JPG's into in my Flash Movie. The Target MC's dimensions are 650x500px. The JPG's are the same. When I attempt to load them, I can notice that something has changed in the tone of the movie clip (I had the target MC a grey color then that color disappears) but the JPG does not load.

I tried a smaller JPG, like 1/4 the size, and it loaded OK. ANyone have a suggestion?

Action Script Ref Code Ques
Hello i keep getting this this action script error when i attempt to render this swf could some one explain what this error message means ......i am not sure what the variables are looking for ....... the version is Flash 8 - the action script is below and the error message is below that.......

#include "lmc_tween.as"
//classes are loaded on this frame
var state:com.collection.State = new com.collection.State(this);
// start program
var main:com.collection.Main = new com.collection.Main(this)
//
bg_img.tween("_alpha",100,1,"linear",.5)
stop()

Error message (below)

**Error** Scene=Scene 1, layer=actions, frame=5:Line 1: Error opening include file lmc_tween.as: File not found.
#include "lmc_tween.as"

**Error** Scene=Scene 1, layer=actions, frame=5:Line 3: The class or interface 'com.collection.State' could not be loaded.
var state:com.collection.State = new com.collection.State(this);

**Error** Scene=Scene 1, layer=actions, frame=5:Line 5: The class or interface 'com.collection.Main' could not be loaded.
var main:com.collection.Main = new com.collection.Main(this)

Total ActionScript Errors: 3 Reported Errors: 3

Action Script Ref Code Ques 2.0
Hello please see this link it is a follow up to the thread i created before....i am stil trying to figure this error out when i generate the flash swf it works but not properly... below is a link to what the swf looks like there are buttons that should show and i get this message (shown below) in the flash error box that says (output) when i hit ctrl+enter to generate the swf.... any suggestions...?

b1,b2,lgText,redText,arrow,a:link,a:hover
yo

http://www.amjaydesign.com/mainCol.html


http://board.flashkit.com/board/showthread.php?t=744878

Simple Ques About Blue Border Box
I'm using flash 8. When you draw something or import a picture flash 8 puts the blue border box around it. Well mine is gone. If I draw something and click on it it is a broken shape. How do I get the blue border box back?thanks

Html Code Inside Flash Ques
I have a client who wants me too put some html inside the flash actionscript. He's not sure it will work and I'm not sure if it's possible or how to do it. Here's the code any suggestions thanks

<form action="/gift/save/1234" enctype="multipart/form-data"
method="post">
<input name="file" type="file" />
</form>

AS3: Mask Within A Mask (or How To Use A Shape With A Hole In It As A Mask)
Hi guys,

I've been stuck on this AS 3 masking problem for days now. I'm sure there's a simple solution to my problem but it's proving to be a pain.

I have a movieclip that contains some drawings, bitmap, etc. on top of that I am drawing a yellow rectangle with a hole in it using ActionScript:




What I want to achieve is to mask the movieclip container using the yellow rectangle, but I want the hole in the middle to not show the drawings and line:




However what I am actually getting is the yellow rectangle is masking the movieclip, but is ignoring the hole within it:




This is the AS3 code that I've written to get the above effect (with 'maskee' being the movieclip that contains the drawings):


Code:
function drawRectMask(p_sprite:Sprite) : void {
p_sprite.graphics.beginFill(0xf0ff00);
p_sprite.graphics.drawRect(100,100,300, 300);
p_sprite.graphics.moveTo(100,200);
p_sprite.graphics.drawRect(150,150,100, 100);
p_sprite.graphics.endFill();
}

var spr:Sprite = new Sprite();
drawRectMask(spr);
addChild(spr);

maskee.mask = spr ;

I'm at wits end. Any help on this would be greatly appreciated.

Quick Question - Need Quick Answer - Load Movie
If I load an swf movie into one mc named "mc1". and then I want to load the same swf movie into another mc "mc2", will the swf need to load again into mc2 or will it already be catched.

I am assuming yes ...

Thanks,
DRB
[Edited by funner on 06-14-2001 at 09:53 PM]

Client Request Feathered Mask Or Soften Fill Edges Mask
What application do you use to mock up flash designs?Photoshop7

Best Way To Script A Quick-slow-quick Movement ?
Hi

I'd like to make a clip move across the stage like this :

- first it moves fast and then decelerates to a slow crawl for a short while then re-accelerates and moves fast to the end of its movement

what's the best way to do this ?

is it better to use mx transitions or intervals or another system ?

thanks

How To Mask Duplicated Movie Clips With A Single Mask?
I have created 11 movie clips 17px in a vertical column.

I have used this code to duplicate them.


ActionScript Code:
for(i=0; i <10; i++){
    newName = "softwareBar" + i;
    duplicateMovieClip("softwareBar", newName, i);
    softwareBar._y += 17;
}

I have a mask that I need to use to cover all the clips, however when I use setmask it only covers the last looped item in the duplicateMovieClip code.

How would I go about masking all the duplicated clips with a single mask?


Not sure if this info is pertinent but once they are masked I will then be animating each duplicated bar separate using this function.


ActionScript Code:
loadBar = function(clipName, amount){
    clipName.onEnterFrame = function(){
        if(clipName._width<amount){
            clipName._width +=speed * speedDim;
        }
    }
}

Thanks
DDC

Mask Over Mask Leaving Pasrts Covered From Overlap.
Hello,

I have a complex image that I would like to mask with an animated mask.

I am using a movie clip with a couple of layers that "reveal" parts of the complex image at a time.
The problem is, when part of a mask overlaps another, it leaves that part of the complex image covered.

Is there a way around this?

Thanks in advance.

Quick Quick....masking Problelm
Hi everyone
Um facing a problem regarding masking
well, i know how to mask texts with objects that I CREATE like a circle, for example the masked layer has text & the mask layer has a circle that I DRAW USING FLASH...this if fine...it works well
My problem is my masking does not work when i the mask layer has an object that is imported, for example an imported heart instead of a drawn circle....it does not work at all....!!!!
What's the problem?? & How could i solve it??
Any help is highly appreciated
thanks in advance

Quick Question = Quick Answer
I have a movie with an animation on one layer. Just a motion tween over 5 frames. In this movie I also want to target a blank clip and have another .swf load into that clip.

I'm putting the loadmovie script on a blank frame in my actions layer (frame 1) telling the .swf to load into the blank clip.

nothings happening? any fixes?

Drag A Mask, With Out Draging The MC Under That I Want To Mask Over?
Hello,

I have a mask and MC button which I am draging. I works fine other the fact the the whole MC movies even the MC inwhich I want to mask over: "BigYears" .

I have tryed to use:
onClipEvent (enterFrame) {
setProperty (this.BigYears, _x, -this._x);
setProperty (this.BigYears, _y, -this._y);
}

Then "BigYears" is not viewable under the mask.

INVERSED Mask? REVERSE Mask?
Okay, here's my dilemma.

I want a small circle to grow to reveal the contents within the circle, and THEN (and this is the hard part) I want another circle to grow from the same starting point that makes shows THROUGH to what's behind the circle.

So

I already have the first part done, where there's the contents on one layer, and a masked circle that tweens to reveal the contents.

BUT, the second part has to reveal the INVERSE of the contents... I don't really know HOW to explain this other than saying I want to punch a hole THROUGH the contents.

Any ideas?

HELP I Need A Mask Guru To Help Me With A Mask Problem
Hi,

I've got two mc's that are suppose to be playing simultaneously. Both duplicate mc's are called "Cloud Motion Tween" and there is one on the main timeline that has a brightness of -55 and the other duplicate of that mc is inside a mask in a mc called "Nav Bar (About)". Both mc's are suppose to be in sync.

Now every time I rollover the "Nav Hit Panel" button the mc inside the mask starts all over again and stuffs up the synchronization of the two mc's.

I have attached the fla file. You'll see what I mean.

Thank you so much for you valued time and effort. You are a true champ!!! (Whoever you are)

Blastbum

HELP I Need A Mask Guru To Help Me With A Mask Problem
Hi,

I've got two mc's that are suppose to be playing simultaneously. Both duplicate mc's are called "Cloud Motion Tween" and there is one on the main timeline that has a brightness of -55 and the other duplicate of that mc is inside a mask in a mc called "Nav Bar (About)". Both mc's are suppose to be in sync.

Now every time I rollover the "Nav Hit Panel" button the mc inside the mask starts all over again and stuffs up the synchronization of the two mc's.

I have attached the fla file. You'll see what I mean.

Thank you so much for you valued time and effort. You are a true champ!!! (Whoever you are)

Blastbum

Dynamic Mask Doesn't Mask...
I have a local radar image that I am loading into a holder movie clip and trying to mask but it doesn't work. Both the image and the mask are being displayed.

The holder movie clip is 'dopplerRad_mc' and I am attaching from the library.
The clip the image is loaded into is 'dopplerHolder_mc' and is dynamically created.
I then attach a mask movie clip from the library, 'imageMask1'.

My code is below. Any idea what I am missing?

var dopplerRad_mc:MovieClip = attachMovie("doppler_mc","dopplerRad_mc", getNextHighestDepth());
var doppler_mc:MovieClip = dopplerRad_mc.createEmptyMovieClip("dopplerHolder_ mc", dopplerRad_mc.getNextHighestDepth());
var mclListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mclListener);
mcLoader.loadClip(doppler, dopplerRad_mc.dopplerHolder_mc,1);
dopplerRad_mc.attachMovie("imageMask","imageMask1" ,2);
dopplerRad_mc.dopplerHolder_mc.setMask(dopplerRad_ mc.imageMask1);

Attaching Mask Onto Mask Layer
Hi,

I've been trying to attach a movieclip from the library, to the Mask layer using actionscript so that the mask_mc can hide a line of text as it moves.

But the movieclip is not getting attached to the mask layer.

Please help....

Gradient Mask Using JPEG As Mask
Hi there. I am trying to find a way to use loaded greyscale JPEGs to form gradient masks in Flash. Basically I want to be able to create an opacity mask just like you do in Illustrator or Photoshop, where it's the darkness of each pixel that determines opacity, rather than the alpha value.

It seems that in Flash the only way to create a gradient mask is to use a mask that has varying alpha values. I suppose that means I could use PNG files to form my mask instead, but I really need to be able to do it with JPEGs.

Perhaps there is a BitmapData filter that can convert shades of grey to degrees of alpha?

Thanks :)

Lara.

Can The Mask, Mask Color To Create B/w
Is it possible for a mask to mask color? I would like my mask to mask the color and only show B/W in the output.

Project Opp - Quick $ Quick Job
I have a project that requires a rotating menu. It needs to be done today. If anyone is interested they should reply with their email address or send an email to eerkel @ hotmail .com.

I will then send a Fireworks file that shows clearly how the menu should operate.

Thanks

Mask To Reveal Preloader And Mask To Hide Preloader Upon Load.
Hi all, can anyone help me in regard to a mask over a preloader of elements.

Ok I have a preloader all set up, this includes a logo, a notice, i.e please wait loading in progresss, a load bar, and a percentage reading.

All I want is a simple wipe effect using a mask, which is very easy to achieve, I have done so already. But I am unsure in how to hide all the preloader elements, and how to use the wipe to reveal all elements on the stage / timeline. I have the wipe setup using two layers, and decided to place these inside a movie clip and place the movie clip on the timeline. But now I am stuck in what to do next.

As when everything is loaded I want the wipe to hide the preloader and move onto the design aspects.

Does anyone have an idea how to achieve this?

Copyright © 2005-08 www.BigResource.com, All rights reserved