ActionScript 2.0 :: Check The Currentframe Or Totalframes Of A Movie Loaded Into A 'holder Clip' On The Main Stage?
Feb 7, 2006
Is there any way to check the currentframe or totalframes of a movie loaded into a 'holder clip' on the main stage? Everything i try just comes back with 1 frame despite there being more than that?
I have a movie clip which, when closed, should send you to a specific frame on the main timeline... I have used frame labels on the main timeline... Here is a bit of my code so far:
I am using CS4 and ActionScript 2.0.I am trying to create a photo gallery.I have created 4 different movie clip buttons that reside on the content layer.Each button consists of one image.When the movie clip button is pressed, I want the full size image to appear on the stage next to the buttons.You can see the buttons in the image below.I am trying to create an empty movie clip holder that would reside on the main timeline while the buttons reside on the content layer.I need to get the images to load into the empty movie clip and then unload when the next button is selected?I can't seem to get the buttons to "talk" to the empty movie clip holder.I did manage to create code for an empty movie clip holder within each button, but then I end up with all four images on top of each other.
I have a peculiar problem with a swf published from Captivate (full motion recording, single slide). I wish to use the swf in another flash movie, and basically want to have things triggered when the movie has finished playing (like going to the next frame, where I plan to embed another swf). After doing some research, I decided to go with a method in which the movie's current frame is compared with the movie's total number of frames. To my surprise, the trigger occurs after only one second. Tracing the MovieClip(myLoader.content).currentFrame and MovieClip(myLoader.content).totalFrames reveals that the first one stops at 32, and the second one returns also 32 (according to captivate, it has 1411 frames). Yet the movie keeps playing.
I'm guessing that I'm referencing the wrong "currentFrame" and "totalFrames", but am completely lost as to why it's not working like it should.
Is there a simple way using currentframe and totalframes to have dynamic text fields display what frame the user is on? (exp. Page: 4 of 25) I have been looking and can't seem to find anything.
I am targeting a a movie clip. The problem is that all the syntax I have found for targetting clips looks like this: _root.sample_mc.sample2.mc. etc. The problem is, my target clip is in an swf that I've loaded into a container clip from my main timeline. So, essentially, I have a home.swf that loads menu.swf into a container called 'location'. In menu.swf, I have an MC called center, which contains the MC I am targetting called 'target'.
I'm trying to create a slideshow, using Flash CS3 and AS3. I have 6 thumbnails with buttons attached to them, and then 6 movieclip images placed on the stage manually, each on a different layer. Inside of each image MC (i.e. image01_mc is the instance name of the first image), the image is animated to enlarge outwards from the thumbnail to make a larger version of the image. Standard operating procedures, and all that. So far, the buttons successfully call upon the frame label inside the imageClips to enlarge.
The next part of the problem is that when clicking the next thumbnailButton, I want the currently enlarged image to diminish in size back to its thumbnail, so that the next image can take its place. I have a frame label inside those imageClips to make that animation.
I think, with my rudimentary understanding of AS3, that I need to find out which movie clip instance is on the stage, using If statements, with some code to gotoAndPlay the frame inside the imageClips that shrinks the image.
I've tried various combinations of If, Else if, getChildByName, etc, that I've found in numerous posts, but nothing seems to work.
I would like to have a control for the music to switch between each other in their current playtime. For example, let's say the 1st song movie clip is song1, the 2nd song movie clip is song2, when song1 is in frame 200, the control works in such that when i activate it, song2 will play in frame 200. I have made the control that switch from song1 to song2 in this way [code]...
I'm trying to attach a movie clip to the main stage using:
[AS] this.attachMovie("movieObj", mc1, 1); [/AS]
However, it ain't showing up. Trace said the movieclip of that name is undefined, despite having the correct linkage and instance name. Anyone know why a movieclip might be MIA?
I can't seem to load a movie clip, and then pass some variables from that loaded movie clip back to through stage_mc it is loading into - to the SubClip.
The structure is as follows:
Main >SubClip >>Stage_mc
Where the new movie clip is loading into stage.
I need to pass two variables from the loaded clip into the SubClip. Simple vars to fill some dynamic text in SubClip.
I've done the whole _root.myvar thing, _parent, and _global.
I'm using Flash 8 and I'm having an issue getting back to the main stage once a movie clip has played. I have my file set up with three movie clips on the main stage. One just plays which is the banner, there are two rollover buttons on that mc for panel1_mc and panel2_mc. When you rollover to view panel1 it plays fine, but inside I have another button to take you to panel 2. That wont work...this is what I have for code for the button inside the clip:
How do i make a movie clip go back to the main stage once it is clicked.. it has a roll in and out which is inside the movie clip.. i have a door and i want it so when you click the door it goes to another key frame on the main stage
I have been approached to design a configurator for a new television product. The Application will let users specify the colours of certain parts of the product and also attach addons, which then updates a cost total.
In the main interface i have a looping animation of the product slowly rotating around 360 degrees that i rendered in 3ds max. When a user clicks a button on the interface i need to load an external movieclip on top of the main animation so it looks as though a certain part has changed colour, this i have acheived. The problem is that when i load the external clip over the original, the loaded clip starts playing from frame 1 and i need it to inherit the playhead position of the main animation so the two layered pieces look as though they are rotating as one. I'm sure this must be possible, unless i need to approach the problem in a different way?
I have a movie clip that is a navigation window and I am trying to have some tooltip hover over the buttons inside the navigation window.
If I create a button on the main stage it hovers and works fine but if I create the same clip inside the embedded navigation window the tooltip does not show up. I do not have any error messages but it is not there that I can see.
I'm trying to catch a variable content (set on the main timeline) from a movie clip added to the stage. I need to set a condition with that variable, so here's my line :
I have a problem with buttons and transitions and it is similar to a problem I had a couple of days ago that I posted and that was sorted out. I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following
[Code]....
I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.
I'm creating a small drag & drop activity, and I want to be able to check and see if the dragged movie clip is completely within the bounds of another movie clip (or at least in the bounds of a certain x/y zone on the main stage. I can't use dropTest because it returns true if any tiny bit of the movie clip overlaps with the dropTest movie clip.
I also thought of something that just checks the x/y coordinates of the dragged movie clip, but I'd need this to reflect a range of values rather than one coordinate. For instance, I'd want to return true if the movie clip's x is between 50-60 AND the y is between 50-60. I'm attaching a small graphic to illustrate in case my explanation isn't clear enough [URL]
I have this Preloader movie clip on one scene called "preloader" then i have content on the second scene called "main".The preloader works fine, its just that once it is loaded somehow it doesnt go to the "main" scene.This is the AS on the preloader MClip ::
onClipEvent (enterFrame) { loaded = _root.getBytesLoaded(); total = _root.getBytesTotal();[code].....
I have a program where I am supposed to first load a swf in the first frame (i will not know how long that swf is), and when that has finished playing the main program i supposed to move on to the next frame. Now my question is, can I somehow figure out how long that swf is from within my main program or will I have to put a simple _root.gotoAndPlay(2); in the last frame of my loaded swf?
I've got a main timeline .swf file called "blank.swf" which contains nothing but two blank movie clips one called called "pproduct", the other called "ppalette". In the script frame of this main timeline I use the simple "Loader = new Loader();" method to load a URL of an .swf file into the "ppalette" movie clip. The "ppalette" movie clip contains several color chip buttons, each of which use the same Loader method above to load an external .swf into a clip. Here's what I want to do: let those color chip buttons, when the "blank.swf" file loads, be used to load an .swf movie into the "pproduct" clip on the main timeline. I'm wanting to be able to swap depths with various movie clips which will take out the movie which has the palette, but I want whatever that palette has loaded in the original "pproduct" clip to stay there.
im trying to create a card game in flash.i have an array with all the cards. i then randomize the array and start pulling cards. each card was an imported image changed to a movieclip. i use this to load the cards:
holder1.attachMovie(myCardArray[0,0],"card1a",1);
where "holder1" is a movie clip symbol. so, i do this for all cards being deal on the table (holder1, holder2...holder4).everything seems to be working just fine. when the user clicks on the card i want to get the name of the movie clip symbol embedded in the "holder" (ie, get the name of the card that was clicked). how do i do this? oh, and im using actionscipt 2
Does anyone know a good way to acquire the currentFrame of a movieclip symbol placed on the main timeline? currently there is only 1 frame, but the movieclip has 50.
If i trace currentFrame, i only get 1. and tracing the child name doesnt work either.
I got it to work earlier but it crashed before i got to save and now i cant figure it out. Was something to do with making another movieclip symbol.
I know that the functionality of the addChildToStage and deleteChildFromStage functions works fine because I have tested it here: [URL] the nav adds a new instance of "player" to the stage and the big red button deletes "player".
I want to start the movie with a mc_CopyBlank on stage and then have the nav issue play(); command to the movie clip held in "player" then have the current frame of that clip trigger the addChildToStage and DeleteChildFromStage functions that I've written here. The .fla is hosted here: [URL]why this doesn't work. Feel free to keep the .fla as it's basically a barebones four page site. (if it ever works)
I'm using flash 5 to develop a dynamic banner. It loads a txt file in an single line text field that moves from right to left, similar an electronic bank display. What I need is to check when the last character of the text loaded gets out of the stage (-x), so I can send the text field to its original position simulating a continuous loop animation. (I could do this using flashMX cause the text field scales according to the text size but I have to use flash5 ).
I have checked over and over again. But when I run it, it always skips the first two currentFrame if conditionals and runs the last currentFrame if conditional. I have this code in another file and it works perfectly...
loadMovie(_root.section, _root.content);how would i work in a preloader bar?? add one to the file that is loaded into the main movie or on my main movie that is loading the file?