when my main app is a MovieClip (extends MovieClip) is working.but my main app is a sprite i take this message cannot convert ROOT@16b26df1 to flash.display.MovieClip.can i change this line
MovieClip(this.parent.parent).traceMe();
to something like this Sprite(this.parent.parent).traceMe();
I have a game which consists of 5 frames.frame 1 asks if you wnat to play and that clicks thru to frame 2. I have a meter which is a movieClip, and if the meter goes to the last frame, there is an onEnterFrame listener that I want to tell the main timeline to gotoAndStop at frame 5, here is the eventlistener code:
this.addEventListener(event.ENTER_FRAME, youLoseGame); function youLoseGame(event:Event):void { stage.root.gotoAndStop(5); //stage.gotoAndStop(5); }
Is there a way to access variables on the main timeline in Flash other than MovieClip(root).myVar ? The problem I am having is that I have a movie clip that uses several main timeline variables, but when I instantiate it, it throws a 1009 type error (cannot access property of null object reference). My understanding of whats going on (and please correct me if I am wrong) is that when instantiated it runs the code on the first frame of the movieclip. However, it is not added to display list yet, so it does not have a root. Thus, all the MovieClip(root).myVar lines do not have a root to look at. Does anyone know of a way around this?
as always, this seemed simple in AS2, but i am stumped with this simple command in AS3.
i have a main timeline [one scene] that has multiple movies, one after each other, in different frames. i need the buttons that are placed in a layer below the movies to access various movies in the scene. was really simple in AS2.
it appears that i can get my button to go to the frame, but the movie contained in the frame will not load and or play. [i have 2 frames dedicated to each movie, the second frame, in the actions layer has a stop command]. the following is the actionscript and the errors i am getting.
AS3: food_btn.addEventListener(MouseEvent.CLICK, playfood); function playfood(event:MouseEvent):void { gotoAndPlay("food"); }
I have a class, and I'm trying access an object outside of that class. For example, in my class I have function: onNodeLoad(node:Object)with that function I can access the properties of node just fine, but outside the class I cannot.In the function that is inside the class, I can trace (node. title)I want to be able to do that trace on the main timeline.[code]So right now, in my main timeline, trace(con.node) comes up null.I've tried to declaring _node public, private, public static.
I have two frames in the timeline of my flash file. On frame 1 there is a movie clip. How can I access this movie clip with code located in frame 2?
It doesn't matter whether the mc is already placed on the stage or is added dynamically from the Library - I just need to access the alpha property. I can provide a more detailed description of my file if needed.
I have a button inside a movieclip. When the button is clicked I want it to make a movieclip in the main timeline go to a specific frame. what's the code I need to use to define that movieclip located on the main timeline? Right now I have my code written inside the movieclip where the button is located because I have multiple buttons on multiple frames, and I don't know the syntax to define a button in a specific frame inside a movieclip.
Here's my current coding... Code: Select allfunction bwbtn2(btn:SimpleButton,frame:Number) { btn.addEventListener(MouseEvent.CLICK,function() {photobw_img.gotoAndStop(frame);}); } bwbtn2(bw19_btn,19);
I have a label on my root timeline called "services". I have a services button inside a movie clip. How do I access the main time line to send it over to the page services? I'm using actionscript 3. Back in the day it would have been as simple as root.gotoandplay("services")
I have been going crazy all weekend trying to figure this out. All I want to do is communicate with the main timeline from a loaded external swf. So, I have loaded a external swf called "test.swf" from the main swf called "basetest.swf"So, on basetest.swf I have this code, simply loading test.swf:
var request2:URLRequest = new URLRequest("test.swf"); var loader:Loader = new Loader() loader.load(request2);
I'm having a bit of time getting this to work. Setup like this: Main mov: Nav1 is clicked and loads in external swf. In the swf that was just loaded there is button to call another external swf on the main movie's timeline. I'm trying make a "lightbox" effect. Where you click on the external swf and the screen darkens and a swf is loaded on top of it. Above the loaded swf. Of course on a new layer.
PHP Code: This is handling the swfs that get loaded in EXTERNAL SWF LOADER _root.page_mc.preloader_mc._visible = false; _root.page_mc.preloaderText_txt._visible = false; var mcLoader:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object(); mcLoader.addListener(myListener); [Code] .....
I'm definitely more designer than flash developer (as most of you might know. At least those that hang in the lounge or Arena). I need to know how to allow a loaded .swf file to control the main timeline in AS3.
I have a container .swf that includes global controls (jump menu/volume control) and branding. Loading a swf for the dialogue boxes (timeline animated ... although I realize there may be better ways to handle it). Another swf for a simcity-ish illustration that has animated elements with various states. I need all to be able to communicate with each other. I was able to load the movies no problem. Even communicate with the loaded ones from the main timeline. Just need to be able to go the other way.
I apologise because I know this has been covered but none of the code I've found seems to have sorted my problem.On my main timeline (_level0 right?) I have the following code:
var loader:MovieClipLoader = new MovieClipLoader(); this.createEmptyMovieClip("container2",2); container2._x=28
keyframe one - dialogue / conversation with characters ( then a button is triggered to call an external swf [placed at keyframe two] )keyframe two - the external swf game. i want to put a button that makes you go back to the main timeline once you're done with the game and proceed to keyframe three (that's the problem. i dont know how to declare and make that button work)keyframe three - dialogue / conversation again .
keyframeone [main timeline]
Code: ... memory_t.addEventListener(MouseEvent.CLICK, recalltraining) function recalltraining(e:MouseEvent):void{ gotoAndStop(2)
I have a external SWF loading into a target on my main swf. Is there a way to control the timeline from the loaded movie from the main timeline. So , control B timeline from A. I've tried mcholder.gotoAndPlay (2); but it won't work. Also, how can I get the mumbers of frames from the external swf into the main timeline. Will a global variable work?
im trying to tell my main movie to goto a certain movieclip in the timeline from my loaded external swf heres the code Im working with,[code]I can tell the script is executing because the external movieclip unloads itself but the main movie does nothing.
I've got a movie with a few buttons in it. When you click on one of the buttons an external swf opens. At the same time a large, quare, white movieclip opens at the back of the external swf (the white mc is in the main movie). Okay, so for so good. In the external swf there is a close button. When you click the button, the external swf goes to frame 14 to show a short closing animation. The last frame contains the following code:
I'm having issues with an animation and need to get it functioning properly. I've posted two example/demo files to illustrate desired functionality.The main timeline (testMain.swf) consists of a loader, section/slide one content, and a button (bttnClick) set to load an external swf (external.swf).
external.swf contains two additional sections/slides and two 'next' buttons (bttnEnter with 'bNextOne' & 'bNextTwo' instance names) to navigate. When the second 'next' button (bNextTwo) is clicked I need the loaded external swf to fade out revealing the original main timeline (testMain.swf) and returning/stopping playhead at the 'slideOne' frame label. Does the external swf need to be unloaded even though users will most likely go back to it? What�s the best way to handle this?
If you could assist with the external swf fadeout to main timeline, the return to 'slideOne' frame label, and insight as far as the best way to return to the external swf.
In trying to keep file size down for download time... I have a SWF file that I have placed using the "UILoader" component (not sure if this is the correct thing to do)... what I would like to work out is how to make a preloader within my main timeline for this SWF file when it comes in. I hope that makes sense - I am very new to all this and struggling with terminology etc. I figured Actionscript would be what I need - but no clue right now...
I have an external swf (is is an intro, nade in aftereffects)..and it loads in the main timeline of the site with a preloader. Everything is ok, but, when the intro in done plating. It stops and I want do see de site. I mean from the last frame of the external swf, I want to jump to the second frame of the main timeline.
Here is the script: stop(); var req:URLRequest = new URLRequest("intro.swf"); var loader:Loader = new Loader(); function fileLoaded(event:Event):void{ addChild(loader); [Code] .....
I have bought a gallery template that allows me to place content within external SWFs.I have a series of buttons within the SWF templates. The problem is that the buttons are interefering with the main timeline when hit. How would I fix this.
Currently they read: on (release) { _root.gotoAndStop(1);
I'm about 10 hours deep into getting an external swf to be loaded on a page in my main timeline. I've gotten as far as loading the external swf (within the first few hours) hahah but now, have spent twice as long trying to get the external swf to be removed when a person navigates to a different page of my main timeline.
I have a videoplayer on one frame which is my "video" page. I've gotten the external swf to load two different ways, for example, the latest code i am using to load the external is below and seems so nice, clean and simple:
var request:URLRequest = new URLRequest("VideoPlaylist_HV.swf"); var loader:Loader = new Loader() loader.load(request); addChild(loader); loader.x = 180 loader.y = 50
But I would like to add a function that says on any mouse click event (navigation) close the swf that is loaded.
If any of you genius people out there can help me, please do. I thought getting it to load was going to be the hard part but I was wrong. I am very discouraged by Actionscript in general.
download what i have so far, i left alot of the content out so the file size isn't big. And yes, i am sure once you see how I work you will be sure that I am no flash expert. I can send a link to the .flas, the site won't allow me to post the link as I am new.
I'm loading an external swf into an empty mc called "emptyMC" on my main timeline. That loaded swf loads another swf into an empty mc called "view2" when a button is pressed. Code: on (release) { loadMovie("tabletennis.swf", "_root.emptyMC.view2"); } The above code isn't working right. I'm not sure how to target each empty MC in sequence in order for this to work.
can a movie clip which is loaded from an external source control the main timeline? For example I have a set of buttons contained within a movie clip which is loaded externally onto my main timeline...can those buttons direct the swf to a specific frame on the main timeline? Also...is there any way to load an external movie clip into a specific LAYER rather than Level?
I'm loading an interactive external SWF into my main timeline. The SWF is a game and when it's completed successfully it plays an animation on the _root timeline. I'm aware that the external SWF _root action is now referring to the the main timeline, but I'm not sure how to make it refer to it's own.
I have 2 buttons in my main movieclip, one called "projects by client" and the other "projects by category".I have an external projects.swf which has 2 functions CLIENTS_CLICK and CATEGORIES_CLICK. The code is in the first frame of the projects.fla actions layer and not in a class.