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








Problem: Target Path To Movie Clip Element Of A Button


I'm trying to figure out how to use AS to access frames of a movie clip within a button symbol (using Flash MX 2004), and I seem to be stuck. I drafted a small test version of the FLA I'm working on, and it is attached to this message.

Specifically, my intention is to have a two-state button that goes into "selected mode" after the first mouse click, and then goes back to normal after a 2nd click. I can already handle the functional aspect of this using a global boolean like the one in the attached file. The problem is that I want to represent the current status of the button with a visual change; in the attached example FLA, the intention was to change the color of the text label on this button from grey to red when the button is in its "selected" state.

In this forum I found a similar question where someone had provided a "menu.fla" that had a row of buttons that acted more or less like a radio set, which is somewhat similar to my need. I've been trying to use the same sort of method, having converted the "up" state of the button text into a movie clip symbol with two frames (one for each state), and then trying to use AS to do a "gotoAndStop()" on the desired frame of the up label animation. The problem is that I cannot figure out how to actually make this work ... no matter what sort of path I try to use to get to the movie clip animation within the button, I cannot seem to set the text animation to jump to the "selected" frame (2).

I think my problem is that I've been unable to glean any understanding from the Flash MX docs about the differences between an object name and a symbol name and an identifier and an instance name and a blah blah blah, or about which of them (if any) actually is an ID that can be accessed via ActionScript. Also, MX 2004 seems to provide almost no compile-time error checking on the validity of a target path either, so I've been reduced to just throwing every combination at it that I can think of. None have worked, so I'm at a loss.

If anyone can explain to me why the attached FLA doesn't cause the text to stay red after a mouse click, no matter which of the commented out lines I try, it would undoubtedly be a big help to me.

(Please note that the button in this FLA uses a basic flashing animation for mouseovers ... it was just something quick to implement to emulate the mouseover animation in my full file, so please don't be distracted by it. Also note that I haven't tried to implement any code to return the button to a non-selected status yet. One thing at a time.)

RESOLVED: It was apparently the nesting of a movieclip inside of a button that prevented the original target path from working (and one of the tutorials at this website seems to support that). Once I knew what the proper path syntax was and didn't have to worry about that part anymore, eventually the rest fell into place pretty easily once I started using a movieclip for the button rather than an actual button.




KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 07-16-2004, 12:59 PM


View Complete Forum Thread with Replies

Sponsored Links:

Problem: Target Path To Movie Clip Element Of A Button
I'm trying to figure out how to use AS to access frames of a movie clip within a button symbol (using Flash MX 2004), and I seem to be stuck. I drafted a small test version of the FLA I'm working on, and it is attached to this message.

Specifically, my intention is to have a two-state button that goes into "selected mode" after the first mouse click, and then goes back to normal after a 2nd click. I can already handle the functional aspect of this using a global boolean like the one in the attached file. The problem is that I want to represent the current status of the button with a visual change; in the attached example FLA, the intention was to change the color of the text label on this button from grey to red when the button is in its "selected" state.

In this forum I found a similar question where someone had provided a "menu.fla" that had a row of buttons that acted more or less like a radio set, which is somewhat similar to my need. I've been trying to use the same sort of method, having converted the "up" state of the button text into a movie clip symbol with two frames (one for each state), and then trying to use AS to do a "gotoAndStop()" on the desired frame of the up label animation. The problem is that I cannot figure out how to actually make this work ... no matter what sort of path I try to use to get to the movie clip animation within the button, I cannot seem to set the text animation to jump to the "selected" frame (2).

I think my problem is that I've been unable to glean any understanding from the Flash MX docs about the differences between an object name and a symbol name and an identifier and an instance name and a blah blah blah, or about which of them (if any) actually is an ID that can be accessed via ActionScript. Also, MX 2004 seems to provide almost no compile-time error checking on the validity of a target path either, so I've been reduced to just throwing every combination at it that I can think of. None have worked, so I'm at a loss.

If anyone can explain to me why the attached FLA doesn't cause the text to stay red after a mouse click, no matter which of the commented out lines I try, it would undoubtedly be a big help to me.

(Please note that the button in this FLA uses a basic flashing animation for mouseovers ... it was just something quick to implement to emulate the mouseover animation in my full file, so please don't be distracted by it. Also note that I haven't tried to implement any code to return the button to a non-selected status yet. One thing at a time.)

RESOLVED: It was apparently the nesting of a movieclip inside of a button that prevented the original target path from working (and one of the tutorials at this website seems to support that). Once I knew what the proper path syntax was and didn't have to worry about that part anymore, eventually the rest fell into place pretty easily once I started using a movieclip for the button rather than an actual button.

View Replies !    View Related
Finding The Target Path Of The Movie Clip From The Button....
I'm now getting frustrated. I have it working on the demo flash but I could not get it to work on the new flash movie.

