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








Indestructable Movie Clip


try as i might i can't get this movie clip to remove. i've tried commanding it to remove from the main timeline and nothing happened. now i've attached this code to the clip itself and it still won't go. it works fine for other clips in the movie:

onClipEvent (enterFrame) {

if (this._x<50) {
this.removeMovieClip();
}
if (this._x>750) {
this.removeMovieClip();
}
if (this._y<50) {
this.removeMovieClip();
}
if (this._y>350) {
this.removeMovieClip();
}
}

i've done this lots of time before and it worked fine. there must be something weird about the clip.




KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 01-18-2003, 03:10 PM


View Complete Forum Thread with Replies

Sponsored Links:

Indestructable Volume Bar Needle
I'm using a volume bar from the component library. When I load a .flv it adds the volume bar needle. When I remove my custom player...the volume bar needle remains. It continually adds needles each time the player loads a .flv. The following is what I've tried to get rid of this needle:


my_volume.gotoAndStop("1");
removeMovieClip(this.my_volume.volneedle);
this.my_volume.volneedle._visible = false;

None of which has worked. Any help would be appreciated. Thank you.

View Replies !    View Related
Making A Movie Clip In A Movie Clip Go To The Next Frame Of The Original Movie Clip
I have a movie clip (for simplicity I'll call it movie_a) in movie_a I have another movie clip movie_b.

in movie_a i have a button that when pressed makes movie_b play (it has a stop frame every once in a while so the button acts as a "next" button)

I want it so that when i get to the last frame of movie_b and press the button, it will go to the next frame of movie_a

I hope that doesn't confuse u and u can help me solve this problem, as i am stumped and I've tried everything I could think of (which isn't that much as I'm not too good with actionscript)

thnx

View Replies !    View Related
Targeting A Frame Label In A Movie Clip From A Button In A Separate Movie Clip.
I have two separate movie clips placed on a timeline-MovieclipA and MovieclipB. I have a button in MovieclipB clip that wants to target a frame label located in the MovieclipA timeline. Can someone help me?

View Replies !    View Related
Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.

in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:

Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}

thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:

Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}


The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.

the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.

thanks!

View Replies !    View Related
Mouse Rollover On One Movie Clip Increase Decrease Alpha Of Another Movie Clip..
So I really haven't messed with Actionscript much for a couple years and here is my issue.

I have several movieclips I put together that will eventually be a menu for my website. When you roll over a menu option (movieclip) I am trying to get another movie clip to fade in giving the description of the menu item.

For example - when you roll your mouse over the 'Live Chat' option a brief text description would appear telling you what the live chat is about. This description is a seperate movie clip appearing away from the original menu.

I have made the movieclips for the menu and the movie clips for the descriptions. I tried this action on the menu option to get the description to fade in:


Code:
onClipEvent (load) {
this._parent.mc_text_discussionBoard._alpha = 0;
}
onClipEvent (enterFrame) {
this.onRollOver = function() {
if (this._parent.mc_text_discussionBoard._alpha<100) {
this._parent.mc_text_discussionBoard._alpha += 5;
}
};
}
But the alpha only increases on the description (mc_text_discussionBoard) by 5 when I keep rolling my move over and out and over again. It makes sense why it does that, but I'm not exaclty sure how to get it to continually increase the alpha by 5.

any help would be great and I am anxiously waiting to get this solved!
Kevin

View Replies !    View Related
Code 4 MovieClip Button To Load A Movie Clip Into A Placeholder Movie Clip.
Yeah that title sounds a little confusing...so i will explain:

Is there a way to tell a "movie clip button" that once it is clicked on to load a "movie clip" into a "movie clip placeholder". So instead of loading an external swf into the placeholder, it will be a movie clip from within the same library. Putting every single custom clip on the timeline would take a while, so that is why I thought it would be easier like this, and the other movie clips are not that large that I want to load into it so there is no need for external swfs, trying to keep it clean. Here is the code along the lines I am trying to go for.

__________________________________________

this.profile_mc.onRelease = function() {
placeholder_mc.loadMovie("profileSection_mc","plac eholder_mc","_root.content");
}
__________________________________________

- "profile_mc is the button I am trying to activate to load the
"profileSection_mc" into the "placeholder_mc". but so far no good.

- the movie clips are within the same library, not on the timeline or external library.

- Is this possible?

View Replies !    View Related
Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.

So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)

But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip

thaks
Vakarm

