Tell Targeting An Mc On Main Timeline
hello people,
i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.
my code is:
on (release) {
_root.crystal.gotoAndPlay("editions");
}
but it only works when the crystalMC is on the first frame of the root.
is there a way of telling the root to move to the position of the first mc and then play a label inside that mc?
any help greatly appreciated
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 06-30-2004, 05:57 AM
View Complete Forum Thread with Replies
Sponsored Links:
Targeting The Main Timeline.....
Im having trouble altering which frame the main timeline is on via a button thats within and mc on the main timeline.
So yeah, ive tried having a telltarget that points simply to "_root." and then says gotoAndPlay (260)
I also tried something like
On release
_root.gotoAndPlay (260)
and still it doesnt work.
So how, from a button inside an mc on the main timeline, do i change the frame that the main timeline is on?
Grexen
View Replies !
View Related
Targeting Main Timeline
Greetings everyone!
I wonder if anyone can help me, I am trying to tell scene 1 (the top scene) in my Flash movie to go to frame 1 by using a button within a movie.
I am using Flash 5 and I know that the command is quite simple but I've completley forgtotten it and can't remember! Please can someone let me know how?
Many thanks
SA
View Replies !
View Related
Targeting MC From The Main Timeline
on my main timeline i have movieclips (with instance names) which set a choice when clicked.
on a seperate AS layer in the main timeline i have:
MCbutton1.choice = 0;
MCbutton2.choice = 1;
MCbutton1.onPress = MCbutton2.onPress=setChoice;
setChoice is a function which does several things, including:
image.unloadMovie();
choice = this.choice;
gotoAndPlay(2);
they work fine.
now, basically, i want to have a 3rd button set the choice as 3, but i want that movieclip-button to reside inside another MC. (so in other words, the instance name of MCbutton3 would be located inside the "Container" MC, which is located on the main timeline).
i have tried setting this up, but it's not working for me. how would i write the 3rd button into the main timeline code ?
i've tried this, but no luck:
MCbutton1.choice = 0;
MCbutton2.choice = 1;
_root.container.MCbutton3.choice = 3;
thanks for any help!
View Replies !
View Related
Targeting The Main Timeline
Trying to make the switch from AS2 to AS3 and like many before me, becoming confused.
I've laid out three movieClips on my main timeline (named, "main") and spaced them five frames apart, nice and tidy, like I like to do. Each frame on the main timeline containing a movieClip has been given a unique frame label. My problem is, I want to have the movieClips jump to the next targeted movieClip on the main timeline after clicking a button, or upon entering the last frame of its predecessor, in some cases. In AS2 the was easy to do this was by using the gotoAndPlay function and targeting to the_root timeline. Now I can't figure out what to do. I can make any button inside a movieClip target a specific frame within that same mc, but cannot make a jump to the main timeline to play the next movieClip.
What am I missing here? I'm a noobie at AS3 and fumbling my way forward. (should be obvious now) Is there a simple way to refer back to the main timeline, which is only one level up? What am I missing?
Here's as far as I got with the AS3 code within the mcs:
stop();
cont5_mc.addEventListener(MouseEvent.CLICK, onClick2);
function onClick2(event:MouseEvent):void
{
trace("test");
}
cont5_mc.buttonMode = true;
The trace function runs true so it's a matter of telling the player how to get to the main timeline and frame label.
TIA for your help, all you flashy genius . . . Speak to me like I am a three year old. -grin-
thokitts
View Replies !
View Related
Tell Targeting An Mc On Main Timeline
hello people,
i have a problem with tell targeting. basically i have two mc on the main timeline and one(MC1) has a button burried in it. i want that button to tell the other mc (crystal) to play a label "editions" inside it.
my code is:
on (release) {
_root.crystal.gotoAndPlay("editions");
}
but it only works when the crystalMC is on the first frame of the root.
is there a way of telling the root to move to the position of the first mc and then play a label inside that mc?
any help greatly appreciated
View Replies !
View Related
Same Old Targeting Main Timeline Problem
Hey,
This should be working but it doesn't..
I have 1 scene with 2 movie clips. one movie clip is nested inside the other one. When the timeline of the 2nd nested movie clip reaches its end, i want it to go back to Scene one on a frame i've labelled "home".
I have:
tellTarget ("_root.") {
gotoAndPlay ("home");
}
instead of doing so, it just loops over and starts playing in that same movie clip.
this is getting frustrating! i know it should be something easy to do.
thanks
View Replies !
View Related
Targeting Main Timeline From External .swf
I am creating a looping movie that will load external .swf's into an empty movieClip (display_mc). I want to be able to have the external .swf target the main timeline once the .swf ends. I am putting script on the last frame of the external .swf attempting to target a specific frame on the main timeline. However, it isn't functional. Any suggestions on how to accomplish this will be greatly appreciated.
Sample Code:
MainTimeLine - Frame 1 = _root.loadMovie("external.swf",display_mc);
ExternalTimeLine - LastFrame = _parent.display_mc.gotoAndStop("frame");
View Replies !
View Related
[F8] Targeting Main Timeline From Movieclip
Does anyone know how you would target the main timeline from a movie clip placed on the main stage? I have one of those news / text scrollers as a movieclip placed on the main stage with buttons inside of it—I want to have that button load a .swf into a container on the main timeline outside the movieclip, is this possible? Thanks for the help.
View Replies !
View Related
Targeting MC On Main Timeline From An AS File
Here's the setup. I have two MC's on the main timeline. Also on the main timeline, I am creating an object from an external class. I would very simply like to control the "visible" property of the two MC's from the new object. How do I reference these MC's in the class's file? I've tried using "parent.next_mc.visible", but I'm not getting there. Any suggestions or do I need to include more info?
View Replies !
View Related
Targeting The Main Timeline From Loaded Swf
Hi everyone
well I have an swf that loads an external swf with this code:
loadMovie("Portfolio_1.swf",0); [so far so good!]
but now from inside Portfolio_1.swf I want to go back to the main
timeline to "Scene2, porfolio" (name of scene,frame)
...so I used this code on in a frame targeting the back button in Portfolio_1.swf coz I
thought it would take me to the main movie on frame "portfolio"
code:
Code:
back_btn.onRelease=function() {
_parent.gotoAndStop("Scene 2", "portfolio");
}
PLEASE HELP...!! Thanks
View Replies !
View Related
Targeting Main Timeline From AttachMovie (help)
'ello 'ello!
I'm working on this project, where i attach movies to an empty movieclip. In these attached movies, i have a button that needs to target a function on the main timeline.
Example:
on the main timeline, i have an action that loads a bitmap onto the background: loadBitmapSmoothed("background.jpg",bg_con);
On the main timeline, i also have a button with following action:
on(release){
this.mc_holder.attachMovie("MC_products",1);
}
Then, in the attached movieclip i have a button that needs to swap the image previously loaded into the 'bg_con'-movieclip, like thus:
on(release){
_root.loadBitmapSmoothed("product_1.jpg",bg_con);
}
For some reason, this doesn't work. I've also tried using _level0. but nothing happens. Any good ideas anyone?
Any help is welcome, i shall bow in respect to anyone who might come up with a solution.
cheers
Mikz
View Replies !
View Related
Targeting Main Timeline From A Higher Level
Hello,
Does anyone know how to target the maintime from a movie loaded into level 1? I want the main movie to go to frame 3 when I click a button in an swf loaded in level one. I tried saying:
blahblah_btn.onRelease = function() {
_root.gotoAndStop(3);
}
This code is on the timeline (actions layer) of the movie in level 1. It doesn't work. The main movie still stays in frame 1. Do I need to specify level 0 somehow? How do I say this?
Thanks!
Mary
View Replies !
View Related
Targeting Movie Frame From Main Timeline
Hello,
How do I call up a specific frame in a movie clip from my main timeline? My movie clip instance is called 'menu' and the frame I want is 2.
I don't really understand _level,_target,_root, or _parent commands and have not loaded the movie in any special way other than dragging it onto the main timeline.
Any help would be greatly appreciated.
Thanks
View Replies !
View Related
Targeting A Movieclip's Frame From The Main Timeline
Hello,
As stupid as it might seem. I am having a lot of trouble in targeting a movie clip's(that is placed within the main timeline, scene 1) specific frame from a bottom that exists in the main timeline.
I have created a button, and I want to make the button(placed on the main timeline, scene 1 - not nested) simply to goandplay a movie clip. Yet somehow nothing occurs.
Here is the code for my button. "movieClip1" is the name of an instance of my movieclip called "Intro". the number 115, the frame I want it to start at.
on (release) {
_root.movieClip1.gotoAndPlay("115");
}
Can someone please help me?
Thank you
Jaime Nacach
jaimenacach@yahoo.com
View Replies !
View Related
Problems Targeting Main Timeline From Within Movieclips
Hello there,
I am trying to modify a slidemenu script but don't really know how to accomplish it. The sliding menu is horizontal and slides each direction according to the mouse position. Basically, all I want is for the thumbnail photo buttons in the menu to open the corresponding photo larger above the menu. I have a series of buttons within three mcs. (this is necessary for the sliding script to work). In the original script, the button name is targeted to a label with the same name in a new scene.
The code on the button is:
on (release) {
gotoAndStop("/:" add eval("..:text"));
// THIS goes to the FRAME with the name of the button you just clicked on.
}
The MC code is:
// --------------------------------------------
// tmi=total menu items
// dup=new movie duplicates
// butn=original movie button
// --------------------------------------------
// FIX original Button:
butn:text = /:Menu0;
while (Number(n)<Number((/:tmi*2)-1)) {
n = Number(n)+1;
dup = "butn" add n;
duplicateMovieClip("butn", dup, n);
setProperty(dup, _x, Number(getProperty(dup, _x))+Number(n*getProperty(dup, _width)));
setProperty(dup add "/b", _x, getProperty (dup add "/b", _x) + (1));
set(dup add ":n", n);
// assign button name from variables
if (Number(n)<Number(..:tmi)) {
set(dup add ":text", eval("/:Menu" add n));
} else {
set(dup add ":text", eval("/:Menu" add (n-/:tmi)));
}
}
The problem I am having is that I don't want to go to a new scene ( because I am only loading photos) but would like to target a label on the main menu. I have tried many ways including (my label is named "one"):
on (release) {
_root.gotoAndStop("Main" "one");
}
on (release) {
_root.gotoAndStop("one");
}
on (release) {
gotoAndStop("Main" "one");
}
on (release) {
_level0.gotoAndStop("one");
}
But none of these work. There must be a way to do this no? Please someone enlighten me! I have been going crazy for three weeks now trying to figure this out.
Thanks very much for your support,
Niki
View Replies !
View Related
Targeting A Frame Label On The Main Timeline
Hi guys,
basically, i have made a menu (a movieclip) to navigate around a small application i am using, and i would like the links in this movieclip to point to various frame labels on the main timeline.
I have tried to use the
Code:
parent.movieclip.gotoAndPlay("frameLabel");
command inside the function that has the CLICK event listener attached to it, but for some reason it will not do it!!
i hope this makes sense and any help will be greatly appreciated!!
Thanks in advance
Rob
View Replies !
View Related
Targeting A Frame Label On The Main Timeline
Hi guys,
basically, i have made a menu (a movieclip) to navigate around a small application i am using, and i would like the links in this movieclip to point to various frame labels on the main timeline.
I have tried to use the Code:
parent.movieclip.gotoAndPlay("frameLabel"); command inside the function that has the CLICK event listener attached to it, but for some reason it will not do it!!
i hope this makes sense and any help will be greatly appreciated!!
Thanks in advance
Rob
View Replies !
View Related
Buttons Within Movie Clips, Targeting The Main Timeline
I have five buttons (1-5), in a movie clip (MC1). I want the buttons to go to frames on my main timeline--NOT within the MC1, but I am having a problem with it.
Currently I use:
on (Press){gotoAndPlay(frame);}
but this plays the frame within the movie clip, not on the main timeline.
I am sure there is a simple solution to this. Any help would be greatly appreciated.
Thanks,
shotbot
View Replies !
View Related
Targeting Btns From Main Timeline Frame Script
Hello,
I'm trying to put my actions on the first frame, rather than on the buttons themselves. In this below example, the soundOff btn works, but the soundOn doesn't. (works fine when I attach the script to the button)
code:
//sound off button
this.sound_mc.soundOff_btn.onRelease = function()
{
_root.sound_mc.gotoAndPlay(2);
stopAllSounds();
//updateAfterEvent();
};
//sound on button
_root.sound_mc.soundOn_btn.onRelease = function()
{
_root.sound_mc.gotoAndPlay(1);
miltSound.start(0, 9999);
//updateAfterEvent();
};
(soundOff_btn is in the first frame of the sound_mc movie clip, while soundOn_btn is in the 2nd.)
I've used the targeting built into the actionscript window (so I know I'm not typing in anything wrong), tried absolute instead of relative, but it's not getting the message. Thanks for any tips!
View Replies !
View Related
Targeting Sections In Main Timeline From Separate Menu SWF?
Hello,
Site: http://leayah.com/leayah2.html
Not entirely new to Flash but still learning Actionscript.
I made a site, but the menu isn't loading properly. If you reload the page the menu loads, but not sure why not loading every time.
Right now menu and site sections in main SWF file. Maybe I put the menu into a separate SWF file it would load properly?
If the site sections are in the main SWF timeline, then how do I do the actionscript for the menu buttons?
Ie)
menu in level7
main site in level0
site sections are "product section", "about us section", "glossary section" on main timeline
So I'm not loading any SWFs, just moving between sections on main timeline.
Help please...
View Replies !
View Related
Targeting A Frame In The Main Timeline Of The Root From An Externally Loaded Movie
Hi! I'm trying to target a frame called "home_portfolio" on the main timeline from a loaded swf. Here's the code on the portfolio button:
on (release) {
tellTarget ("_root") {
gotoAndPlay("home_portfolio");
}
}
On the "home_portfolio" frame is an action to load the portfolio movie. However, it ignores this.
After reviewing some of the other posts I've changed the code on the portfolio button to be"
_root.gotoAndPlay"home_portfolio"
yet when I publish the swf the output says
Symbol=_bottom nav, Layer=text, Frame=1: Line 1: ';' expected
_root.gotoAndPlay"home_portfolio"
I don't understand why either one of these codes won't work. Can you help? Thanks so much
View Replies !
View Related
Referencing Clips On Main Timeline From My Main Document Class
Hi All,
I'm trying to reference clips on the main timeline either in or via my main Document class, but if I declare any clips as public in the class body as I would have done is AS when linking an external class, I get:
Code:
1151: A conflict exists with definition tfLength in namespace internal.
If I don't declare the clip, then I can reference it from within the same class with this.tfLength, but other classes complain it the Document classes tfLength variable doesn't exist!
So how do I reference a clip on the timeline in my class?
Thanks,
Dave
View Replies !
View Related
Controlling A Movie Clip's Timeline Separately From Main Timeline
I've got a problem here that I've been trying to figure out for a while now, and it seems like it should be way easier than this. Here's what I've got:
I'm trying to make a neato little flash swf with lots of buttons that you can push and another little movie clip will show some little animation.
I thought I could get this done pretty simply by making a bunch of buttons, giving them an over, down, hit, sound, etc. and then having one single movie clip do all of the animations, but cleverly use stop(); and gotoandplay();
I have tried a few different ways, searched through the help & tutorials, looked all over forums on the internets, and I still can't get this to work. The main timeline is really just 1 frame, and its only purpose is to just hold all of the buttons. I have given all of the buttons instance names (ending with _btn). There is a separate layer in the main timeline for the actionscript alone, and was hoping to put all of the gotoandplay commands there. The code that I am trying to use in that frame is:
Code:
this.WV_btn.onRelease = function(){this.productzmovie_mc.gotoAndPlay(2);
};
The productzmovie_mc has a command to stop(); in the first frame, and I am trying to get a button to skip to the next frame to get it going. I put a stop(); on the last frame of that animation so that it won't run through the whole thing on the first button press. If I remove that stop(); on the first frame, the whole animation just runs whenever I test it and the button has no effect.
I thought this would be way simpler than making 25 separate movie clips and hiding them or spawning them. Does anyone know what I could be doing wrong here? This seems like a pretty simple operation, and I am probably screwing up some mundane detail (I always do that). Be gentle, I am trying to learn Flash and I am a bigtime n00b. I can post the .fla if you need to see it, but it's pretty simple so far, just lots of buttons.
Thanks!
View Replies !
View Related
ActionScript Differences Between Main Timeline And Movie Timeline?
Hello,
Could someone explain the difference if Action Script is on the main timeline or in a movie clips time line which is on the main timeline?
I guess I mean is with regards to referring to other items or movie clips or external scripts etc.
To try and clarify what i'm going on about....
I have a form that uses a php script. The form.swf is brought into my main movie with 'loadmovie' action script.
When the form.swf is run on its own it works. When someone enters the info and hits 'send' the form gets what it needs from the php script and then goes to a 'sucsess' frame. Great.
But..
When the form.swf is run from within my main movie and someone hits 'send' the form goes to my 'fail' frame (even though it is sending the email), the php script is returning a 'fail - invalid email entered' message to the flash form (the email was valid though!!).
Because the form.swf works on its own I'm guessing that, when loaded into the main movie, i need to add something to make it talk to the php properly.
The odd thing is that it must be talking to the php as it is sending the email!!! So why is the php sending back a 'fail' and not a 'success'.
It could be that the form.swf is just not getting a response from the php and so it going to the fail frame. In which case, if my form movie is within my main movie what do i add to the php (or action script) to receive the info to the nested movie.
I cant work it out.
Thanks soooo much for your help.
Julian
View Replies !
View Related
Play Movie In Timeline But Keep Main Timeline In Place
Hello,
Scenerio: You are at frame 1 of the timeline and it's stopped, you hit a button and it jumps you to frame 20 and then at frame 20 a movie clip plays.
Question. Can I have that movie play for however long I want (let's say it's a 100 frame movie) BUT have my main timeline still sit on frame 20? And then when the movie is done playing it goes to frame 21 of the main time line? Currently I have to make my main timeline be the same length as any movie I have in it, and so my main timeline ends up being an absurdly long.
Just a general answer will help - which action scripts would I be looking to use (I'm using Flash 8 Pro)?
Thanks
View Replies !
View Related
Movie Clip Timeline Vs. Main Timeline
Ok, i have made a movie clip in Swift 3d and have imported it into Flash MX. Now it is in the first frame as flash will place it there and what i would like to have happen is to tell frame 1 that when the movie clip's timeline ends and stops(frame 90) to then move the parent timeline to continue with stuff
If any one reads this please help or refer me to a MX book that is worth the valuble time we think we have!
Mike
View Replies !
View Related
Movie Symbol Timeline & The Main Timeline
Hi guys,
There is the frame in my main timeline which has a movie symbol and when the timeline heads reaches & stops at this frame & start playing the movie symbol timeline, i want that when the timeline head reaches at the end frame of the movie symbol timeline, it should take me to the any frame number/label of the main timeline i want.
I tried adding the action to the end frame of the movie symbol to take me to a different frame of the main timeline but it doesn't do anything. It remains at the same frame of the main timeline.
Is there any way out?
Regards, Rohit
View Replies !
View Related
Main Timeline Vs Mc Timeline Smackdown
I've made a little animation in a mc several instances of which sit looping on the main timeline.
I want these mcs to load at intervals on the main timeline, frame 1, 5, 10 etc. (a kind of twinkling stars thing if you must know.)
The problem is the main timeline overrides the mc's timeline.
I was able to sort of fix this by shortening the main timeline, but I can see this solution is not satisfactory for any number of reasons, and even at the most basic level it seems erratic.
Obviously my understanding of this issue is too theoretical and not practical enough, or the other way around.
How can I force the main timeline to really accept the mc timeline instead of just pretending to?
View Replies !
View Related
A Value From The Main-timeline To A Moviclips Timeline
Hi!
I have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn´t catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
View Replies !
View Related
A Value From The Main-timeline To A Moviclips Timeline
Hi!
I have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn´t catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
View Replies !
View Related
Control Of Main Timeline From Another Timeline
Working in Flash Pro 8 (on a Mac), I've got a movie clip on the main timeline. Within the movie clip is a button which, upon pressing, reveals a series of three more buttons.
My objective here is that when you press any one of those given buttons that are within the single button that is within the movie clip an instance of which is on the main timeline that it will take you back to a specific frame on the main timeline.
I am having a devil of an unsuccessful time with the concept of connecting back to the main parent timeline from a child timeline.
Any words of direction on how this is accomplished would be, as usual, appreciated.
Christian Seaborn
seaborn.christian@gmail.com
View Replies !
View Related
Targeting The Main Stage
Hi all - how do I target a key frame on the main stage from a movie clip on that stage. Have a small animation ( on frame1 ) that when it ends I would like the main timeline to move to frame no.2 on that main stage. Have a short intro that I want to playout and then the main nav to appear. Any help would be great....thanks in advance.
View Replies !
View Related
Flash Pop-ups Targeting Main Page
[I hope this is the correct place to ask: I accidentally post it under a different forum. Sorry.]
Flash Pop-ups Targeting Main Page
I don't know if my subject line helps, but here's a detailed description of my question:
How do I script/create a Flash, in a pop-up window, to open up a new page in the main page, or second web browser, leaving the pop-up in its own state?
IE:
User loads up a website [Main Window]. User clicks on a link that will generate a pop-up window with a Flash file. There, the user will then click on a hyperlink that will cause the Main Window to open up a new page leaving the pop-up unchanged.
It's like the pop-up controls an exisiting/opened web broswer to load up a new page - WITHOUT having to open a new window.
I hope I didn't confuse everyone! But, thanks in advance!
View Replies !
View Related
Targeting The Right Timeline
ok, I have a movie clip. This mc contains a dynamic text box which reads it's info in from a .txt file. My problem is is does not work.
If I put the dynamic text box right on the main timeline it read the .txt file right in w/ no problem. If I next the dynamic text box in a movie clip it stops talking to the .txt.
Obviously It's a targeting issue.
I've tried loading the variables on both the main timeline & on the Mc's timeline & neither works.
Thanks alot,
tim
View Replies !
View Related
Targeting A Sub-timeline
Hi,
Stupid question. Let say I have a button on the main timeline. On press I want to gotoAndPlay say frame 15 of a movie clip called sub. Basically how do I target timelines that are not in the main timeline?
Thanks a lot
Tim
View Replies !
View Related
Buttons In Mc Targeting The Main Movie(_root)
I have a navigation on my site that is a MC placed on the main timeline, I want the buttons in the MC to make the main movie jump to different scenes in the main movie. I have tried
on (release) {
tellTarget ("_root") {
gotoAndPlay ("gather", 1);
}
}
and
on (release) {
gotoAndPlay ("gather", 1);
}
and neither work they just make the movie play from the start, does anyone know how to do this, it should be a simple task.
I will be forveer in your debt.
Dave
View Replies !
View Related
Targeting A Movie Clip On The Main Stage
I have a navbar that is a movie clip embeded in another movie clip and I am trying to have it's buttons target a movie clip on the main stage that loads an external swf file. How can I script my buttons with an "on release" function so that this works?
Here is somewhat of a visual of how the levels are set up-
main stage (with movie clip that needs to load an exteranl swf file) }
movie clip }
movie clip with navbar
View Replies !
View Related
Targeting An Object On The Main Stage From Within Another Symbol
Hello everyone, hopefully someone here can help me with my current dilemma. I have a movie symbol with a button inside of it and I have an event set on the button which checks to see if the mouse is over it. What I' m trying to do is have that event target another movie clip that is on the stage. How would I go about getting access to the instance of the movie clip on the stage from with the other movie clip?
View Replies !
View Related
Targeting The Root Timeline
i have a menu which is a movie clip that slides about on stage I got buttons on this menu that are supposed to jump back to a frame labelled on the main timeline. i have a feeling its got something to do with targeting the root timeline in actions for the button but I cant get no joy - could anybody help?
View Replies !
View Related
Targeting Timeline Of Swf From Root
I have my buttons on the root, with a holding mc that I load my swf's into. Is it possible to target a certain frame or label within the loaded swf. The idea is to target a frame in the swf that is in the holding mc so that it animates out prior to a new swf loading in.
View Replies !
View Related
External SWF Timeline Targeting
Hello
I have a Flash file with a container movie clip in which I am loading an external swf file (with loadMovie). Frame 4 of the external swf file has an instance of a button that I want to take the user to frame 30 of the master Flash file. I'm having trouble targeting this button from the master Flash file. If I place the button in frame 1 of the external swf file it works fine - I can simply use dot syntax: _root.Container_mc.Continue_btn.onRelease etc. etc. But this does not work when the button is in frame 4. I'm assuming I need a way to target that frame of the loaded swf, but I'm not sure how to do this.
Any suggestions would be great!
I'd like to keep as much of the code in the master Flash file as possible.
View Replies !
View Related
Targeting A LoadMovie Timeline
i have base.swf which has a button and an empty mc called 'holder_mc'. when the button is pushed it is supposed to load traditional.swf into holder_mc. it does that successfully. however, traditional.swf has a preloader in it and when i call traditional.swf into holder_mc, it gets hung up on the preloader. i need the preloader because it is sort of a big file.
here is the code for the button in base.swf
ActionScript Code:
toTraditional_btn.onRelease = function() {
loadMovie("traditional.swf", _level0.holder_mc);
_level0.artTitle = "<p align='right'><b>traditional illustration section</b></p>";
_level0.gotoAndPlay ("tradition");
};
here is the as for the preloader in 'traditional.swf':
there are three frames in the preloader, which is on the first frame of tradtional.swf
ActionScript Code:
// first frame of preloader
frloaded = _level0.holder_mc.getBytesLoaded();
trace ('getBytesLoaded');
frtotal = _root.getBytesTotal();
if (frloaded < frtotal) {
_level0.holder_mc.stop();
trace ('_level0.holder_mc.stop');
}
// second frame of preloader
frloaded = _root.getBytesLoaded();
frtotal = _root.getBytesTotal();
if (frloaded < frtotal) {
percentloaded = int((frloaded / frtotal) * 100) + "%";
setProperty("wbar", _xscale, (frloaded/frtotal) * 100);
setProperty("bbar", _xscale, (frloaded/frtotal) * 100);
} else {
tellTarget ("_root") {
play();
}
}
// third frame of preloader
gotoAndPlay(2);
for some reason i am just not getting it.
Van
View Replies !
View Related
Targeting Button On Timeline
Hi,
I'm not that experience with AS3 and i am having a spot of bother.
I have a navigation movie clip with some buttons in, on the main timeline i have added some script to load a movieclip when a button is clicked. This works if the button is on frame 1 of the navigation timeline but i want the buttons to appear on frame 20 for example as the navigation rolls in and out.
When hit the target symbol in the actions palette the buttons on frame 20 appear but are in brackets i.e (services_btn)
Is it possible to target these buttons successfully
Thanks in advance for any help!
Cheers
View Replies !
View Related
|