On the action script of the button, I clicked on the targetpath icon that look like a circle with a plus overlapping it. There, it showed the movie clip, abcoa_mc as "_root.abcoa_mc" then I do the script ..

--snip--
on release {
trace("Testing... -->" + _root.abcoa_mc);
}
--snip--

I get an "Testing... --> undefined" message. I don't know what I have done wrong. I already gave the movie clip an instance name and it showed up in the listing box that pop-up when I clicked on the targetpath icon. I know I'm using the right targetpath but flash is just not seeing it. How can I fix that?

Thanks,
FletchSOD

View Replies !    View Related
Target Movie Clip Inside Button
Hi everyone!

Is it possible to target a MC inside a button?

For example, i have a button (Button1) with a MC inside (MC1) containing some text. When i click on the button, i want the text to change by having "MC1" go to the next frame, which contains different text. I've tried targeting MC1 the following ways:

on (release) {
_root.Button1.MC1.nextFrame();
}

on (release) {
_root.Button1.MC1.gotoAndPlay(2);
}

I've also tried using a frame label but it didn't work either. If it's not possible to target a MC inside a button, i'd glagly accept other suggestions on how to do this.

Thanks!

View Replies !    View Related
How To Target A Button Inside A Movie Clip?
I have a button named demoBut and its inside a movie clip named curtain. I want demoBut disabled when I click a button on the stage. How do i target this button from the button on stage? Then I want to enable it again at the end of a movie clip.

View Replies !    View Related
Button In Movie Clip To Target A Scene, Help
Hey i have a movieclip that is a sliding menu with a few different buttons on it linked to corresponding scenes. It doesnt seem to be working. I dont know if i need to target outside of the movieclip or what to get it to change to the different scene when the button is clicked on. Right now i just have the standard on (release) gotoAndPlay("scene, 1") HELP please =)

View Replies !    View Related
Button In Movie Clip To Target A Frame, Help
hey, ok so i have a main timeline and a few labeled frames in the main timeline. I gave the buttons in the movieclip menu i have instance names and targeted the corresponding frame. I put the code for the linking of buttons to the frame label one after the other in the actions pane for all 7 buttons, on a frame that spans the frames used in the main timeline AND the movieclip timeline. . is that right? can i do this? (one after the other) It still isnt working.

art_btn.onRelease = function(){
_root.gotoAndPlay("artFrame");
}

photo_btn.onRelease = function(){
_root.gotoAndPlay("photoFrame");
}

Im not sure what im doing wrong. =( can someone help me? I would really appreciate it!!

View Replies !    View Related
Button In Movie Clip To Target A Scene, Help
Hey i have a movieclip that is a sliding menu with a few different buttons on it linked to corresponding scenes. It doesnt seem to be working. I dont know if i need to target outside of the movieclip or what to get it to change to the different scene when the button is clicked on. Right now i just have the standard on (release) gotoAndPlay("scene, 1") HELP please =)

View Replies !    View Related
Button In Movie Clip To Target A Frame, Help
hey, ok so i have a main timeline and a few labeled frames in the main timeline. I gave the buttons in the movieclip menu i have instance names and targeted the corresponding frame. I put the code for the linking of buttons to the frame label one after the other in the actions pane for all 7 buttons, on a frame that spans the frames used in the main timeline AND the movieclip timeline. . is that right? can i do this? (one after the other) It still isnt working.

art_btn.onRelease = function(){
_root.gotoAndPlay("artFrame");
}

photo_btn.onRelease = function(){
_root.gotoAndPlay("photoFrame");
}

Im not sure what im doing wrong. =( can someone help me? I would really appreciate it!!

View Replies !    View Related
How Do I Target A Text Field On The Main Timeline From A Button Within A Movie Clip?
Hi people.
I checked the archives and the tutorials but could not find the answer. Or at least I wasn't smart enough to figure it out......

I have a text box with an instance name textbox. I assigned a layer (AS) with the following code. The text loads fine.

// copy which is loaded
loadVarsText = new loadVars();
loadVarsText.load("mywriting.txt");
textbox.text = loadVarsText.var1;
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
textbox.html = true;
textbox.htmlText = this.var1;
} else {
trace("not loaded");
}
};

This is the AS which I assigned to the movie clip containing the pulldown buttons:

The pull down button menu works fine as well...... Please hang with me. The next paragraph should show my error(s)......

// pulldown menu
onClipEvent(load){
previouslyOver=false;
}
onClipEvent(enterFrame){
currentlyOver=this.hitTest(_root._xmouse,_root._ym ouse,true);
if(!previouslyOver and currentlyOver){
previouslyOver=true;
this.gotoAndStop("On");
} else if (previouslyOver and !currentlyOver){
previouslyOver=false;
this.gotoAndStop("Off");
}
}

I now want to replace the text on the main time line with a new text from the pull down menu button movie clip which holds several buttons.

The code for each button currently looks like this:
The text doesn't load into the text field? Not sure what the target path should look like? Please help somebody.

