ActionScript 1/2 :: How To AttachMovie In A Specific Frame
Mar 10, 2010
I have 3 pages of a document converted to symbols (i.e. mc_pg1, mc_pg2, mc_pg3), each residing in its own frame (i.e. "pg1", "pg2", "pg3") inside mc_Pages. Mc_pg1, mc_pg2, and mc_pg3 are inside a movieclip called mc_Pages. On click of mc_Pages, I am attaching a blinking icon (mc_Target) to a specific page. The problem I'm having is when I attach mc_Target to a specific mc in its frame, navigate to another frame, and then return to the initial frame, mc_Target is no longer attached. Yet, I have not clicked anywhere else other than the buttons that allow me to navigate from one frame to another. So, my code is:
mc_Pages.onPress = function():Void
{
if(varPg1 == true) //this checks to see if I'm on "pg1" frame where mc_pg1 is located
{
[code]....
Everything is working as it should, i.e. on press of the mouse button, the mc_Target is attached to the frame/mc within mc_Pages that I'm in (I have a btn_Next and btn_Previous on the same timeline as mc_Pages that navigates to the specific frames inside mc_Pages), except that upon returning to a frame/mc which previously had mc_Target attached, mc_Target is no longer there.
I'm currently using a script I picked up from these forums to attach movieclips from the library based on how many child's there are in an XML document.I was wondering if it was possible though, to have each movieclip placed in a random location on the stage; but restrict that random location to a SHAPE I draw? For example if I drew a giant star, and wanted the movieclips to randomly attach anywhere within the boundaries of the star?
I know there are methods of restricting the random placement by using x and y values to keep it below or above a certain line, but is it possible to restrict placement within custom drawn shapes?
Here is the script I'm using atm:
Code: function loadXML(true) { if (true) { xmlNode = this.firstChild; title = [];
i need to change the colour of a graphic in a specific movie in a specific frame. if i have a movie clip instance-named "sidetext" thats 15 frames long, and i want a graphic in the movie, called "letterp" to change to one of four colours that i want it to randomly at frame 10 and stay that colour uintil frame 15, how can i do this?
how do i export specific frames not all frame. ex: if flash has 1 to 200 frames. here i want to export 51 to 150 frames as a movie. if there is any command or plugin to export movie like this.
I have been doing really well figuring everything out up until now.[code]How it stands, what is this link pointing to? Can I make it target a specific frame in a specific movie clip?And if someone would be so kind and explain what this is saying in 3rd grader terms.
Basically once my animation loads I want to pull in an external SWF at a specific frame, basically like the "home page" swf that will display first. Underneath that I will have "About Us, Contact, etc..." and those will each load an external SWF into my movie clip. My movieclip right now is called mcHolder. Here is the code I am currently using for the buttons:
Code: //About Us Button function test2(evt:Event):void{
I'm trying to get the following movieclip smallbutton to link to frame 5 on movieclip cont.The way the timeline is built is as so:content_mc > cont > (more mcs) > smallbuttonThis seems to be an issue from every answer I've tried so far since the movieclip "cont" is not being called in the main timeline; first there's content_mc and then comes cont.How would I go about getting the movieclip "smallbutton" to link to the 5th frame of movieclip "cont"?This is for AS 2.0So far I'm at:on (release) { _root.gotoAndPlay("cont"); _root.smallbutton.gotoAndPlay(5);
I'm making a game...and I want to change my background image depending on where the character is.I thought I would make a MovieClip...with all the different background images on different keyframes.My question is....can I use AttachMovie, and if so...how do I reference the particular frame that I want to...?I've never used AttachMovie before, and wasn't sure of the syntax...and how to reference it...to go to a particular frame.
is it possible to use attachMovie without exporting the MC in the first frame.because i tried to do it so i wouldn't have problems preloading, but when i uncheck export in first frame it doesn't show up at all. here is my code just in case it mattered.
i have five buttons 'b1, b2, b3, b4 and b5' and 5 mc 'words1, words2, words3, words4, and words5' being attached to an empty mc on root called 'holder'.
Code:
for (var i = 1; i<6; i++) { _root.nav["b"+i].onPress = function() { num = this._name.toString().substring(1, 2); _root.holder.attachMovie("words"+num, "words"+num, _root.holder.getNextHighestDepth()); }; }
I have 5 frames in a Flash file. The fifth frame is the only frame that contains several attachMovie actionscript call lines. Each of the clips that are called using attachMovie contain large image file sizes. When I used debugger, I noticed that the bulk of the data is not being loaded from the 5th frame, but from the 1st frame instead. Is this supposed to happen? If this is so, the preloader that is being referenced on Kirupa doesn't seem to work properly because it loads all the attachMovie frames first before the preloader is able to perform its own action. What happens is that 80% of the movie will load (I predict from the attachMovie call lines) before the preloader actions and its visual representation will appear.
I tried directly attaching these movieclips to the last frame along with the attachMovie(), thinking that phyiscally placed frame would have a higher priority. But the debugger still informs me that the bulk of the data is being loaded at the 1st frame. Is there another workaround for this or another preloader that someone can recommend? This is the preloader I used: [URL]
if its possible, via AS3, to create a frame label in a movieclip on a specific frame.
Obviously I can do it by manually by setting up labels on the timeline within the target movieclip, but I would rather use an array so I can loop through it, creating a label name on a the specific frame each time?
so for example I would end up with: myLabelOne on frame 10 myLabelTwo on frame 25 myLabelThree on frame 115 etc
I have a button that uses the Load Graphic Behavior for bringing a SWF, but i want the SWF to come in a specific frame instead than starting at frame 1. For examplel; i click the button, the behavior of Load Graphic brings my SWF to stage but i want to start at frame 50, not at frame 1. How can i do that?After i use the Load Graphic Behavior i try using a gotostop frame, but doesn't work.
I have made a menu in flash . I have a frameset on my page . I want the button to open the link in a specific frame (my frames are bannerframe , leftmenu , rightmenu , bodyframe) . The menu is in the "leftmenu" frame. But whenever i use this :
I have made a menu in flash . I have a frameset on my page . I want the button to open the link in a specific frame (my frames are bannerframe , leftmenu , rightmenu , bodyframe) . The menu is in the "leftmenu" frame. But whenever i use this :
Code: getURL ("xyz.html", "bodyframe")
the page opens in a new window .. ( i have tried in all browsers chrome firefox IE etc. ) ....
I want to jump to a specific frame in the swf I load using the Loader class. As it is now it goes directly to frame1 in the file, which I dont really want it to do. I'm using Flash CS4
I have a dynamic text box. I need to set up a hyperlink in my text file that will take the user to a specific frame on a page. I know how to set the hyperlink up to go to a specific page :
I made a flash website and had one page load an external swf.
In this external .swf are thumbnails that link to another page (frame) all within the external swf. when you go to these pages there is a 'back' link which links back to the main external swf frame.
My problem is this: let's say i click a thumbnail in the external swf and it goes to the respective thumbnail page, and then i dont click the 'back' button but instead click another link of the main flash website - then i go back to the page that loads the external swf and instead of going to the main frame of the external swf it stays at the page i was previously on.
How do I get the link on the main flash website which loads the external .swf to always load on the first frame of the external swf?[code]...
I am very new to Flash and I am making a little 30 second clip just to fool around with Flash.Now at the end of my film I just want everything to stop (if possible, once a specific frame is hit move to another frame.)I've heard that you could use ActionScript to perform this but I really have no clue
I have the loading audio file at frame one. However, I want to play the audio only at specific frame or frame lable. How do I do that? Below are my codes:
[Code]...
The above plays the sound as soon as the .swf file is loaded. But I want to play at certain point in time, say frame number or frame lable.
I have two flash files, say a.swf and b.swf.a.swf is the main swf file, embedded in an HTML page for a webpage. There is a preloader in a.swf too. In b.swf, when I click a specific button I need to load a.swf, but not from the preloader, from the content. To be precise, the content starts from Frame 24 of a.swf (obviously Preloader ends in Frame 23). I believe, the frame 24 has to be loaded in a.swf when I click the button in b.swf.
I need to do 2 things: I have a rotator piece I'm working on where I need to be able to go to a specific named frame (promotions) if the XML I search for [URL] has the tag <promo>. I also need to be able to have a button on that frame link to a URL that is pulled from a tag in the same XML, called <promoURL>.
I've got another little hitch that I've come accross in the project that I'm currently assembling. From time to time I need to load swf files at specific frames & seem to have hit a brick wall.
[code]...
It loads the right swf, but at frame 1, when I want tp load it at frame 18
I'm having a some trouble with loading an SWF into my main SWF. I have found multiple ways of doing it, but I want to find the most appropriate way for what I'm doing.
Here's what I'm doing:
I have a main SWF with 4 frames. I want to click two buttons that will then load two SWF into frame 2 and frame 3. Below is the script I wrote for the buttons. The earlywork_btn needs to load RColeman_EarlyWork.swf into frame 2. This swf is a slide show. The currentwork_btn needs to load RColemna_CurrentWork.swf into frame 3.
I'm not sure which scripts to use to load the SWF's and how to arrange it in the ActionScript panel.
ActionScript Code: // stop(); function onbiographybuttonClick(evt:MouseEvent):void {
I've got a couple elements I create in actionscript, and I want them only to be visible on Frame 1. I'd rather not have to remove and add them over and over as I got from screen to screen if at all possible. Here is what I have:
I have an .flv I need to drop into an .fla and code Cue Point to do the following:Play the flv to a specific frame ( in the flv) and then stop on the frame the flv stops I need a play button to be visible when this play button is clicked it plays the .flv from the frame it is on to a second place on the flv timeline were it needs to stop.same play button will be clicked and the flv will play to the end.
Here is the thing : I have a several frames on which I have several MCs. logical. On some frames, I have MCs that have the same name that on other frames. Right now, I access the frames by a gotoAndStop() and then access the MCs of the frame in the very frame. What I want to do : I want to be able to access the MCs of all the frames from the first one to initiate them (loading purpose). But since I have MCs with the same name, I can't juste do "MCName.whatever()" because as wouldn't know which one to chose. So here's my question : is there a way to use the object-like syntax to prefix the MC Name by it's frame ? ie : frame is "Frame2"