View Replies !    View Related
A Movie Clip Inside A 2nd Movie Clip Colliding With 4th Movie Clip That's In The 3rd
sorry if that sounds a bit odd, this is really a simple problem that i can't seem to nail.

Can u please give the the hittest that shows when a movie clip collides with another regardless of their level.

View Replies !    View Related
How To 'stop' A Movie Clip Within A Movie Clip Within A Movie Clip Loop
I've done searches, laughed, cried, and punched holes through the wall, but I can't figure this out.

I'm in Flash MX (pro) and I have a MovieClip on my main timeline (frame 1). Inside that clip is another animation (the static animation scrolling across the screen), and another inside of it of the static animation (6 characters on a train each animated uniquely).

Confused yet? Ha! OK, so I just want the damned animation on the main timeline to run once and then stop (or to 270 frames). I've tried:

myMovieClip.stop()

to no avail. I've tried attaching the script to the movie clip itself, and also to the frame.

Any suggestions?

View Replies !    View Related
Making A Draggable Movie Clip Control The Location Of Another Movie Clip
http://www.kineticz.net/jba/residental.jpg that is a picture of what i am trying to do. the white bar at the bottom is the draggable movie clip and the group of 3 pictures right above that is the movie clip that i am trying to control w/ the draggable clip. I am having trouble writing a script that will do this. any help you can give will be much appreciated.

View Replies !    View Related
When I Click On A Movie Clip I Need The Movie Clip To Goto And Play Frame 2
i have created a movieclip and draged it on to the stage i tryed used on mouse down then tell target goto and play but that ment when ever the mouse clicked any where, how do i tell in to only play when i click on the movieclip ?

View Replies !    View Related
How Can I Control A Movie Clip Which Was Loaded In To A Empty Movie Clip On Level 0
how can i control a movie clip which was loaded in to a empty movie clip on level 0 the name of the movie is 'imagemc.swf' and 'imagemc' for the empty movie clip on level 0. the movie doesn't have a movieclip name, how am i going to tell target the movie?

View Replies !    View Related
How To Manipulate A Movie Clip On The Main Stage From Inside Another Movie Clip
I have a button inside a movie clip, and I want it to work that when you hit the button, a different movie clip will go to frame 5. anyone know how to help? I think it has something to do with which level it is on, but I can't manage to figure out anything else.

View Replies !    View Related
A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?

I have been trying to do it for the last few days for a site I am working on.

I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.

What I have right now is on the button in my Menu Bar Movie Clip:

on (release) {
gotoAndPlay(285);
}

Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:

gotoAndPlay("Contact", 1);

Which is the Scene for the "Contact Us" Scene named "Contact"

One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.

Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.

If someone has a solution, it would be greatly appreciated.

Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.

Thanks in advance.

View Replies !    View Related
On Mouseover Show Movie Clip, On Mouseout Close Movie Clip *HELP*
Basically what I am trying to do is this...

I have a movie clip that is a name. When you put your mouseover the name I want another movie clip to display to the right of the name. This clip has a photo and bio of the person.

The photo and bio have an animation that fades it in and an animation to fade it out. I have 5 frames for the fade in, then stop frame, then 5 frames for the fade out.

What actionscript do I need to use to make that second movie clip load when a user mousesover the name (first movie clip) and to make the second half of the second movie clip play when the user removes their mouse from name (first movie clip).

NOTE: I tried using loadMovie and unLoad movie but I couldn't do it loading another swf. The reason being this is already an swf loaded inside a main movie. I guess you can't load an swf inside an swf that's already loaded inside an swf. I hope this all makes sense!

I appreicate all the help!

Thanks a lot!

View Replies !    View Related
Create A Movie Clip As A Button To Jump To Half Way Through Another Movie Clip?
hi guys and gals,
i am wondering if i can make a movie clip (as a link for a website) jump to half way through another movieclip...
thanks in advance

View Replies !    View Related
Create An Empty Movie Clip Inside An Existing Movie Clip?
I'm making sort of a tabbed navigation scheme by reading the data for each tab in from an XML file. What I'm wondering is if it's possible to use createEmptyMovieClip() to make a new empty movie clip inside a movie clip that already exists on the stage.

Using
ActionScript Code:
m_anchor.loadMovie(bg_image);
works as I would expect. bg_image is just the relative path to an image file, and m_anchor is a movieclip already on the stage. However, doing a similar thing:
ActionScript Code:
m_anchor.createEmptyMovieClip("textbox", this.getNextHighestDepth());
and then drawing a shape (a rounded rectangle, which I then want to put text on top of) doesn't work. It works if I just say "this.createEmptyMovieClip" instead of attempting to create it inside the m_anchor clip, but if I do that, the "textbox" is created at the root level and I can't unload it along with everything else in the "m_anchor" clip. Is it possible to create a new empty movie clip inside of one that is already on the stage?