Thanks a lot, Henrik

// Code for text button
on (press) {
_root.loadVarsText.load("historicevents.txt");
_root.textbox.text = loadVarsText.var1;
loadVarsText = function(success) {
if (success) {
trace("done loading");
textbox.html = true;
textbox.htmlText = this.var1;
} else {
trace("not loaded");
}
};

View Replies !    View Related
Target Path & Button Enabled=False
Ok...I have two buttons. Both buttons are inside of a movie. Button 1 has an instance name of "exhibit". Button two when you do a rollover disables Button1. But there is my problem that I can't get it to disable using this code.

Code:
exhibit.enabled = false;

Now I have tried several different paths to try and locate the button. For example using _root.movieInstanceName.button1.enabled = false; but still no luck. Is there a reason why it's not locating it? Thanks

Also, I should mention that I've tried putting this code on the Button 2 so that when Button 2 is initiated it will activate Button 1 to be false.

Also I've tried putting it into this code but doesn't work.

Code:
onClipEvent (enterFrame) {
exhibit1.exhibit2.enabled = false;
if (active) {
nextFrame();
} else {
prevFrame();
}
}

I've tried this code with _root as well.

View Replies !    View Related
Loaded Movie Target Path
Hi

I'm having real problems working out the path to get a scroll function within a movie loaded into another movie (using a movie holder) to work. Grateful for some help.

The main movie has a movie holder with an instance name of 'approach_mc'. This hold a movie (approach.swf).

Approach.swf has a scroll function with the following actionscript:

ActionScript Code:
y = getProperty("_root.text.content", _y);
if (y<-120) {
gotoAndPlay(4);
} else {
setProperty("_root.text.content", _y, y-6);
}
The _root.text.content path on the loaded movie is obviously the problem, as it refers to the root on the loaded movie rather than the main (parent) movie.

But what should the path look like - I've tried various paths but nothing is working.

Grateful for some advice.

Thanx

Dirk

View Replies !    View Related
Using Eval Function And Variable In A Path (target Path)
Hello,

I have to reprogram some of my website and it calls to conjugate strings in a way that's beyond my understanding. Please help me with some suggestions. Kind regards.

the original code is:

code:
if (_global.useCount<10) {
//hide
var diff = 10-_global.useCount;
for (diff; diff>0; diff--) {
eval(String(11-diff))._visible = false;
}
}

There are buttons named 1 to 10 and this turns off the ones that are not used. Now I want to nest those buttons in subclip "buttonsRow", instead of having them on main timeline. How do I rewrite that code to make it work with new path?

I have already tried the "associative array" method, but it don't really know how to pack the whole eval function in there. I've tried many combinations, like:

code:
this.buttonRow[eval(String(11-diff))]_visible = false;
//or
this.buttonRow["eval(String(11-diff))"]_visible = false;
//or
buttonRow[eval(String(11-diff))]._visible = false;
//or
buttonRow["eval(String(11-diff))"]._visible = false;
//or
buttonRow[eval(11-diff)]._visible = false;
// or
buttonRow[8]._visible = false;
//the last one at least turns off button 8, lol

Some of those return syntax error and some just don't work. Anyone have any ideas? Thank you again.

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
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
Targetclip.movie Clip, What If The Target Clip Is An External .swf
I have a main.swf that loads a menu onto layer 2 as an external .swf.

when a button is pressed on the menu it loads another external .swf file (item1.swf) onto layer 1 so that the menu is infront of it.

when another button is pressed on menu.swf I want another external .swf (item2.swf) to load onto the same layer as the
first(item1.swf).

The thing is if I use loadmovie("item2.swf",1);
the item1.swf movies disappears immediately.

I have used targetclip.loadmovie, but can't get the target clip value. using this.loadmovie, or _root.movie works, but
doesnt leave the menu.

do I need to set up an empty "dummy" movie clip to use as the target to have movies load into that ?

hope that makes sense. Thanks in advance.

View Replies !    View Related
Flash Crashing On Click "insert Target Path" Button
Well, my computer is still crunching away after clicking on that button. I've given it up to 5 minutes to no avail - when I click on the "insert target path" button in the AS panel flash freezes up and the processors work overtime. Both cores are operating at near 60% capacity right now ... oh wait, one core took a break and the other is doing all the work for Flash now.

Anyways, this fla has but one imported item, a font from a shared library. When I deleted this item, that button still crashed Flash. I guess I could just go on without using that button, but from my experience in computers and design using a large variety of programs, this is an indication of a deeper problem - and that has me worried, esp since it is probably a problem in this project which I've been working on now for over a month. I have a previous version of the file, but using that would throw out an hour or two of work.

Any thoughts?

Update:
I narrowed it down to one of my major movie clips that has about 20 layers in it. From there I narrowed it down to a single row.

Out of all the rows, it is the only one that, when I delete all other rows and leave just it, it crashes Flash (all the other rows by themselves do just fine). But when I restore all the rows and then just delete the one bad row Flash still crashes.

2nd update:
I traced the problem back 25 file revisions - 2 days ago. It seems to occur between two files that are nearly the same. Their library contents are identical, except that the link structure of the bad file seems to have changed quite a bit from the good file. I can't make heads or tails out of it, but perhaps someone else can. I've attached a pic of their target path trees side by side (the bad file will open the target path chooser - it just takes about 30 seconds). Maybe this will help. view flas

View Replies !    View Related
Movie Clip Path
Ok this is driving me crazy. It is pretty simple. I just want a button I click to tell another movie clip to gotoAndPlay(2); and when I click the button nothing happens. I know the path is correct because I have the other movieclip in the _root section and it is named site_mc so the actionscript says on(press){ _root.site_mc.gotoAndPlay(2); } and nothing happens. any ideas?

View Replies !    View Related
Problem Loading External Movie Clips Into Target Movie Clip
Hello,

I've been desperately trying to figure how to get this function to work. I created a target movie clip, then assigned an external one to it, but I can't seem to get it to work. Can anyone help me with this and fully explain it so I don't miss anything? I'm using flash professional 8.

Thanks so much!

Rob

View Replies !    View Related
Movie Clip Path Problems
Hello all,

My question is about a movie clip I am trying to signal to play when a button is pressed. I would like the movie to play in the background of my main movie. It is in a movie clip called "Morph". I have been using the action script as follows:

on (release) {
_root.Morph.gotoAndPlay("morph");
}

(notice the frame frame in the movie clip that I would like to play is also called "morph")

I've been trying to figure this out but for some reason I can't get it to play at all in my main movie.

Thanks in advance!

-Vince

View Replies !    View Related
Movie Clip Motion Along A Path
I need some help! We are trying to motion tween a movie clip along a path. It doesn't seem to be working. We made sure the tween is orient to path, and we also created a motion guide layer. Does anyone have some suggestions?

View Replies !    View Related
New Path After Load Movie Clip?
Helloooo;

I have gota question on the correct path to a variable once you have loaded a movie into an emty movie clip.

Here goes, I have a made a movie which is the navigation control for a site. It has a dynamic text box which displays text when the mouse rolls over the buttons.
The name of the movie is: scrolling_menu
The path is this:
_root.tween_menu_mc.scrolling_mc.content = "my text here";
If i 'test movie' it works fine and the text is displaid.

I then have the 'main_site_movie' and want to load the navigation mc into level 10, so i use:
_root.createEmptyMovieClip("empty_scroll_mc", 10);

So i 'test movie' again and the dynamic text box no longet works.

I have tried:
1)_level10.tween_menu_mc.scrolling_mc.content = "my text here";

