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




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.



FlashKit > Flash Help > Flash ActionScript
Posted on: 02-08-2005, 09:39 PM


View Complete Forum Thread with Replies

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

Target Path For A Function
Hello,

I was just wondering how a function is called when it lives in a different MC.

I have function defined in one MC, and I want to call from an MC that I have embedded a couple of layers deeper.

Is there a way to target in this manner?

Thanks!

Using A Variable As A Target Path
My question in essence:

I have a global variable set as a target path. I want to use that variable to send the movie clip to a new frame.

I am making a wordsearch. when a letter tile is clicked, it is recorded as being 1 tile currently selected (acting as the start point for a word), and the global variable i mentioned is set to =this. when another tile is selected (as the end point of the word), a second global variable is set to =this (the second tile) and a function is triggered. so I have the target of the first and last tiles of the word saved as variables. Now, when it checks the tiles for a correct answer, I want to reset the tiles to the frame 'white'. I have tried using:

[firsttile].gotoAndStop('white');

and

[firsttile]gotoAndStop('white');


but neither of these are working for me.

Can anyone tell me the syntax I need?

Thanks
abi

Using A Variable In A Target Path
Hey Guys,
Ive got a function similar to the following:

function ping(btn_name) {

_root.btn_name.gotoandplay(2);

}

and im calling it:

ping('news');


if i put a trace in the function I can see the the variable is being transfered correctly ...but my news movie clips isnt play frame 2.

Ive made sure ive named the MC properly but im not sure if im 'printing' the variable out correctly into the target path.

Can anyone help?

Zaid

Function Target Path, And On Many Buttons.
Hi!

I´ve got 2 problems. To get my functions work on my buttons, I need to place the function AS in the same MC as the buttons (menu). I´m shure it´s not the path I got wrong... How can I place all my function script in a *.as or at least on a action layer in the _root, and reach them from my buttons.

Second problem. On my menu buttons I use some rollOver and rollOut, same on each buttons, but different onRelease. As it is now I need to write the same functions for every button to make it work. How can I use the same function script for every rollOver and rollOut, but using different onRelease?

Many thanx for helping me!
Sundance Kid

How Do I Reference A Target Path Using A Variable
I have a series of the same movie clip as instances named a1, a2, a3, a4 .... etc what i need to do is get them to play one after another. so i tried to script it as follows:

x = x + 1;
with (winder.a[x]) {
gotoAndPlay (2);
}

doesn't work.

Please help!

Weirdness Re Using A Variable In A Target Path
I have a numeric variable _root.square that cycles from 1 to 24.

I have square movie clips named "s1" to "s24."