Thanks!

View Replies !    View Related
Load An Internal Movie Clip To An Empty Movie Clip On The Stage
Can any of you shed some light as to why this is not working:

on (release) {
emptyMC.attachMovie("mrimc","instance1",this.getNe xtHighestDepth());
}

what I want to have happen is when the user clicks a button it loads the mirmc into emptyMC on the stage.

I have double checked that my empty movie clip does indeed have an instance name of emptyMC and that the movie I want to load into does in fact have the name mrimc in the library. Any ideas?

View Replies !    View Related
Problem Getting Movie Clip Inside Of Movie Clip To Face Mouse
I used the code below to make a movie clip face the mouse, it works when I use it on a movie clip that's not embedded in another movie clip, but when I used it on an embedded movie clip, it's axis seems to change.









Attach Code

var stickGun:MovieClip = this.stick_holder.stickGun_mc;
//stick_holder.stick_mc.stickGun_mc

stage.addEventListener(Event.ENTER_FRAME, onMove);
//stick_holder.stick_mc.stickGun_mc.addEventListener(MouseEvent.MOUSE_MOVE, onMove);

function onMove(event:Event):void {
// get the radian value of the angle between the clip and the mouse...
var myRadians:Number = Math.atan2(mouseY - stickGun.y, mouseX - stickGun.x);
// convert it to degrees...
var myDegrees:Number = Math.round((myRadians * 180 / Math.PI));
// get the horizontal and vertical distance between the clip and the mouse...
// rotate the clip toward the mouse...
stickGun.rotation = myDegrees;
}

View Replies !    View Related
Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?

View Replies !    View Related
How Can I A Movie Clip Splash Prior To Attaching The Choose Movie Clip..Help
I have a presentation which I would like to publish on CD. What I want is to have movies attached to the container_mc on the stage upon clicking the desired navigation buttone. But before movie gets attached, I would like to have a logo_mc animation (from the library) to play itself before playing the selected clip.

I think I need to write up a function which will call the animation splash clip prior to attaching the clicked movie.

Appreaciate all the help.

Thanks so much.

View Replies !    View Related
Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").

What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)

I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having

on(release) {
gotoAndPlay("scene 5", 1);
}

this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.


Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you

View Replies !    View Related
Loading External Movie Clip With A Button Inside Another Movie Clip Help
Hi,

I am working on a scrolling thumbnail movie clip, that when you click on the thumbnail button inside the movie clip it will load an external movie clip. I have an empty movie clip on the main stage, and have been trying all sorts of code, but for some reason it doesn't like that I am inside a movie clip using buttons. It can't seem to find the external swf.

I have tried:

on (release) {
loadMovie (ithink.swf, "loader");

and

on (release) }
if (firstTime == true) {
loadMovie("ithink.swf", _root.loader);
firstTime = false;
} else {
_root.clicked = "ithink.swf";
_root.loader.gotoAndPlay("goback");
}
}

and so far nothing, for some reaosn when I click on a button outside of the movie clip with the above code it loads... and than the other works too, but if I click on the buttons inside the scolling movie clip first they won't work.

Any suggests or ideas!!?

I would really appreciate it... I am beyond frusterated!!

View Replies !    View Related
Unload A Movie Clip From The Movie Clip That Was Targeted From The Root Timeline
I have on the main timeline, a button that when it's pushed loads an external .swf into a blank MC. I need to be able to close the MC within the mc. I know I can do this is loadMovieNum and use levels, but then I can't target where I need it to load in...is there a way to do this?

Thanks
Stacy

View Replies !    View Related
Using A Movie Clip Inside A Movie Clip To Start A Frame Of An MC Inside A Movie Clip
Situation:
I have a movie clip inside a movie clip with a button inside of it.

This button on release goes to a different movie clip(svideo) in a different frame on the maintime. This movie clip has a movie clip(portfolio) inside of it.
Okay: I use an absolute path on the aforementioned button
on release
_root.svideo.portfolio.gotoAndPlay(60);

But, for some reason Flash won't go to frame 60 of the portfolio movie clip that is inside of the svideo.