2)_level10.scrolling_menu.tween_menu_mc.scrolling_ mc.content="my text here";

3)_level10.empty_scroll_mc.tween_menu_mc.scrolling _mc.content = "Gym Equipment";


I have named the empty movie clip 'empty_scroll_mc' because it will only have the scrolling_menu.swf loaded into it, not different movies at different times etc. So when you load a movie.swf into an empty movie clip does the path start at the _root of the movie you loaded into, them the empty movie clip name then the original path?

Please could someone give me a quick lesson on this as it is gonna become a very necessary bit of knowledge as i try to make larger sites using this new load movie action. Big Thankyou in advance!

View Replies !    View Related
Path To A Movie Clip Pop-up Window?
Here is my problem. In my Flash project I am using Forms/screens and I have made a Pop- up window in shape of a movie clip using the Window Class:

var game:MovieClip =
mx.managers.PopUpManager.createPopUp(_root, mx.containers.Window, false, {title:table.getName(), closeButton:true, contentPath:"gamePage"});

When the movie clip is not on the scene (it is in the library until it pop up) I can not give it an instance name (or can I?). My question is: what will the path be to the pop up window? Lets pretend I want to manipulate the movie clip with a button that is not within the pop up window itself.

For example I have tried the following:

on (release){
_root.application.thegame.gamePage.play();
}

In this case I have desperatly tried "gamePage" that is the content path to the pop up movie clip and "thegame" that is the name of the screen where it does pop up. But of course it does not work.

Can anyone help me out, what will the correct path be to a pop up window movie clip that pop up from the library so to speak? Since I can not give the movie clip an instance, I do not know how to manipulate it.

View Replies !    View Related
[F8] Getting A Movie Clip To Follow A Path Around Another One
how does one make a move clip follow a specific path around another one? i have been trying for the past like 3 hours and i can't figure it out. if i have a square and another movieclip, and i want the movieclip to "roll" around the edges of the square, how can i do it?
if you can, please help me!

View Replies !    View Related
Movie Clip Path Problem
OK frame 1 new fla and I type the following code:


ActionScript Code:
createEmptyMovieClip("clip1",0);clip1.createEmptyMovieClip("clip2",1);