I want to address those clips using the variable. (Specifically, I'm setting another variable, biofile within that clip.)

_root.square starts out = 1. The following does not work:

_root.clipname = "s"+_root.square;
_root[clipname].biofile = "some text";

The following frame script DOES work--without my _root.square variable:

_root.clipname = "s"+1;
_root[clipname].biofile = "some text";

All I've done in the second one is use the numeral 1 instead of _root.square... which equals 1 anyway!

I know this for sure because I trace _root.square.

And it's not a string/number issue: the second one works with either the number 1 or the string "1". And I trace typeof (_root.square) to verify that it's a number.

It is. It's a number 1. So why does it not work the same as a number 1? Even if it were a string, that should work.

BTW, another test: I set _root.square = 1 manually beforehand ... and that ALSO works. It's already 1... yet setting it to 1 again makes it work.

If you're wondering where _root.square came from to begin with, it was declared as follows:

_root.square = math.round(.5+math.random()*24);

Then I cycle it 1-24 over and over from there, and I do my testing when it reaches 1 (again, proven by a trace).

And just to be complete, here's what does the cycle at the top of the script:

_root.square = _root.square+1;
if (_root.square>24) {
_root.square = 1;
}

TIA!

Using A Variable To Help Define A Target Path?
I have 5 movieclips which serve as 5 separate countdown timers. They are simply named "timer1", timer2", "timer3", etc. I also have an input device movieclip (looks like a calculator) which allows the user to set each timer depending upon which one is currently chosen at the time. The user sets the time on the calculator, presses a "submit" button, and the information is sent to the appropriate timer where the countdown is begun. To streamline the code I am wondering if it is possible to inject a variable into a target path in order to direct the time to the appropriate timer.

for example:

If timer1 is chosen, the variable "activeTimer=1". With timer2 chosen, "activeTimer=2", etc.

Is there a way to do something like this and make it work:

Code:
_root.timer["activeTimer"].gotoAndPlay("start");
This way I don't have to copy and paste the submit button's code 5 times using if statements.

Thank you for time,

Nate

Using A Variable In A Target Path - Not Working
Hi.
I have a slide presentation that instantiates a sound instance (loaded external .mp3) using a frame on(reveal) behavior. I want to reuse the code on through the presentation, while only changing out the variable at the beginning which denotes the path to the sound instance.

If I put in the path in the appropriate places, everything works fine, but when I try and put in the variable inside the target path, it doesn't work. Even though the trace() returns the correct value, I suspect that Flash is not recognizing it as a target path.

Can someone tell me why?

Here's the code that does NOT work...

Code:
var currentState = true;
var marker = 0;
var thisSound:String = "controlling";
trace(thisSound);

playpause_btn.onRelease = function(){
if (currentState == true) {
pause_mc._visible = false;
audioStop();
} else {
pause_mc._visible = true;
audioPlay();
}
};

rewind_btn.onRelease = function() {
pause_mc._visible = true;
audioRewind();
}

function audioStop() {
var myStopSound = "_global.Behaviors.Sound." + thisSound; //set the current sound instance path
myStopSound.stop(); // stop the sound
marker = myStopSound.position/1000; // mark the stopped position
currentState = false; // set the state of the play/pause btn
trace(myStopSound);
}

function audioPlay() { // play the sound
var myPlaySound = "_global.Behaviors.Sound." + thisSound; //set the current sound instance path
myPlaySound.start(marker); //play from the marker
currentState = true; // set the state of the play/pause btn
trace(myPlaySound);
}

function audioRewind() {
var myRewindSound = "_global.Behaviors.Sound." + thisSound; //set the current sound instance path
marker = 0; // set the marker to the beginning
myRewindSound.start(); // start playing
currentState = true; // set the state of the play/pause btn
trace(myRewindSound);
}
BUT, if I change out the code directly using '_global.Behaviors.Sound.controlling' for the sound instance, it works fine.

Thanks
-TC

Save Target Path To A Variable?
I'm having trouble referencing the contents of a scrollpane, which contains movie clips, dynamic text, and images contained in nested movie clips. Is it possible to save the target path of my nested clips inside a variable, so I could reference them from anywhere?

I've tried this but it doesn't seem to work:
_global.Image = _root.scrollpane_mc.productsIndex_mc.imageholder_mc;

Target Path Including Variable Error
hi

using following code on button produces script error?

on (rollover) {
hit = this._name;
num = hit.charAt(hit.length-1);
myHitColor = new Color("_level0.menuscroll.menu.["topNav" + num].text");
}

Using Variable In A Target Path - Urgent Problem - Please Help
using variable in a target path - urgent problem - please help

----------------------------------------------------------------------

1. I have my navigation buttons in level0

2. When a button is pressed it loads an external .swf into the highest empty level

3. There is a variable called 'toplayer' on the main timeline of level0, that stores the number of the level that this external .swf file is loaded into.

4. There is an MC in this loaded .swf called 'image' and inside that another MC called 'empty'.

5. Inside the 'image' MC, there is a frame action that loads another external .swf file into the 'empty' MC. It is in this second loaded .swf that the preloader sits.

My Preloader script(works fine) except for stated problem

iBytesTotal = _level11._root.image.empty.getBytesTotal();
iBytesLoaded = _level11._root.image.empty.getBytesLoaded();
iBytes = (iBytesLoaded/iBytesTotal)*100;
percent = Math.round(iBytes)+"%";
setProperty("pBar", _xscale, iBytes);


The problem I am having is that the level's number (e.g. 11 as above) is being stored in a variable called 'toplayer' on the base timeline in level0.

So how do I refrence this?

e.g. (i know this is wrong)
iBytesTotal=_level+_level0._root.toplayer+._root.i mage.empty.getBytesTotal();

?????????
I can't figure it out!

Have i explained this clearly enough?

Variable Path Name --> Path=_root
instName="inst1";
path="_root";

Element.prototype.setVisible = function(){
[path+"."+instName]._visible=true;
}

I am trying to build a variable path to an instance. Normally I would do something like this[var]._x, but this doesn't work with _root.

Any ideas?

Eval With Array Path
Hello, I need to be able to chop and change my array path using substring ect.

so instead of just going
etrail = Master.Outline[0].Section[0]

I want to be able to use
etrail = eval("Master.Outline[0].Section[0]")

But it comes back with undefined. It work fine if I didn't have the numbers or if I could just leave it at eval("Master.Outline")[0]

Can any one help?

Eval With Array Path
Hello, I need to be able to chop and change my array path using substring ect.

so instead of just going
etrail = Master.Outline[0].Section[0]

I want to be able to use
etrail = eval("Master.Outline[0].Section[0]")

But it comes back with undefined. It work fine if I didn't have the numbers or if I could just leave it at eval("Master.Outline")[0]

Can any one help?

Eval () / Path Problem
Ok I had this code on the same level as "ring"


PHP Code:



for(i=0;i<=10;i++){if (this["writename"+i] == undefined) {eval("ring"+i)._visible = false; eval("ring"+i).writename.text = "";}else{eval["ring"+i]._visible = true; eval["ring"+i].writename.text = this["writename"+i]; }} 




Now I have placed "ring" in a movie called "box"
And "box" is loaded into "scrol" (scrollpane)

This is how I thought the code should be, but it doesn't work.


PHP Code:



for(i=0;i<=10;i++){if (this["writename"+i] == undefined) {scrol.box.eval("ring"+i)._visible = false; eval("ring"+i).writename.text = "";}else{scrol.box.eval["ring"+i]._visible = true; scrol.box.eval["ring"+i].writename.text = this["writename"+i]; }} 




Any ideas ?

Eval () / Path Problem
Ok I had this code on the same level as "ring"


PHP Code:



for(i=0;i<=10;i++){if (this["writename"+i] == undefined) {eval("ring"+i)._visible = false; eval("ring"+i).writename.text = "";}else{eval["ring"+i]._visible = true; eval["ring"+i].writename.text = this["writename"+i]; }} 




Now I have placed "ring" in a movie called "box"
And "box" is loaded into "scrol" (scrollpane)

This is how I thought the code should be, but it doesn't work.


PHP Code:



for(i=0;i<=10;i++){if (this["writename"+i] == undefined) {scrol.box.eval("ring"+i)._visible = false; eval("ring"+i).writename.text = "";}else{scrol.box.eval["ring"+i]._visible = true; scrol.box.eval["ring"+i].writename.text = this["writename"+i]; }} 




Any ideas ?

Target Path
I can't get the code below to work when one movie clip is placed inside another. The code does work however, if the movie clip is not nested.

"ins_buttons" = the instance name given to the movie clip.

on (release) {
_root.ins_buttons.nextScene();
play ();
}

Any help will be greatly appreciated.



Ike Austin

Help With Target Path...
I'm having a lot of trouble targeting a different swf, I have a "shell" movie that loads a file into level1, I also have a file that loads into an instance of a blank movieclip in the shell file. So we have three swf files interelating. The trouble I am having is in trying to get a button in the level 1 movie to tell the movie that had loaded into the instance in level 0 to goto and stop at a different named scene. Anyone have an idea how to do this?
It would probably work if I loaded the target movie into another level, but I'd like to get it to work as it is.

For the sake of simplicity I will try to detail the scripting:

Movie:BG contains an instance of a blank MC named "Nav" that loads a file named main_nav.swf into it.

Movie:BG then loads a file called "home.swf" into level1.

I want a button in home.swf to cause main_nav.swf to go to a different scene.

Thanks to anyone who can help me!

TARGET PATH... HELP ME PLS
how wud i target a movie clip called "textbox" in my library... the movie is under scene 1.. for some darn reason "_root.textbox" is not working!!! it says TARGET NOT FOUND... pls help me asap!

Target Path
How to control action betwen two different loaded movies in diferent frames (html frameset - each frame with it's name)?

Target Path, Please Help
I want to access a movie clip inside a button, it it doesn't work.

I have a button wich i named "button"
Inside it a have a clip named "clip".

I try to access the clip with the "telltarget" command(on the button), and it doesn't find the clip.I tried with the "level0.button.clip" path.

What am i doing wrong?

Target Path
Hi guys!
This may seem simple but its confusing me!!
How do you get things onto that target path thing?
Where its like
_root.movieclip
I have done it before but I dont know how!!
Thanks!

[CS3/AS2] Target Path Help
Hi I am having some issues with communicating with a loaded movie clip and I can't understand why...

I have a root .swf which calls in external .swf's into a movieclip on the root timeline called contentHolder.

now i need to communicate firstly to the root timeline then to a movieclip within an externally loaded swf, so i use _root.contentHolder.movieclipname but this doesn't work...

Seems so basic but causing me untold grief lol

Var In Target Path
How can I assign a var into a target path? This seems like it should work but the alpha is not changing. All my MC's inside map are named to match the labels in the node passed from the XML file. Thanks in advance.


Code:
var myTreeDP:XML = new XML();
myTreeDP.ignoreWhite = true;
myTreeDP.load("xml/menu.xml");
myTreeDP.onLoad = function() {
myTree.dataProvider = this.firstChild;
};
var treeListener:Object = new Object();
treeListener.change = function(evt:Object) {
var menuClk = evt.target.selectedNode.attributes.label;
trace(menuClk);
_root.map[menuClk]._alpha = 100;
};
myTree.addEventListener("change", treeListener);

Help With Target Path....
Acckkkk it is driving me crazy...

Set up.

A movie clip of a clock. inside that clip is a movie clip of the hand with the instance name of hand_mc

The clock is on the root timeline with the instance name clock_mc

a button starts the clock moving.

the script on frame one of the main timelinestop();
this.clock_mc.hand_mc.stop();
this.clock_mc.stop();
_root.clock_mc.hand_mc.onRelease = function() {
_root.gotoAndStop(2);
};
go_btn.onRelease = function() {
clock_mc.play();
};
clock_mc.onRelease = function() {
clock_mc.gotoAndStop(24);
};The problem....

I can click on clock_mc and it goes to the correct frame and stops. Thats good. but when I click on the hand_mc nothing.

If I remove the script clock_mc.onRelease = function() {
clock_mc.gotoAndStop(24);
};then I can click on hand_mc and it goes to frame 2 of the main timeline.

How can I get both working together.

Thanks.

Target Path
Hi everyone,

I have a button inside a movie clip. The link available on this button should go to a different scene available on the main timeline. Using the target path feature available on the Action Panel, the following piece of code was generated:

on (release) {
_root.gotoAndplay("scene2", 1);
}

No error was detected by the Check Sintax feature. However, nothing happens when after the button is clicked.
Any idea about what is wrong? Thanks.

Gustavo

Target Path?
I have 2 movies: movieA and movieB

movieB gets loaded into movieA.

I need navigation from movieA to talk to items inside movieB but I can't figure out the target path if there even is any.

any ideas?

Target Path
I'm trying to acess myLoader located on a timeline above the navBar mc where my function is located and for some reason I am not able to acces the loader. The trace show that th button hears the addEventListener and the evt.target.name is working properly.

I get the following compile error:
1119: Access of possibly undefined property myLoader through a reference with static type flash.display:DisplayObjectContainer.

Can someone help me determine why?








Attach Code

The code on the main timeline is as follows:
//create a sprite container and add to the stage
var container:Sprite = new Sprite();
container.x=200;
container.y=134;
addChild(container);

var myLoader:Loader = new Loader();
myLoader.load(new URLRequest("features.swf"));
container.addChild(myLoader);

The code in the navBar mc is as follows:
stop();

function buttonClick(evt:MouseEvent):void {
gotoAndStop(evt.target.name);

//users see the hand icon over the button
home.enabled=true;
about.enabled=true;
contact.enabled=true;
galleries.enabled=true;
news.enabled=true;
//set the enable property of the button the user clicked to false
evt.target.enabled=false;

trace ("button click");
trace(evt.target.name +".swf");
this.parent.myLoader.load(new URLRequest(evt.target.name +".swf"));
}
home.addEventListener(MouseEvent.CLICK, buttonClick);
about.addEventListener(MouseEvent.CLICK, buttonClick);
contact.addEventListener(MouseEvent.CLICK, buttonClick);
galleries.addEventListener(MouseEvent.CLICK, buttonClick);
news.addEventListener(MouseEvent.CLICK, buttonClick);

























Edited: 11/23/2008 at 04:01:12 PM by tboornaz

Var In Target Path
How can I assign a var into a target path? This seems like it should work but the alpha is not changing. All my MC's inside map are named to match the labels in the node passed from the XML file. Thanks in advance.


Code:
var myTreeDP:XML = new XML();
myTreeDP.ignoreWhite = true;
myTreeDP.load("xml/menu.xml");
myTreeDP.onLoad = function() {
myTree.dataProvider = this.firstChild;
};
var treeListener:Object = new Object();
treeListener.change = function(evt:Object) {
var menuClk = evt.target.selectedNode.attributes.label;
trace(menuClk);
_root.map[menuClk]._alpha = 100;
};
myTree.addEventListener("change", treeListener);

Target Path For Btn In Mc In Mc?
I am a starting Flash amateur and I am very impressed with this site... wow!
So much to learn...

I have read through the forum and some tutorials, but I can't find my solution. Perhaps I missed it?
Therefor I will try it this way; hopefully someone can help me. The following is the problem:

In my 'main' scene I have a menu (consisting of btn symbols).
When you click on a btn, an external swf file is loaded into a movieClipLoader component (mainLoader). Also, a sub menu appears (ie subMenu1_mc).
This sub menu mc again contains some btns in a mc (sub1_mc).

Now, I can't seem to activate these btns through AS and load the external swf into the loader!

The target option in AS gives me the path:
this.subMenu1_mc.sub1_mc.btnProfiel_btn (the btn IS recognized... and the rollOver state works too).

To me, the logical AS code (in the main timeline) for the btn was as followed:

this.subMenu1_mc.sub1_mc.btnProfile_btn.onRelease = function () {
mcLoader.loadClip("profile.swf",mainLoader);
}

... but of course, this doesn't work. Except for the rollOver effect, nothing happens.

What am I doing wrong? If more specifications are needed, please let me know!

John

About Target Path?
Hi everyone,

I attached 1 obj movie in the main movie such as:

ActionScript Code:
var mb = this.attachMovie("bar",mb1,i++);



when I attach the main movie in main scene

ActionScript Code:
var mcload = this.attachMovie("loader",mcload1,i++);


and I want to use the instant bar in main movie, what should I call?
this.mcload.mb1._xscale ?
I dont know, I try many times, many ways but I always get the same result is 'undefined'.
Please give me a advise, how can I use that instant in main movie.

Thanks,
Best regards,

Target Path
Hello All,


Help Arrrggg targeting path!!!!

If you have a minute I'd like you to take a look at the simple code below.
The code is attached to a button that appear in a movie clip(mc1)
This movie clip is placed on the main timeline or root of the movie.
The first line of code works, it jumps up one level out of mc1 to the main time line and then finds the frame name "storyboard".

on(release){
//_parent.gotoAndStop("storyboard");//ok
_parent.iSB.screenumbers.gotoAndStop("sb3010");//does not work!!!???
}

But that 's not what I want!
On the same main timeline is a second mc2(iSB). Nested inside iSB is a third clip(mc3) named "screenumbers".

But here's what's stumping me for the past several days...

The second line of code is suppose to jump to the main timeline, point to iSB(mc2), then point to iAnswers(mc3), then move to frame label "sb3010". it doesn't.

Look it over and see if you can find the problem.

Any help will be greatly appreciated.



Ike

Why Does My Target Path Not Work?
Hey Y'All,

And happy Friday.

OK, got some weirdness here....I got a graph going on, and want to display detailed information about specific points on the graph when the user hovers over the points with the mouse. However, I get the feeling I've got too many nested movie clips, and that Flash can't work out the correct target path to populate the text boxes with the right information from the arrays I'm using.

This line should do it, but doesn't:


Code:
//populate InfoBoxes
for (n=0; n<=LongDolPlotArray.length; n++) {
_root["LongLabel"+n].InfoFloater.InfoText = "Sector: "+SectorArray[n]+";"+" Proportion of Assets: "+LongPercentArray[n]+"%";
}
...where there are several levels of movie clip nested within each other. InfoText is also a movie clip that contains a dynamic text field.

LongLabel contains a button determining user interaction as follows:


Code:
on (rollOver) {
gotoAndStop(2);
ColumnShade.gotoAndStop(2);
InfoFloater._xscale = 200;
InfoBg._xscale = 200;
InfoFloater._x = _xmouse;
InfoFloater._y = _ymouse-10;
InfoBg._x = _xmouse;
InfoBg._y = _ymouse-10;
}
on (rollOut) {
gotoAndStop(1);
ColumnShade.gotoAndPlay(3);
}
So, when you roll over a section of the graph, ColumnShade highlights that section, and InfoFloater and InfoBg follow the mouse and should display the appropraite data. The rest of it works fine, except for displaying the data!

Any clues? As far as I know, there shouldn't be a limitation to nesting clips, so I'm assuming my target path is incorrect.

Thangyouverymuch
Lassi

Target Path Confusion
I'm loading a movie (prod.swf) into another movieclip named "theClip" which is in the movie default.swf. I'm using theClip as a stage to contain movies,...right.
The movie I'm loading into theClip has a preloader. How do reference the getBytesLoaded() or getBytesTotal() of prod.swf?

String To Target Path
Hopefully this is an easy one. I just can't seem to figure it out.

I have a string that describes a target path. Ex: "_root.shapes.square". How can I make that string useful so that I can get/set properties with it?

Here's essentially what I'm trying to do:

var myString = "_root.shapes.square";
trace(myString._x);

But that syntax returns nothing. Likewise:

trace([myString]._x);

What am I doing wrong?
Thanks, Justin.

No Target Path To Choose From?
I am a total novice running through a "basics" actionscript tutorial.

I am trying to add button actions to shift a movie in the library. My problem: when i go to insert target path the only movie for selection is _root. I have a clip eyes in another layer but cannot select it. If I type in the path as I think it should be. The debugger tells me the object does not exist.

What am I doing wrong?? It must be simple as I have only created one scene, 4 graphic layers, a navigation layer and an actions/labels layer.

Any Ideas would be greatly appreciated. I can get the whole movie to shift but not the clip I want to shift.

Thanks in advance I've read many tutorials without success.

Mike

Using Variables In A Target Path?
how do I put a variable into a target path?
for example
_root.myMovie._x, but I want to do this to different myMovie files, eg.
myMovie_1,
myMovie_2
etc, and I have a variable var s = 1
eg. the number that changes for each movie. Is it then
_root.myMovie+s._x?
or what???
thanks, and I hope this is not a stupid question.

Target Path Question
Hi!!

I am i my main swf and i would like to target a mc in a external swf.
So my external swf load in a blank mc in my main swf why is the script to control a mc in a external swf..

ex is not good so cheeck this

wood.swf.wood1.gotoAndPlay ("done"); look like this maybe!!! i don;t know

Specifying Target Path With Buttons
i have a movie clip inside a button, and when the button is released i want the movie clip to play

the button's name is "laughbutton", the mc's name is "laugh" (i gave them those names, those aren't the library names)

on(release){
this.laugh.play();
}

doesn't work, which i tried originally, and

on(release){
_root.laughbutton.laugh.play();
}

doesn't work either. is it true after all, that like flash 5, mx can't do target paths through buttons?

Target Path Arrrrggg
Help Arrrggg targeting path!!!!

If you have a minute I'd like you to take a look at the simple code below.

The code is attached to a button that appear in a movie clip(mc1)
This movie clip is placed on the main timeline or root of the movie.
The first line of code works, it jumps up one level out of mc1 to the main time line and finds the frame name "storyboard".

on(release){
//_parent.gotoAndStop("storyboard");//ok
_parent.iSB.screenumbers.gotoAndStop("sb3010");//does not work!!!???
}

Also, on the same main timeline is a second mc2(iSB). Nested inside iSB is a third clip(mc3) named "screenumbers".

But here's what's stumping me for the past several days...

The second line of code is suppose to jump to the main timeline, point to iSB(mc2), then point to iAnswers(mc3), then move to frame name "sb3010". it doesn't. I have used this code many times before.

Look it over and see if you can find the problem.



Ike

Target , Path Problem
hi all,
can u pls help me.....
i have main.swf 6 buttons & calling external swf all at level 1 & main.swf is at level0...in one of my swf named multimedia.swf i have 6 different label... for 6 buttons placed at main.swf......
i want to give a path i tried doing it by
loadmovienum.......
but i am not able to solve a problem when i click the button it plays the animation with first label but when i click on second button the second label animation should appear but it plays the 1st label animation???????why is this????????is it bcoz after each label stop is there......
pls can u help me ?????????????
thanks......
help appreciated.......
amrapali

(MX) External Swf Target Path...
heres the idea...

I am importing an external swf into an empty movie clip in my main movie on keypress. In this swf I have a preloader to show how much of another external swf has loaded when the user pushes on a button. How would I target this preloader in my main movie?

greg

Target Path On Flashkit
hi there used to be on flashkit a swf that someone made to make it easy to know what's your target.

the old link was

http://www.flashkit.com/tutorials/Ti...87/index.shtml


and now that link is no longer working.

anyone know where the new one is?

when i do a search for target path i come up with zero.

thanks
pixi

Can't Get A Target Path To Work...
Hi folks, I'm trying to control a movie timeline to loadmovies via a seperate controling mc, I clicke the next button, and it has the code: on (release) { _root.acontrol.nextFrame(); }

and the "acontrol mc has 12 frames the first one containing a stop;
and all subsequent frames holding: stop;
loadMovie.("moviename.swf", aloader);

acontrol being the control mc and aloader being the target, what I end up with is the movies being loaded into the control mc rather than the loader mc.

Any help would as always be very appriciated.


Cheers

Anything Wrong With My Target Path?
Let's say I have a movie clip in "A" movie. I wanted to load "B" movie to an empty movie clip. On the first frame of "B" movie, I have this script:

_root.gameLevel = "1";
function check() {
_root.temp1 = _root.gameLevel; //_root.temp1 is a dynamic txt field on the _root of movie "B";
}
_root.check();

When I tested movie "B" independly, it works. But when I test movie "A" (it'll load movie B into an movie clip), the text field couldn't show anything.

Can't Figure Out What The Target Path Is
Ok I have a main .swf that loads up a separate swf named tent_bdy.swf.
tent_bdy.swf has a movieclip in named ts2 which contains a button. The button points to a named frame on the main .swf. I've tried every target path I could think of to no avail. Please sombody help!


Jason Harle

Target Path Question
Hi,

Can someone have a look at this flash file and tell me why the values of _root.count and _root.clipheight in the track movie on the main timeline aren't getting back to the code on the main timeline?

I've tried the target path generator to no avail, feel like chuckin the whole lot outa the window!

From there I want to do some simple math to get the scrolling working properly, but I need to get the movieclip talking to the main timeline first.

Can someone please help me?

File.zip

Target Path Problem
I have a simple question here.

I have a movie clip of a deck of cards, 56 frames long. I have given each card a specific frame. I put this animation in a new folder on the timeline. Now, on my top layer I can't figure out what to write to make the deck goto a specific frame and stop.

The target path to the deck is: _level0.2_1_mc

I tried the code _level0.2_1_mc.gotoAndStop(25);, but it didn't work.

However I have a movie clip outside of the folder on the top layer named deck1_mc, and the code deck1_mc.gotoAndStop(23); works.

What code do I have to use to make the movie clip inside of the folder go to a specific frame from the top layer?
--Blatex24--

Tell Target Path Problems
Hello,
I have a site i am building, and i'm having some problems with something i sure somebody has an answer too....thanks ahead of time.
I have broken the site into seperate .SWF files (_level1) that load into a main "frame" .SWF (_level0).
I have buttons that target MC's when the user rolls over them. Everything works fine up to this point. The published SWF works just as suspected........BUT when the same SWF file loads into the main "frame" SWF the buttons doesn't work? I feel like i'm floating in twilight zone...:-0
I realize there must be some type of path issue, but i can't figure it out...If anyone could help, it would be greatly appreciated.

thanks
frenzy

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