I have tried numerous variations on reaching frame 60 of portfolio. Like going to the maintime line and going to the portfolio MC. Also, portfolio and svideo are the instance names and not the name of the actual movie clip.

If anybody could help, I would appreciate it. Thanks.

View Replies !    View Related
How Do You Make A Button Able To Jump From Movie Clip To Movie Clip
how do you make a button able to jump from movie clip to movie clip

I have 5 movies i the same scene , I need the buttons to jump from movie to movie ... how do I code this in the acrions ?

View Replies !    View Related
A Button Inside A Movie Clip To Move Another Movie Clip
I'm building a web page and I have a button that I need to make two movie clips play. The button is inside one movie clip and in addition to it playing I want it to make another movie clip play. It doesn't seem to recognize the movie clip target names. Any help as to how this can be done would be much appriciated.

Thanx

View Replies !    View Related
Movie Clip Tween From A Random Point To Another Movie Clip?
ok...
on a website I am trying to make...i have a rotating E (lowercase)

it flips around and does all kindsa crap

but when a person clicks on a button, i want it to tween from whatever frame it is on, to where all 3 of them line up and do a little flashy type thing

ei:
e#1 - upside down and backwards
e#2 - sideways and rotating on the y axis
e#3 - rotating on the x axis

now i want all of these to tween from the point they are at to a specific order....so they are all flat (ei: they look like this "e")

how the heck do i do this?!? i know i have seen it somewhere!!

View Replies !    View Related
Duplicate Movie Clip / Remove Movie Clip Woes
I have built a an MC that will Duplicate an MC it does this a specified 114 times.

Once all of the MCs are in the Movie I want to pick a movie clip and remove it randomly. I am doing this now but It takes to long because it is looking for numbers that are no longer existant instead of just going for the ones that are already there.

I was talking to one of the programmers at my work and he was telling me to build an array that adds in a each duplicate mc name

for instance
amount = 1
I have 114 boxes each box as it is duplicated gets renamed box + amount
amount + 1
until it gets to 114
then it looks for each box1 - box 114 and gets rid of each box 1 - 114

But how could I get it so I remove lets say box 84 it wont look for 84 for any more

I was thinking

I dynamically rename every mc > 85 to name amount - 1

and have it randomly look for 113 the next time around and so on til it finally gets to zero...

Any one have any suggestions for me?

Or if you can point me in a direction that would be good as well

Thanks a bunch

View Replies !    View Related
Target Host Movie Clip From Loaded Movie Clip.
Hi all.

I have a movie clip loaded into my main movie. This movie clip is the INTRO of the website. What want is that when this INTRO ends it should tell the main movie to go to the next scene of the movie. I tried _parent.nextScene() but it is not working. Please help me as I need it badly and urgently.

Thanks.

Zee

P.S: Btw this is my first ever post on FlashKit so I hope to have a great time here!

View Replies !    View Related
Making A Movie Clip Stop When Colliding With Another Movie Clip....
OK I have a stage are which is surrounded by walls on all four sides, (wall_left , wall_right , wall_top , and wall_bottom.) Also, I have a character which is named "Omekk" (Some fag name I made up.) I can control 'omekk' with the keys, but I don't quite understand the hitTest function. I am using flash MX. On the left wall I put the code


Code:
onClipEvent (load) {
Omekk.hitTest(wall_left);
}
and the top wall I put:


Code:
onClipEvent (load) {
Omekk.hitTest(wall_top);
}
...and so on and so forth. The problem is, when I test the movie, the character STILL goes through the wall... What's up with that? Are there more actions that I have to put on the wall? Actions on Omekk himself? Error in the syntax? What is it??

If someone helps, I'd be SOOOOO happy. I feel like such a moron because I can NEVER understand this. I'm about to just give up flash if I don't get it... I suck and I can never get the hang of it.

Sorry,
Josh

View Replies !    View Related
A Little Confused, Navigation Movie Clip Works Within One Movie Clip But Not Another.
I have a movie clip called “BottomMenuMC.” This movie clip has three button, “Home”, “Contact Me”, and “Quit”. The “Home” button is giving me the problems. The home instance has the following code:

on (release) {
_root.MainIntroMC.gotoAndPlay("Quote1");
}

When I place “BottomMenuMC with in the Movie Clip “Design” it works great. When I do the same thing, placing it in another movie clip, “Animation” it does not work at all.

Both “Design” and “Animation” are movie clips that run off the main timeline.

Any Suggestions why this would work in one and not the other? I am using Flash MX 2004.