I have tried over and over again to get this to work but it won't! I want to create an empty MC and then create anoth MC within the first!

Thanks

View Replies !    View Related
Changing Path To Movie Clip......
Here's the code from a button that controls a movie clip on the main page:



Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "Home";
container.loadMovie("Home.swf");
} else if (_root.currMovie != "Home") {
if (container._currentframe>=container.midframe) {
_root.currMovie = "Home";
container.play();
}
}
}
The code works fine when the button is on the main timeline. However, I have a new complicated rollover button which is no longer on the main timeline. How do I change the path to the "container" movie clip?



Thanks-

View Replies !    View Related
Movie Clip Path Problem
OK frame 1 new fla and I type the following code:


ActionScript Code:
createEmptyMovieClip("clip1",0);clip1.createEmptyMovieClip("clip2",1);


I have tried over and over again to get this to work but it won't! I want to create an empty MC and then create anoth MC within the first!

Thanks

View Replies !    View Related
Can't Find Path To Movie Clip
i've racked my brain and can't seem to find the path to a movie clip on another level. it's driving me crazy!

k, here's the setup:

the main movie declares a variable, myLvl = 2.

all buttons on the main movie that load new sections have this code:

on (release){
loadMovieNum("whatever.swf",_root.myLvl);
_root.myLvl++;
}

when the whatever swf is loaded on the myLvl, it does an intro animation that covers the previously loaded level under it. at the end of the animation, it has this code:

unloadMovieNum(myLvl-1);
count = _level0.myLvl-2;
unloadMovieNum(count);

which unloads the previous level.

now, here's the problem:

when i try to work around on that top level, i can't get to any MC. for example, if i want a button on that whatever.swf to have an MC there gotoAndPlay(2), it doesn't do it when i test it online from the main movie. but if i type in the url this way:

http://www.mysite/whatever.swf and click the button, the mc on it does gotoAndPlay frame 2. it's only when i go to mysite.com, then click the button that loads whatever.swf, and then click the button that's supposed to advance the mc, nothing happens!

i've tried every _root, _parent, _this, and _level i can think of to put behind that mc and nothing seems to work!

i currently have _root.mc.gotoAndPlay(2);

like i said, that works fine if i access the whatever.swf and play it. but if it's loaded from the main movie and is on some level, the code doesn't work.

any advice? i'd really appreciate it!

View Replies !    View Related
Tell Target Within A Movie Clip
Allo! My name is Midget, and I have a problem (don't we all?). I have a button in a movie clip and I want it to Tell Target when you click on it. The target is a movie clip on the Root movie timeline. I have named it as instance "B". I want it to tell instance "B" on the root movie to GoToAndPlay Frame 360.

But when I attempt it as is I get this error:

Target not found: Target="B" Base="_level0.instance1"

Any suggestions?

View Replies !    View Related
Trying To Target A Particular Movie Clip
Can someone please help me!!!

I am trying to link between a button and two html frames. I have figured out how to load the flash files into each html frame, but I cant seem to target the appropriate movie clip. I have tried to use tellTarget, loadMovie, getURL and also gotoAndPlay, but I can't nut it out. I'm sure it's probably something simple, but I just can't figure it out.

The html frame I'm trying to load the clip in is called "header.html", the button I'm trying to load from is located in a separate frame called "nav.html", the swf file is called "header.swf" and I'm trying to load a movie clip called "melb_tours_clip" or the frame name of "melb_tours" but it keeps loading the first frame of the "header.swf" which contains a "home_clip". The scipt i've most recently used is below.

on (release) {
getURL ("melb_index.html", "content");
getURL ("header.html", "header");
tellTarget ("melb_tours_clip") {
}
}

All the lines work except for the tellTarget line.

Please help me

View Replies !    View Related
Target One Movie Clip From Another
I'm having trouble communicating from one Movie Clip to another. I have a gallery of images. Each image is contained in its own Clip (1 -8) occupying different frames (11-19) on the main timeline. Each clip(all are named instances) is called from the gallery of thumbnails (on the main timeline, frames 3-10) by an invisible button. Each clip loads, does a short tween that resizes it to full stage, then stops (frame 12 of clip) at which time the title and three buttons appear (Next, Menu, Prev). I want the next and prev buttons to sequence the images (each sucessive clip) full size (frame 12, without running the tween). I can successfully go back to the main line line for the menu button using _root.gotoAndPlay(6) frame 6 on the main timeline. I thought should be able to use _root.Clip3.gotoAndPlay(12) for the next button and _root.Clip1.gotoAndPlay for the previous but, no it don't work. I've also tried _parent and _level0.

Any suggestions. :-}
Thanks, Chas

View Replies !    View Related
How To Target A Movie Clip From A CGI...
Hello,
I have a form that resides in a movieclip. The movie clip is on a time line of an SWF that is loaded into a movie clip on a time line in the main movie. The hierarchy is as follows:

_root.body.form

