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!
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-28-2002, 11:10 AM
View Complete Forum Thread with Replies
Sponsored Links:
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 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
View Replies !
View Related
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!
View Replies !
View Related
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?
View Replies !
View Related
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!
View Replies !
View Related
[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
View Replies !
View Related
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);
View Replies !
View Related
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.
View Replies !
View Related
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
View Replies !
View Related
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?
View Replies !
View Related
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
View Replies !
View Related
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);
View Replies !
View Related
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
View Replies !
View Related
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,
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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?
View Replies !
View Related
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.
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
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
View Replies !
View Related
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?
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
(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
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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.
View Replies !
View Related
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
View Replies !
View Related
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
View Replies !
View Related
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--
View Replies !
View Related
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
View Replies !
View Related
Target Path Serious Troubles
ok, this is truly mind boggling so bear with me, i really hope i am just missing some small nugget, cause i have never had trouble like this in all the yeas i have been working with flash.
i have a movieClip onstage called bgPics in the first frame of the movieClip is has a stop action. i can put a button on the main timeline with bgPics and put the script
on (release) {
with (bgpics) {
play();
}
}
and the output window tells me that the specified object does not exist, i even used the "insert target path" button in the script window. however, when i copy and past the movieclip and button into a blank movie and test it, it works fine, without changing anything. it was working fine before, and now it is not. i am about to have to rebuild my whole movie to sort this out, i REALLY do not want to go to that extent.
View Replies !
View Related
Target Path Trouble
Hey people...
I was wondering if I could get an assist with this scroll problem I'm having.
I have a dynamic textfield called blog1
an up and a down button that is supposed to scroll the blog 1 textfield when they are rolled over. The buttons are contained in movie clips.
The blog1 textfield and the movie clips that contain my buttons are all in a movie clip called "chooseblog".
"Chooseblog" is in a movieclip called "blue_mc"
On an actions level in chooseblog I load the .txt file that populates blog1 with this command:
this.loadVariables("blog.txt") and I show the text using this command:
blog1 = blogtext.
The file is loading just fine into the textfield but the scroll isnt working.
In order to scroll I'm using:
on (rollOver) {
chooseblahg.blog1.scroll--;
}
and
on (rollOver) {
chooseblahg.blog1.scroll++;
}
I'm pretty sure I just have no idea what I'm doing with the target and reciver paths for this. Can someone please help?
View Replies !
View Related
How Do I Add Onto _root Target Path?
Hi there, this seems like an embarrasing question to ask...
I'm trying to use the " telltarget" action, but I forgot how to add onto the _root target path, since my movie clips don't show up under _root in the Insert Target Path window. Am I missing something obvious?? Pls help! thanks~
View Replies !
View Related
Target Path Trouble
We have a project here where we need to get a movie to play a certain frame, and it's not happenning. Here's the deal: In the main timeline, lies a movie clip ("argue") that advances frame-by-frame as the user types, revealing new images every keystroke. On certain frames within that movie clip, we want a different movie clip ("boil_mc"), in the main timeline, to gotoAndPlay certain frame labels. We know that we need to use _root.boil_mc but we just can't get any script to actually make this happen. Totally frustrating. Any help here would be greatly appreciated. Thanks.
twiggarts
View Replies !
View Related
Component Target Path
What would the target path be to a movie clip within the scrollPane component.
example: trying to target ScrollUpArrowUp movieClip in the scrollpane component. I have the linkage identifier set as "ScrollUpArrowUp" and I have give and instance name to my component. I'd like to set the color value of specific movie clips in the component dynamically. I can't seem to figure out what the target path would be. please help. Thanks!
View Replies !
View Related
Target Path Problem
Hi
I am loading a swf to a container mc like this:
_root.container.loadMovie("my.swf");
the problem is all the fuctions that I have in "my.swf" stop working becuase target path changes to something like this for example:
_root.container.mc1 (before it was _root.mc1!).
therefore I was wondering is there a way to fix this problem without having to change all my paths in "my.swf".
Thanks
View Replies !
View Related
Target Dynamic Path
Hi guys
Got a problem with a dynamic path. Maybe you can help?
I need to target a movieClip in another level. The level is'nt allways the same, and therefore I would like to put the level into a variable. This doesn't work quite like I intended it to. Is there a way to do this, or can't this be done?
I have made an example benieth, that i hope explain, what I'd like to do:
Code:
for(var i:Number = 0; i < 5; i++){
level_array[i] = ("_level" + (i+1))
}
level_array[i].my_mc.play();
View Replies !
View Related
[F8] Target Path Problem
Does anybody know which is the right path inside this function?
PHP Code:
for (var i = 1; i<=8; i++) {
var t:MovieClip = icons_container["serv_mc"+i];
t.onRollOver = function() {
t.icon_serv.gotoAndPlay("s1"); //this is not working!
//icons_container.serv_mc1.icon_serv.gotoAndPlay("s1"); //this is working!
};
}
(icon_serv is a movieclip inside the serv_mc)
please help!
View Replies !
View Related
Target Path Problem
how to target the mc inside the loaded mc? let's say in main.swf i load child.swf, in child.swf i have a movieclip inside it with an instance name of animation_mc. from main.swf i was able to control animation_mc but the problem is i can't control the movies inside animation_mc. please help.
View Replies !
View Related
Target Path Problems.....
I have several functions on my root timeline, but when i try to call them on a button press nothing happens, not even trace works.
there is one major MC on the main time line called "navbar" and within it anohter MC called "lmvcar" and im trying to get the lmvcar movie to work
heres the function on the maintimeline:
Code:
function plyCar() {
trace (lmvcar._currentframe);
if (_root.navbar.lmvcar._currentframe == 1) {
_root.navbar.lmvcar.gotoAndPlay(2);
}
if (_root.navbar.lmvcar._currentframe == 7) {
_root.navbar.lmvcar.gotoAndPlay(8);
}
if (_root.navbar.lmvcar._currentframe == 15) {
_root.navbar.lmvcar.gotoAndPlay(16);
}
if (_root.navbar.lmvcar._currentframe == 25) {
_root.navbar.lmvcar.gotoAndPlay(26);
}
if (_root.navbar.lmvcar._currentframe == 31) {
_root.navbar.lmvcar.gotoAndPlay(32);
}
}
heres the code im using to call it on a biutton press:
Code:
on (press) {
plyCar();
}
am i missing something here? cause i dont know what else could be wrong with it
View Replies !
View Related
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
View Replies !
View Related
Target Path Problem (i Think)
Hi,
I have the following code in Frame 1 of the main timeline:
mcMain has frame labels - home, contact, about and gallery.
Code:
this.onLoad = function() {
import mx.transitions.*;
import mx.transitions.easing.*;
lastButton = "home";
maxScale = 125;
minScale = 100;
var pointerTween:Tween = new Tween(mcPointer, "_x", Bounce.easeOut, mcPointer._x, home._x, 1, true);
home.onRollOver = contact.onRollOver=about.onRollOver=gallery.onRollOver=function () {
var buttonTween:Tween = new Tween(this, "_xscale", Strong.easeOut, minScale, maxScale, 1, true);
};
home.onRollOut = contact.onRollOut=about.onRollOut=gallery.onRollOut=function () {
var buttonTween:Tween = new Tween(this, "_xscale", Elastic.easeOut, maxScale, minScale, 2, true);
};
home.onRelease = contact.onRelease=about.onRelease=gallery.onRelease=function () {
var pointerTween:Tween = new Tween(_root.mcPointer, "_x", Bounce.easeOut, this._parent[lastButton]._x, this._x, 1, true);
lastButton = this._name;
//mcMain.gotoAndPlay(this._name);
pointerTween.onMotionFinished = function() {
mcMain.gotoAndPlay(this._name);
};
};
};
The part in RED is the bit that is not working. If i replace (this._name) with the frame label or number, it works. If i replace the this part with the button name it works. Basically i want mcMain to goto and Play a label with the same name as the button pressed. If i put the code (shown in blue) where it is the mcMain does what it is supposed to, but i what it to go to the label after the tween has stopped.
Any help would be greatly apreciated, before i go nuts!
Thanks,
Andy
View Replies !
View Related
Target Path Issue
Here's my nested movieclips...
stage(root)-->lessonPanel(mc)-->panelAnimation(mc)-->begin_btn(mc told to be button)
i have _splash.as files attached with all my functions to the main timeline...
i'm trying to call a function from the lessonPanel movieclip and right now my code looks like this:
enableButtons(panelAnimation.begin_btn, splashBegin1);
obviously the name of my function is enableButtons.
this will enable a button, add an event listener etc.
i'm gettin error 1180- call to a possibly undefined method -enableButtons....its not undefined so is my file path wrong?
then i get error 1120 access of undefined property- splashBegin1
PLEASE HELP! Thanks...i know its something with this new AS3 thing!
HAPPY THANKSGIVING
View Replies !
View Related
XML Object's Target Path
I'm new to ActionScripting, and I'm stuck.
I have an XML object which is created inside a method of a class. When the XML file loads, I would like XML.onLoad to call another member of said class, but I'm not sure how to do so, since onLoad is a method of the XML object, and I don't know how to get the target path of the method which created the XML object.
I hope that makes sense.
here's a sample of the code, which has been simplified a bit:
newGraph = new GraphClass("data.xml");
newGraph.loadXML();
//////////////////
GraphClass = function (datafile) {
this.datafile = datafile;
}
GraphClass.prototype.loadXML = function () {
this.dataFile = new XML();
this.dataFile.onLoad = function (success) {
if (success) {
/******************
here, i would like to call the method GraphClass.prototype.sayHello() from the instance newGraph
but I can't type "this.sayHello()" since "this" is refering to
dataFile, not newGraph
******************/
}
};
this.dataFile.load(this.datafile);
}
GraphClass.prototype.sayHello = function () {
trace("Hello");
}
If someone could tell me how to call sayHello() from the GraphClass instance newGraph, I would be a very very happy little programmer.
thanks in advance for at least trying to decypher my code, I hope it's not too confusing!
View Replies !
View Related
Loadmovie Target Path
Hi guys,
simple problem im sure but its really troubling me.
I have a button on a page which on release makes a movie container and loads a movie into it. The swf loads fine but i want this laoded movie to set a variable flag in the main movie which houses the button to indcicate that is has finihsed playing but i cant work out how to referrence the holding movie or SUPER root !
PLEASE help, many thanks in advance
Drew
View Replies !
View Related
Problem With Target Path
I'm placing an action in a movieclip timeline (instance name "controller") inside another movie clip placed on the main timeline (instance name "preloader").
The action should be like: this._parent._parent.gotoAndStop(2), but when I use the "insert a target path" button on the action script panel, the path is not correct, and flash write this.gotoAndPlay(2). Every movie clip has its own an unique instance name, and the document is saved. In order to work, I have to write the path by myself.
I'm using flash CS3.
Any ideas?
Thanks in advance
View Replies !
View Related
Target Path To A Movieclip In AS3
Hello,
In AS2, I would do this to store a reference to a movie clip:
var mc_mymovieclip:Movieclip = _root.mc_world.mc_continent;
Thereafter, I could use mc_mymovieclip in my class.
In AS3, doing the same thing does not work.
How can I do that (if possible) ?
Best regards.
View Replies !
View Related
Relative Target Path
Hi,
I just switched to Flash CS3 on the Mac (used to work on Flash MX for PC). When I click on the "insert target path" in the actions window, and then click on the radio button for "relative", I get what looks like a reference that begins with "this." followed by a path that looks like from the root down to the current child mc.
If I choose the "absolute" radio button, I get pretty much the same path, except that the "this" is replaced by "_root."
Am I just not setting preferences correctly? Is there something I'm missing.
Thanks in advance.
View Replies !
View Related
|