this is executed when a ceratin button is pressed and loads in a movie in to the .swf , the movie is loaded into the 'content' movievlip and displayed correctly, but the preloader is not getting the bytes of it,
I cannot seem to find anything of what I need from google.(Well, I can find the reverse method to what i need ) Basically I wish to access a variable declared in the Root Timeline from my Movie clips timeline.
I simply want to assign a variable to the current frame of the main timeline (not movieclip timeline) I already know about _currentframe and it doesn't help in this case.
I am in the learning process. Working with FlashCS5 and AS3. if the issue appears to be too simple for you. Placed a movieclip(mcassessJohn) on the main timeline and moved to the frame labelled "johnFeedback" in the movieclip timeline using the following actionscript code.
I have a file comprised of 1 scene and two movie clips. The clips are instanced into the Main Timeline and occupy Frames 1 and 2 respectively.MovieClip1 is an animation that has navigation buttons that appear at the end of the clip. I'm trying to get mouse click navigation to make Frame 2 on the Main Timeline active.
Here is what I'm trying but it is not working:
btExplore.addEventListener(MouseEvent.CLICK, ExploreClick); function ExploreClick (evt:MouseEvent):void { gotoAndStop(2); }
this takes the animation to Frame 2 of the Movie Clip Timeline not Frame 2 the Main Timeline.
I'm having some problem with the workflow of flash.I make web banners everyday att my work att it is important to me to have the banners easy structured so I can copy effects, tweens and symbols to a new banner. I have Flash CS3 pro.I always start by making a symbols. And then in the symbols own timeline I make the animation or effect.
The big problem I'm having is when I have the main (scene1) timeline with many frames, and then have symbols on that timeline, with it's own timeline with some frames. The frames in the symbol timeline is okey, but at the main timeline the frames is too short or too long so the animation of the symbol cuts of early or it plays more than one time (too many frames).
How do I calculate how long a symbols timeline should be so It maches the main timeline?What happens to me is that I always have to adjust the symbols timeline and the main timeline, and this I have to do many times.
I have a main.fla which has 3 movieclips inside it. All 3 mc's have timelines that run 40 frames. The main.fla timeline has each mc instance on a frame. mc_1 is on frame 1 mc_2 is on frame 40 mc_3 is on frame 81 as the main timeline plays the clips each one fades to the other. I need to know how to target this scenerio after mc_3 plays I need to have a goToAndplay (20) set up so the animation inside mc_1 starts playing (frame 20) of mc_1.
I have a magic cloud effect. On frame 30 of the nested effect I would like an mc on the main timeline to become visible.Not too sure how to code with frame numbers,a) Do I put AS on the timeline of the nested clip ORb) Write code on the main timeline to listen for when the nested mc gets to frame 30
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?
On my main timeline, I load a mc from the library with:
text_content.attachMovie("text_content", "text_content", 10); There is a marker inside this mc called "news". I need a script in the main timeline that will gotoandStop "news" within the "text_content" mc.I have tried, amongst others
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?
How do I link a button thats embedded in frame 2 (music page timeline) to a frame in the main timeline ( frame 3= biography page)? Both pages are on the same scene with link buttons embedded in each page independent timeline.
I am trying to "gotoAndStop" on a frame in a nested timeline from the main timeline, but can't seem to figure out the correct way to write it with it's 'parents' etc... this is how I have tried which makes sense to me (have tried other ways too) but no success.
So, in this game I'm working on I'm trying to change the ChildIndex for enemies that are shot down, so that they drop behind a certain background element, instead of in front of it. The enemy in question (when shot down) dispatches an event to my main/engine class, and after that a certain function is called. Here's the code that goes into that function:
Actionscript Code: var groundObj:DisplayObject = stage.getChildByName("Ground"); var groundIndex:int = stage.getChildIndex(groundObj); //trace(groundIndex); setChildIndex(e.currentTarget, groundObj -1);
I'm able to trace the groundIndex variable, but I can't set the new index for the enemy. Errors I get are: 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:DisplayObject. and 1067: Implicit coercion of a value of type flash.display:DisplayObject to an unrelated type Number.
Then, if I try to just put 4 or something, instead of "groundObj -1" I only get the first error. I actually managed to "solve" this problem temporarily by spawning the enemies before I add that specific background element to the stage. Like, if I let the enemies drop bombs or something later, I want the bombs to be one ChildIndex above the player.
I've got a 3d cube that rotates but when the the front side of the cube is in the back during the rotation, it blocks the view of the back side because it's child index is still higher. Is there anyways around it, I tried detecting the sides coordinates by using globalToLocal3D but the z property is always 0. below is my code, just copy and paste if and you'll see what I mean
var cube:Sprite; var frontSide:Shape; var rightSide:Shape; var leftSide:Shape;
I have an array of n Movieclips placed in a circle rotating around the y axis. I have to make sure that the MCs with the higher z values are behind the ones with a lower value, i.e childIndex. I tried a couple of approaches but I don't seem to get it right.
I am placing several AS3 buttons (actual buttons not event-laden MCs)on a Flash stage and want my enlarged rollover images to always come to the front of all other dormant buttons.My script-fu is weak,but piecing together the advice from several helpful posts I have generally learned how to set the childindex on a rollover event to be high enough to go to the fore.I plugged in the appropriate language in my action frame and was psyched to see that the coding worked...but only briefly.After just a few clicks (it seems that whenever a button is hit for the second time), not only did the childindex trick stop working, but the buttons (which act to send the user to labeled frames later in the time-line) stopped working altogether.It seems that the issue is definitely related to the setting of the childindex, because when I remove those event listeners/commands,the buttons all work fine for an infinite number of clicks (but the enlarged rollover images are stacked in one static sequence, blocking each other out).Is there something inherently incorrect about this approach?Something simple that I am overlooking? Some way to reset the process on each click so it does not get gummed up (I tried re-setting childindex #s to 0 on rollout or on click, but it did not help)?
I have had it suggested that rearranging the order is destroying ability to recognize mouse events...but not sure if this is correct, what it would mean.The code that I am using for each button (for setting the depth and for redirecting on click) is below,
In AS3, changing the childIndex of one movieclip ( say from a list of 10 movieclips), may change the childIndex of some another movieclip ( Flash probably does it to prevent outOfIndex error ) It sometimes become a headache to manage and code them, as movieclips show above each other in an unexpected manner.Is their any inbuilt way to make movieclip stick with a particular childIndex ? ( In AS2 there were depths that kept constant from 0-9999. And it was a real breeze as compared to AS3.0)
Would it be possible (Without being extremely inefficient) to loop through a display object and reset their children's ChildIndex based on their y value?
I have a movieclip in a movieclip with a button, when clicked it should go to the main timeline I have done this with AS2, the script is below. How can I accomplish this in AS3.
I have a main navigation bar on my main stage that is constant through out. I have converted the bar to a movie clip. How do i then tell the movie clip to look at the main stage, not inside the mc, when a button/mouse event is clicked. This is what i have.
stop(); name_btn.addEventListener(MouseEvent.CLICK, enterMovie); function enterMovie(myEvent:MouseEvent):void{
[URL]about 30 seconds into this flash, there is an FLV of a computer screen. The problem is, when I pause the swf, the flv keeps going. How do I get around this?1. Is it possible to convert the flv to swf?OR2. Is it possible to control the flv from the main timeline?
I have this code in the maintime line, that when i click a button, the btn the stays static (like its on), when i click another btn, it switches on the next button and loads an external swf.
Each button's instance name is button1, 2, 3..and more buttons I add the stage I would increase the button number, so for 3 buttons on stage I have up (var buttonNum:Number = 3
code// var buttonNum:Number = 1; for (i=1; i<=buttonNum; i++) { this["button"+i].onRollOver = function() {
[Code].....
This all works fine.
I have built a scroller with thumbnails as movieclips and would like to add this code to movieclips.
The thumbnails are indivdual moviclips and are inside a movieclip (productscroll), as the dragbar i am using targets the clip (productscroll) to scroll the thumbnails.
I basically need the same actions as the buttons. When I click a thumbnail I need to load an external swf.
I'm trying to play a frame label that is on the main timeline by clicking on a button inside of a movieclip.Here is the error I'm getting. I most definitely have a page1 label on the frame.[code]
I recently started creating a flash website from a template that was created back in 2004. I have very little knowledge of either AS 2.0 or AS 3.0. I am currently attempting to link my buttons that are in separate movieclips back to specific parts of the main timeline "scene 1". Currently when clicked, the buttons just cycle through the varying pages that have been created, "s1" , "s2" etc.
How do I link a movieclip/button back to "s8" in the main timeline?The AS 2.0(I think it's AS 2.0 anyway) that currently exists is as follows:
PHP Code:
on (rollOver) { gotoAndPlay(2); }
[code]....
I understand what first rollOver and rollOut commands are and they work fine, but the "On (release)" doesn't seem to go where it needs to.