Where ROOT is the main movie, and BODY is the instance name of the movie clip that holds the SWF that has the movie clip instance called FORM.

The form works fine and sends out the info to email. The problem is I have a message in a dynamic text with a variable name of EmailStatus. For some reason when targeting that text variable I do not get the message returned from the CGI script. This does however work when I use a test movie, where the form resides on the main timeline.

Here is the code on the button that sends the form:

on (release) {
if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail address";
} else if (!realname.length) {
EmailStatus = "Please Enter your name before Sending";
} else if (!Additional.length) {
EmailStatus = "Please enter your Comments!";
} else {
loadVariablesNum ("http://www.mysite.com/cgi-bin/formMailPerl.pl", "0", "POST");
EmailStatus = "sending your info now...";
}
}

and here is the bottom of the CGI form

print "Content-type: text/html

";
print "_root.Mail.EmailStatus=Complete - Your mail has been sent";

sub ErrorMessage {
print "Content-type: text/html

";
print "_root.Mail.EmailStatus=Connection Failed Please Check the path to the Mail program";
exit; }

the only thing I can think is that the path to the form is wrong. A member named Dudo helped me out before, but his suggestion to change _root.Mail.EmailStatus to just EmailStatus kept that field from working at all. Any one know how to write the proper path to the form where it resides?
Thanx in advance!
-Potus

View Replies !    View Related
Tell Target Movie Clip Help
Okay I've got a bit of a maze here which I'm sure is actually kind of simple to someone more experienced I'm sure. I'm using Flash MX. I want to use a button to trigger the Movie Clip to Play.

1. I have a button that sits on the main Time Line and a Movie Clip named BigScreen that sits on the main time line.
2. The button has a Movie clip sitting in the keyframe associated with the Down position called Trigger.
3. The Trigger Movie clip is attempting to tell the Movie Clip on the Main Time Line to gotoAndPlay a certain frame.

I've tried: BigScreen.gotoAndPlay(3)
and I've tried: _root.BigScreen.gotoAndPlay(3)

Neither of which worked. Obviously I'm guessing. I'm sure this is a simple one. I appreciate any help you may have.

Thanks,

Tom

View Replies !    View Related
[F8] Target Movie Clip Above This One?
Alright im loading a movie into a movie, and when i do that stuff messes up.

so how do i target some text fields and stuff that are above a movie clip.

like if i have,

movie.another.mc1

how do i reverse that if what i want to target is on movie
is it like _parent or something?

View Replies !    View Related
Cannot Target Movie Clip?
first and foremost than you if you are reading this to see if you can help.

I am working on a flash site currently and cannot figure out why I cannot target a certain movie clip which is nested within another movieclip.

The movie consists of this:

MAIN TIMELINE

mcIntro
<---nested in mcIntro-->
-mcWebsite
-mcWebpage
-mcListings
<--nested in mcIntro-->

I have the Actions on the main timeline so I am targeting the Movieclips like so.

this.mcIntro.mcWebsite.onRollOver = function():Void {
this.gotoAndPlay(2);
}
All of the movieclips have instance names which are same as above.
I want to put Roll over actions on each. I have done this before but for some reason it isnt working this time. The only thing different is that they are under a mask.

I even tested it and just tried to set the visible property to false and it did not work. I even targeted the movieclip through the movie explorer and still no comprende lol.

PLEASE HELP!

http://hien.odwbeta.com/ray/scene1.fla <--url to FLA

View Replies !    View Related
Try To Re-target My Movie Clip
I've made an custom video player. I've put all my video controls inside a movie clip. the movie clips instance name is videoControls and the flv instance name is vidPlayback. however, i have get an access of undefined error message. Why?