And are any of you finding Flash MX 2004 buggy?

View Replies !    View Related
Controlling A Movie Clip From A Button Inside Another Movie Clip.
I'm confusing myself just typing this.

I'm working on an interactive map. The map itself is a MC inside a container, but also contains all the buttons as well. On my main stage(scene 1 and menu) is a window(MC) that will show info and photo of building. Now if I create a button on the main stage I can control the movieclip(images) easily. But when I use a button from inside map(MC) it doesn't seem to recognize the (images.gotoAndStop(frame))command.

I'm just not sure what to put in order to be able to control the MC's timeline from within that map movieclip.

Sorry if this is confusing. Of course at the same time it might be a simple solution for most people here as well. At least that is what I'm hoping anyways.

View Replies !    View Related
Controlling The Playhead In A Movie Clip Via Buttons In Another Movie Clip
Alright, first off, I've tried literally everything I can think of, and all of the scripting looks perfect (from what I understand), so I can't think of what could possibly be wrong with the script.

Here's some information upfront about where these movie clips are located:

Main Timeline > tv_mc
Main Timeline > menu > menu2 (buttons controlling tv_mc are located here)

(Note: menu2 is a graphic, not a movie clip. It was only made so that I could move the menu itself without tweening several layers.)

Here's what I want to accomplish:
I want the buttons inside of menu2 to control the playhead in tv_mc, a movie clip. The first 25 frames of tv_mc are just the "stage" moving into view so that the information can be displayed.

There are five buttons in menu2 containing the following script:


Code:
on (release, releaseOutside) {
if (!mainwindow) {
_level0.tv_mc.gotoAndPlay(1);
mainwindow=1;
_level0.tv_mc.set(framenext, bio);
} else if (mainwindow==1) {
_level0.tv_mc.gotoAndStop(bio);
}
}


"bio" is the name of the frame in tv_mc. Basically, what I want this to do is check and see if the "stage" is already viewable, and if it isn't, to display the stage and then display the information as well, which is the purpose of storing the frame name in "framenext".

tv_mc also has this code:

Code:
if (!framenext) {
stop();
} else {
gotoAndStop(framenext);
}






At the moment, the menu buttons work to display tv_mc, but wont move the playhead past 25. I'm guessing that the "framenext" variable is somehow not getting any information, or not getting any information across to tv_mc from menu2.

I'm really effing lost at this point. Any help at all? I'd post the .fla, but the size is pretty big. :T

View Replies !    View Related
Control A Movie Clip From A Drag N Drop Movie Clip
I need a script that allows the user to control the timeline of a MC from a drag-able MC.

Basically I want a MC that drags is constrained to the x position with a limited movement of say 100 Pixels, as the drag MC is moved along it controls the play position of a tween in a different MC.
So when you push the Drag MC back and forth it moves the second MC play position back and forth.

a great example of this is at http://fable.lionhead.com/fable.html
on the pop up book parts

View Replies !    View Related
Making Another Movie Clip Close From Inside A Movie Clip
I want to make another movie clip close that is open when this other movie clip comes up. I put on the first frame of this actionscript:

_root.detail.gotoAndPlay(19);

This works, but only if the other clip is already open. If not it just shows the other clip closing even though it isn't open. Is there a way to do something like...

If _root.detail is on frame 8 then _root.detail.gotoAndPlay(19);

Obviously thats not the action script but it's what im trying to express.

"detail" is the movie clip property name of the clip I'm trying to close.

Thanks for your help!

View Replies !    View Related
Creating Empty Movie Clip Inside Movie Clip
Hi,
i'm using this script to make an empty movie clip
_root.createEmptyMovieClip

but i am trying to make this empty clip from inside a movie clip. Not from the root time line. HOw do i go about this?

View Replies !    View Related
Assigning Function To Movie Clip, Inside Of Movie Clip Help
good morning all,
I have a quick question which has been bugging me this morning. Basically I am trying to assign a function to a emtpy movie clip, which loads a external
.swf, which it self is inside a large, emtpy movie clip.