ActionScript Code:
package {
    import flash.display.MovieClip;
    import flash.events.*;
    import fl.video.*;
    import flash.text.TextField;

    public class dMovie extends MovieClip {
public function dMovie() {
       
            vidPlayback.playButton = playPlayback;

View Replies !    View Related
Can't Target Movie Clip
im using swapdepths alot in this project, not sure if that effects anything. but i cant get a duplicated MC to goto a different frame! i've even used tellTarget.


MC is called 'main_block' and is in the same place as these variables/functions but i can't get it to do anything except from a button inside the 'main_block' MC itself.

_parent._parent.align_nodes(); -ok
_parent._parent.done = "yes"; -ok

_parent._parent.main_block.gotoAndStop(2); -no go
_level0.sub_1.btnmc1.main_block.gotoAndStop(2); no go
_root.sub_1.btnmc1.main_block.gotoAndStop(2); no go

anyone experienced this?

View Replies !    View Related
Change Movie Clip Mid-guide Path
Hi:
I have a movie clip that follows a guide path. I have been trying to make it change to a different color on an event by puting in a gotoAndPlay to a different frame on the movie clip symbol's timeline.
Then I use the coordinate location of the the symbol to trigger the change of frame on the symbol's timeline. The trouble is the movie clip freezes at the coordinate location. Can anyone point me to an example that might help me figger out what I am doing wrong?

Mark

View Replies !    View Related
How Can I Have A Movie-clip/graphic Follow A Path?
Let's say I draw a nice curved path (with a decent width) and I want movie clips to follow the curve path (inside of the path, in the middle).

How would I do this?

Thanks,
John

View Replies !    View Related
_parent Movie Clip Path Issue
I have had a similar problem,

I have a timeline with a few movie clips in. Whilst in the first MC I want to be able to go a level up '_parent.gotoAndStop(176);', and then as the movie jumps here and automatically starts to play the next movie clip, to go within that and stop it.

So the Movie Clip called 'myinnerclip' doesn't just play in the timeline but is stopped also.

The _parent part works fine, but the 'myinnerclip' part always just plays.

on (release) {
_parent.gotoAndStop(176);
myinnerclip.gotoAndStop(54);
}


Any ideas?

View Replies !    View Related
Dynamic Movie Clip Path Problem
im trying to make empty clips inside other empty clips, im not exactly sure if im going about this the right way, but if anyone can help me out, that would rock


Code:
txtMovieName = new Array("mc_title", "mc_length", "mc_genre", "mc_bpm", "mc_format");

clipPath = "_level0"
function createClips() {
for (i=0; i<txtMovieName.length; i++) {
_root[clipPath].createEmptyMovieClip(txtMovieName[i],depthLevel);
_root[clipPath][txtMovieName[i]]._x = txtMovieXpos[i];
_root[clipPath][txtMovieName[i]]._y = 174;
clipPath = clipPath+"."+txtMovieName[i]
}
}
the var - clipPath is adding each movie clip to itself properly, but when it creates the movies, it puts them all in _root (level0)... cant figure out why

View Replies !    View Related
Path To External Container Movie Clip
Howdy
i've been doing the kirupa tutorial -
Transitions Between External SWFs.
I got everthing working fine but then had to do my buttons on an external SWF which loads on top of the main movie.
Now i cant get the buttons to load in the other extrenal SWFs
The tutorial says -

If your buttons are not located on the main timeline, you will have to change the path to the container movieclip.

i can't figure how to do this, of cousre its easy to just "loadmovie" but then i loose all the transitions.

The SWF with the buttons is called "dropdown"
The main SWF i' want to load clips into is called "index"
The SWF i want to load is calles "services"

Below is the actionscript im using on the button.
How do i change the path to link to the container clip?
Can u guys help me?
Thanks in advance
Michael

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "services";
container.loadMovie("services.swf");
} else if (_root.currMovie != "services") {
if (container._currentframe>=container.midframe) {
_root.currMovie = "services";
container.play();
}
}
}

View Replies !    View Related
Dynamic Movie Clip Path Problem
im trying to make empty clips inside other empty clips, im not exactly sure if im going about this the right way, but if anyone can help me out, that would rock


Code:
txtMovieName = new Array("mc_title", "mc_length", "mc_genre", "mc_bpm", "mc_format");

clipPath = "_level0"
function createClips() {
for (i=0; i<txtMovieName.length; i++) {
_root[clipPath].createEmptyMovieClip(txtMovieName[i],depthLevel);
_root[clipPath][txtMovieName[i]]._x = txtMovieXpos[i];
_root[clipPath][txtMovieName[i]]._y = 174;
clipPath = clipPath+"."+txtMovieName[i]
}
}
the var - clipPath is adding each movie clip to itself properly, but when it creates the movies, it puts them all in _root (level0)... cant figure out why

View Replies !    View Related
Path To Movie Clip Not Working .. Stranges
Hopefully someone can tell me what I'm doing wrong here.

I have a movie clip on the main time line of my movie (topNav_mc). It holds all the navigation for mysite. Inside the movie clip are five drop down menus, each is its own movie clip (menu1_mc, menu2_mc, etc).

When the movie plays, the user sees five buttons on the top of the page (menu1_btn, menu2_btn, etc), if he rolls over one of the buttons, I have the movie jump to a part of the time line that shows that movie clip menu droping down and stopping. You have probably scene stuff like this a million times.

Okay, he is the part I don't get. Inside each of my menu movie clips are the links for various sections of my website. ("News", "About Us", "Buy Stuff", etc) Each is set up as a button and named accrodingly ("Menu1_Link1_btn","Menu1_Link2_btn"). My problem is this.

I'm trying to set up an AS file to contain all the URL's for every link in my menus. This will make life much easier down the line since alot of my co workers are programers and not Flash developers.

Below is my sample code :

stop();


_root.topNav_mc.menu1_btn.onRollOver = function (){
topNav_mc.gotoAndPlay("menu1_start");
}

_root.topNav_mc.menu1_mc.menu1_link1_btn.onRollOver = function(){
trace("button1 Menu1");
}
_root.topNav_mc.menu1_mc.menu1_link2_btn.onRollOver = function(){
trace("button2 Menu1");
}
_root.topNav_mc.menu1_mc.menu1_link3_btn.onRollOver = function(){
trace("button3 Menu1");
}
_root.topNav_mc.menu1_mc.menu1_link4_btn.onRollOver = function(){
trace("button4 Menu1");
}

_root.topNav_mc.menu2_btn.onRollOver = function (){
topNav_mc.gotoAndPlay("menu2_start");
}


_root.topNav_mc.menu2_mc.menu2_link1_btn.onRelease = function(){
trace("Menu2 Link1");
}

_root.topNav_mc.menu2_mc.menu2_link2_btn.onRelease = function(){
trace("Menu2 Link2");
}


_root.topNav_mc.menu3_btn.onRollOver = function (){
topNav_mc.gotoAndPlay("menu3_start");
}

_root.topNav_mc.menu4_btn.onRollOver = function (){
topNav_mc.gotoAndPlay("menu4_start");
}

_root.topNav_mc.menu5_btn.onRollOver = function (){
topNav_mc.gotoAndPlay("menu5_start");
}


My problem is that the menus work fine, but I get no response from the links. None of the trace statements work at all.

I know this is an instance or path problem or something, but I don't know what. Any ideas would be a huge help. Do I need to instanciate the movie clips before they can be calle or something?

Hand Old Buddy

View Replies !    View Related
Can I Target A Dyamic Movie Clip Using 'with' ?
I'm trying to target a movie clip that has a variable in it
using the 'with' command

---
with ("_root.line.group." + CLIPNAME) {
gotoAndPlay ("start");
}
---

or even just typing in the command
---
_root.line.group.CLIPNAME.gotoAndPlay("start");
---

Is it possible to stick a variable into it? I've tried everything and I can't get it to work.
I CAN do it with tellTarget though, but I'd rather use the flash 5 functions, rather than the flash 4 ones....


tellTarget ("_root.line.group." + CLIPNAME) {
gotoAndPlay ("start");
}

View Replies !    View Related
Load A Movie Clip Into A Target
please help...
i have a button in a scroll pane in a movie clip on the main stage, how can i load a movie clip in the library into a target on the main stage by clicking the button. by the way, i have flash mx...

thank you very much!

View Replies !    View Related
Hit Target >>>play Movie Clip?
Flash MX.
Could somebody please tell me how to play a movie clip when a dragable object hits its target?
I can't get the clip to play. A rough guideline would do.
Thanks.

View Replies !    View Related
Movie Clip Target Trouble
I'm having trouble getting from a movie clip with the instance name "mcpaint" back to a certain frame on the main timeline...

I tried attaching this action to a button on the last frame of the movie clip...
on (press, release, rollOver, rollOut) {
_root.mcpaint._gotoAndPlay(2);
}


I also tried this code on the last frame of the "mcpaint" movieclip
_root.mcpaint._gotoAndPlay(2);

am i supposed to be using the "with" tag?

i also tried this code:

with (_level0.gotoandstop(2)) {
}

I've been playing around with this for hours w/ no luck....any help would be appreciated...thanks

View Replies !    View Related
Target Dynamic Movie Clip
please help me friends

how to creat dynamic movie clip and target them;

thanks in advance

mp

View Replies !    View Related
How To Exe File To Movie Clip Target?
How to exe file to movie clip target?
I would like to load exe file in target movieclip in main movie but I try to loadmovie it's not work.
help me
Thank you so much

View Replies !    View Related
Load Movie Clip Target?
Hello,

I am working in Flash Mx and am attempting to return to the program after it has been on the shelf for a bit.

I have a still image as a button, and when the user clicks on this image, it needs to animate. I have a symbol ready for the still button and the animation Say B_reel and M_reel B for button and M for movie.

Is this an "on release, load movie clip into target=this" ? sort of thing?

Thanks in advance for any tips or links to tutorials.

Cheers,

Wes

View Replies !    View Related
Preloader With Target Movie Clip
Hi. I have a preloader that will show the progress on loading imported .jpg's.
To the target movie clip, i have this code:

onClipEvent (enterFrame) {
tb = math.round(this.getBytesTotal()/1024);
lb = math.round(this.getBytesLoaded()/1024);
perc = math.round((lb/tb)*100);
_parent.loadBar.motion._width = perc;
if ((lb/tb)>0.95) {
_parent.loadBar._visible = false;
} else {
_parent.loadBar._visible = true;
}
}

loadbar is the instance name of the preloader mc, and motion is the name of the moving rectangle in the preloader. When previewing, it looks nice, but when it's on the internet, and people have pressed a button to load that image earlier, the image is loaded in the temporary internet files, and doesn't need to load again. Still, the preloader appears, and doesn't move.
Sorry for all my misspellings. If you wanna take a look at the problem, visit my site and click at "gallery". (click on a button/image so that it loads, then click it again.)

Thanks

Magnus

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