Code:
//---------------------------------START FUNCTION---------------------------------
//loading of "product_window" - main banner of the different products
function product_window_load() {
_root.createEmptyMovieClip("product_section", this.getNextHighestDepth());
// this creates the movie clip in which contains the seperate "product_window"'s


//---------------------------------START LOOP---------------------------------
for (i=1;i<=_root.product_window_No;i++){
//function to call up loading
_root.product_window_name = "colour"+i+".swf"
//this defines the name of ".swf" of the "product_window" being loaded
_root.product_window = "_root.product_window"+_root.product_window_id;
//defines name of "product_window"
_root.product_section.createEmptyMovieClip(_root.product_window, i);
//creates blank movie clip which will subsequently load the individual product .swf's
_root.product_section[_root.product_window].loadMovie(_root.product_window_name);
//loads the ".swf" file, the name is determined by the variable "_root.product_window_name"

//----------------------START FUNCTION----------------------
_root.product_section[_root.product_window].onRollOver = function () {
trace ("onRollOver called " + _root.product_window);
};
//----------------------END FUNCTION----------------------
_root.product_window_id ++ ;
//increases the value of "product_window" by 1

Code:
_root.product_section[_root.product_window].onRollOver = function () {
trace ("onRollOver called " + _root.product_window);
};
does not work
but if i just target the the main empty movie clip which contains all the other ones, it works fine.

Code:
_root.product_section.onRollOver = function () {
trace ("onRollOver called " + _root.product_window);
};
I know i can proably get this to work using duplicate movie clip and cretaing a physicl movie clip on stage, but i was curious whether i can assing a function to a movie clip inside a movie clip

any help on this would be great
thanks
-smokey

ps. i know its not the smoothest coding, but its been like 3-4 years since ive been using flash

View Replies !    View Related
Link From One Movie Clip To Specific Frame Within Another Movie Clip
Hello,
I've been working on this problem on and off for weeks now, and am hoping I could get some assistance, as it is driving me batty and my deadline is quickly approaching. Here is the basic setup:

I am creating a Flash webpage. I created a Flash movie with 6 frames, with a movie clip on each frame, each movie clip being a single page of the website. What I would like to do is have button within one movie clip (say a button in the movie "contact" which is frame 5 of the main movie) link to a frame within another movie clip (say frame 3 called "project3" within the movieclip "portfolio" which is frame 2 of the main movie).

With all my efforts, I am only able to get the button to go to and play the called movie clip at frame 1, and no other frame number or label.

I have tried codes such as the following:

on (release){
this._parent.portfolio.gotoAndStop("project3");
}

on (release){
_root.portfolio.gotoAndStop("project3");
}

... and countless other options, but nothing seems to work. I would greatly appreciate any assistance with this matter. For the record, I admittedly do not know much Flash and am learning most of this on my own with a small base knowledge from a design class I took years ago using UltraDelv! Please let me know if I need to go into further detail.

Cheers!

View Replies !    View Related
[CS3.AS2] Button In A Movie Clip Link To Another Movie Clip And Play
what im doing is that making a button in a movie clip link to another movie and play/stop certain parts of that clip

lets say that there are 4 buttons are in movieA, and the other clip is called movieB

when the user clicks button1 in movieA, movieB will play from frame 1 to 5 and stop.
when user clicks button2 in movieA, movieB will play from frame 5 to 10.
and so on

so far my code for button1 is:

on (release){
this._parent.movieB.gotoAndStop(5);
}

on (release){
_root.movieB.gotoAndStop(5);
}

button2:

on (release){
this._parent.movieB.gotoAndStop(10);
}

on (release){
_root.movieB.gotoAndStop(10);
}

with this code, it just jumps to the designated frame.
what i want is to have it play from current frame to a designated frame

can anyone shed some light on this?

View Replies !    View Related
Remove Movie Clip And Attach Random Movie Clip
Hi: I am trying to create a mini game where there are pods of equations in which players must solve in order to make the pod disappear. Once a pod disappear a new one appears.

Attached is my .fla file so far- but I have been having trouble trying to remove movie clips once the player has solved the equation, and then attaching a random movie clip in the same location. I've been trying to use an if then statement but I'm not really sure? I also placed a removemovieclip at the end of a movieclip. I'm fairly new to actionscript.

So if anyone can help me with that I would really appreciate it. I am looking to finish this project in the next day or two!!

Thanks in advance.

View Replies !    View Related
Place Movie Clip Button Inside Movie Clip
Hi, I have searched the forum but cannot find exactly what I am looking for.
I have a movie clip of a map that I can zoom and drag and what I would like to do if possible is to have several other movie clips inside the first movie clip which when clicked go to and play at a given frame number on the timeline where a photo is displayed.

The 'several' movie clips will be small flashing red circles. Each one represents a place of interest and when clicked will display a photo of the place of interest.

View Replies !    View Related
Change A Movie Clip's Alpha By Clicking Another Movie Clip
Hello,

I have two movie clip instances on the stage, each belonging to a different class pakcage. Now I was hoping to realize a function that allows me to change the alpha of one movie clip when I click the other.

I tried to use static variables for both movie clips on the document class and leave the alpha changing statements in the movie clip classes. But I got the following error message:

ReferenceError: Error #1074: Illegal write to read-only property MyBtn2 on global. -- MyBtn2 is the class name of the button I was trying to change color.

Does anyone have a quick solution to this?

View Replies !    View Related
Talking To A Movie Clip On Main Stage From Other Movie Clip
This is something I have been struggling to understand for awhile.

On my main stage, I have created a couple of movie clips for the purpose of loading in content (other MCs) at a later point. I'm doing this like so:


Code:
// Define a new MovieClip to display ribbon
var ribbonMC:MovieClip = new MovieClip();
addChild(ribbonMC);
Then I have another MC that is housing a datagrid. When the user clicks on one of those rows, it's supposed to load up a new movie clip into my ribbonMC movie clip. That code is this:


Code:
function handleClick (ev:ListEvent) {
// If the item has an 'panel' attribute

if (ev.item.panel != null) {
// Use the 'panel' attribute to get a movie clip by that name from the library
var myClip:Class = getDefinitionByName(ev.item.panel) as Class;
removeChild(ribbonMC);
ribbonMC = new myClip() as MovieClip;
// Position the new movie clip
ribbonMC.x = 200;
ribbonMC.y = 20;
// Add the new movie clip to the display list
addChild(ribbonMC);
}
}
But of course, ribbonMC is not in this movie clip, so I get an error:
1120: Access of undefined property ribbonMC.

I've searched on how to access stuff like this but I am totally confused. What is the proper way to access ribbonMC on the main stage from inside this other movie clip?

View Replies !    View Related
Target Empty Movie Clip And Movie Clip Frame
I'm loading a random movie, reading in Shared Object data.
If the Loaded movie has been viewed playing it's 2nd frame.
How can I load the movie into an empty movie clip and target its 2nd frame?
Is it just a syntax issue?


Code:
filename = ["flashMovieA.swf", "flashMovieB.swf"];
path = "flash/";
i = filename.length;
k = Math.floor(Math.random()*i);
// get object if none just play
mindSO = SharedObject.getLocal("mindControl");
// Scan the mindSO for values
for (a in mindSO.data) {
trace(a+": "+mindSO.data[a]);
// if previously viewed play second frame
if (mindSO.data.movieName == filename[k]) {
// here is my targeting issue
loadMovie(path+filename[k], movieHolder_mc);
movieHolder_mc.movieName.gotoAndPlay(2);
} else {
// play whole movie
loadMovie(path+filename[k], movieHolder_mc);
setSOData();
}
}

View Replies !    View Related
Movie Clip Inside A Movie Clip Not Reacting When Pressed
Hi,

I am a beginner and I don't know how to make a movie clip that I attached to another movie clip become activated. I am not sure if it has to do with the depth issue, which I don't completely understand.
But this is what I want. I have placed a movie clip (a rectangle shape) on the stage and linked that movie clip to an actions script file. In that file (Button_group.as) I dynamillycally place another movie clip (Email_btn) which is linked to another actionscript file called "Email_btn.as" inside the area of the rectange movie clip (Button_group).
Inside the "Email_btn.as" class I specfied an "onPress " function that prints something. Now when I play the movie and I press inside the "Email_btn" movie clip nothing happens.

So the question is how do I specify that I am "pressing" the "Email_btn" (inside clip) area and not the parent "Button_group" area?

This is snippet of the code of Button_group that dynamically places the inside movieclip "Email_btn":

class com.macromedia.flashvideogallery.Button_group extends MovieClip
{

var email;

function Button_group()
{
init();
}

private function init():Void
{
trace ("MALENA");
this._alpha = 0;
email = attachMovie("Email_btn", "Email_btn1", this.getNextHighestDepth(), {_x: _parent._x , _y: _parent._y } );
email._visible = false;

//_parent.email_btn.onPress = function () {
//trace ("send email");
//}
}

thank you
-Malena

View Replies !    View Related
Button Nested In Movie Clip Just Repeats Movie Clip
I have a button that is inside of a movie clip. (the button falls down from the top). BUT, when i click on the button, it just plays the movie clip over again? Am I missing something?
Thank you

View Replies !    View Related
Movie Clip Buttons Wont Operate Movie Clip
I've created a set of movie clip buttons which change colour when clicked for ease of navigation, They work fine but they do not load the seperate swf file when using this code:

_root.but1.onRelease = function()
{
_root.loading.loadMovie("availablemenue.swf");

}

Any ideas where im going wrong?

View Replies !    View Related
How Can I Load An External SWF Into A Movie Clip That's Inside Other Movie Clip?
Hi.

I creating my first flash (actionscript 3.0) website but I'm stuck with a visual effect I want to create.
I have a window on my website called contentWindow. Every time you click a button this window is supposed to leave the stage, load the requested content and return to the stage.
The sliding window is a movie clip with 83 frames, 21 to enter the stage, 21 to leave the stage again, 20 for nothing (its just to simulate the loading time) and 21 to return to the stage.

Now my goal is, when the user clicks on a navigation button, the window exits the stage, loads an external SWF with the content, and then returns to the stage.

I've the "window" movie clip with an instance name of "contentWindow". Inside there is another movie clip with an instance name of "contentLoader". The content that the user requested should appear inside the "contentLoader".

Now, when the contentWindow leaves the stage, I get this error message:

quote:TypeError: Error #1009: Cannot access a property or method of a null object reference.
at rwd_fla::MainTimeline/trigger()

If I switch "contentWindow.contentLoader.addChild(navLoader);" for "contentWindow.addChild(navLoader);" it works fine, but the external SWF doesn't move with the window.

How can I load an external SWF into a movie clip that's inside other movie clip?








Attach Code

//stops playback after the intro
stop();

//loads a loader with the "inicio.swf" file
var navLoader:Loader = new Loader();
var inicio_url:URLRequest = new URLRequest("inicio.swf");

//event listeners for the buttons
inicio_btn.addEventListener(MouseEvent.CLICK, navInicio);
wdesign_btn.addEventListener(MouseEvent.CLICK, navWDesign);
foto_btn.addEventListener(MouseEvent.CLICK, navFoto);
model_btn.addEventListener(MouseEvent.CLICK, navModel);
servicos_btn.addEventListener(MouseEvent.CLICK, navServ);
contactos_btn.addEventListener(MouseEvent.CLICK, navCont);

//functions to every button where the navLoader variable is defined
function navInicio(event:MouseEvent):void
{
navLoader.load(inicio_url);
contentWindow.play();
addEventListener(Event.ENTER_FRAME, trigger);
}

function navWDesign(event:MouseEvent):void
{
contentWindow.play();
addEventListener(Event.ENTER_FRAME, trigger);
}

function navFoto(event:MouseEvent):void
{
contentWindow.play();
addEventListener(Event.ENTER_FRAME, trigger);
}

function navModel(event:MouseEvent):void
{
contentWindow.play();
addEventListener(Event.ENTER_FRAME, trigger);
}

function navServ(event:MouseEvent):void
{
contentWindow.play();
addEventListener(Event.ENTER_FRAME, trigger);
}

function navCont(event:MouseEvent):void
{
contentWindow.play();
addEventListener(Event.ENTER_FRAME, trigger);
}

//the function that triggers when the contentWindow leaves the stage
function trigger(event:Event):void
{
if (contentWindow.currentFrame == 43)
{
contentWindow.gotoAndPlay(44);
contentWindow.contentLoader.addChild(navLoader);
removeEventListener(Event.ENTER_FRAME, trigger);
}
}

























Edited: 06/13/2008 at 06:03:27 AM by Rui Marto

View Replies !    View Related
Using Movie Clip Event Handler Function, But Not For A Movie Clip
Let's say I have the following code:

----------------------------------------------
var initObj = new Object();
initObj.mood = "happy";
mc = attachMovie("mcBox","instBox",100,initObj);
mc.onPress = boxPress;

function boxPress() {
trace("Box mood: " + this.mood);
}
----------------------------------------------

Now, let's say there are times that I want to call boxPress() other than when the onPress event happens. Is there a way I can set up an object, give it a "mood" property, and then run boxPress() so that it uses my non-movieclip object instead of a movie clip?

View Replies !    View Related
Transfering Variables From One Movie Clip To An External Movie Clip.
i have two movie clips. one is supposed to recieve the value for the variable and pass it on to the other movie clip, which is called into the 1st one via the loadMovieNum() command.

I was trying to use global variables but i'm not able to get this to work because the 2nd one is tracing undefined when i use

trace(variable);

any suggestions?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved