Between Errors 1009 and 1010

Obviously I have not assigned correct instances hence the errors though I spent hours reading the relevant posts. The problem seems to be that I don't know how to define the instance "shut" of close_btn inside the instance "popup1" of 01_mc_master.

The line giving the error 1009 is:
popup1.shut.close_btn.addEventListener(MouseEvent. CLICK, closebuttClick);

and the 1010:
popup1.close_btn.addEventListener(MouseEvent.CLICK , closebuttClick);

Thank you for directing me here.

Posted On: Friday 19th of October 2012 03:19:56 AM Total Views:  227
View Complete with Replies

Related Messages:

How to code a cross fade between externally loaded images? AS3   (134 Views)
I'm current trying to create a slideshow with images loaded externally, and then crossfading between one another. I've achieved how to load the images one after another, but however I'm having problems with achieving a crossfade. Could anyone enlighten me on how is a crossfade usually done Do I need to have 2 seperate image loaders Because I do not want to have the first image fade out, showing the background for even a minute of a second before the second one fades in.
comunication between two classes   (116 Views)
hey, im having some trouble comunicating between two diferent classes, what i usualy do is to setup a simple class with static object vars inside of it, and on one class with the function "function doSomething(){}" i say in its constructor StaticClass._Var1=this; and then on every other class i just need to make StaticClass._Var1.doSomething(). but this doesnt seem to be a good pratic doesnt it how can i do this other way i sometimes have to comunicate with more than 1 class so extending a class its not an option for me, i tried to writte this.dispatchEvent(new Event("event")); in one class and then this.addEventListener("event", appear); in another, but it doesnt go inside the appear(e:Event) function :S
relation between var count, if and switch   (176 Views)
this code from the flash AS3 documentation, i am trying to get familiar using filters, it really helped me a lot, there is one section i did not understand, please see the comments at the end of the code: Code: var distance:Number = 8; var angleInDegrees:Number = 225;// opposite of 45 degrees var colors:Array = [0xFFFFCC, 0xFEFE78, 0x8F8E01]; var alphas:Array = [1, 0, 1]; var ratios:Array = [0, 128, 255]; var blurX:Number = 8; var blurY:Number = 8; var strength:Number = 1; var quality:Number = BitmapFilterQuality.HIGH; var type:String = BitmapFilterType.INNER; var knockout:Boolean = false; var box:Shape = new Shape();;;, 50, 90, 200);; var gradientBevel:GradientBevelFilter = new GradientBevelFilter(distance, angleInDegrees, colors, alphas, ratios, blurX, blurY, strength, quality, type, knockout); box.filters = [gradientBevel]; var stopLight:Shape = new Shape();;;,90,25);; var cautionLight:Shape = new Shape();;;,150,25);; var goLight:Shape = new Shape();;;,210,25);; addChild(box); addChild(stopLight); addChild(cautionLight); addChild(goLight); var innerShadow:DropShadowFilter = new DropShadowFilter(5, 45, 0, 0.5, 3, 3, 1, 1, true, false); var redGlow:GlowFilter = new GlowFilter(0xFF0000, 1, 30, 30, 1, 1, false, false); var yellowGlow:GlowFilter = new GlowFilter(0xFF9900, 1, 30, 30, 1, 1, false, false); var greenGlow:GlowFilter = new GlowFilter(0x00CC00, 1, 30, 30, 1, 1, false, false); stopLight.filters = [innerShadow]; cautionLight.filters = [innerShadow]; goLight.filters = [greenGlow]; var timer:Timer = new Timer(3000, 9); timer.addEventListener(TimerEvent.TIMER, trafficControl); timer.start(); // i did not understand this section // if you changed the value to 2, the order of light change too. //please explain the relation between this var and the if and if with switch var count:Number = 1; function trafficControl(event:TimerEvent):void { // what is he comparing if (count == 4) { count = 1; } // this is OK, i know that the switch swaps the lights between circles. // but this section still referring to the count var, why switch (count) { case 1 : stopLight.filters = [innerShadow]; cautionLight.filters = [yellowGlow]; goLight.filters = [innerShadow]; break; case 2 : stopLight.filters = [redGlow]; cautionLight.filters = [innerShadow]; goLight.filters = [innerShadow]; break; case 3 : stopLight.filters = [innerShadow]; cautionLight.filters = [innerShadow]; goLight.filters = [greenGlow]; break; } count++; }
communicating between externall swf & main movie   (113 Views)
how do I target something that lies in externally loaded swf from my main movie or vice versa
Help! Components between Flex and Flash!? Uggghh   (111 Views)
Hi , I used to post on these forums when I last used flash (MX2004), and it seems that things have changed a bit in the world of flash. I'm very happy to discover that, mainly because I used to hate using MX2k4. Now I can use AS3 to program everything and generate swfs. Anyway, I'm trying to code a dynamic ad slot picker. As a starting point, I want to get a play/pause button, and a progress slider on the stage. The slider is meant to move with the mp3, and then if the user drags it, the position of the song will change appropriately. So heres where my problem comes in. I'm using flex 3, and I want this project to be comletely AS3. I'd prefer to be coding in linux, but I couldn't quite figure out how to get the mxmlc compiler working. Regardless, I want everything to be born of AS3. I tried using mx.controls.sliderClasses.Slider, as well as fl.controls.Slider. In flex, I added the mx and fl libraries to the project's build path, and I get no errors. When I compile and view the swf, I don't see the sliders. I tried using something like fl.something.textArea and that showed up, but the slider won't. Very confusing for me, at the moment. I'm kinda apalled that there isn't a shared library of some sort between flex, flash, and actionscript. So, kirupans, any suggestions Should I just code it in Flash cs3, or do something while in Flex I'd rather not code buttons and sliders from scratch (why reinvent the wheel). Any help is appreciated.
Share static members between parent and child SWF   (160 Views)
...first time poster, long time reader, Forgive me if this has been beaten to death, but I still haven't found the solution I'm looking for. Here's the scenario (and, I believe, it's a common one): - I have an SWF (from Flex) that loads other SWFs, basically acting like an environment for showing other SWFs; we'll call it "parent.swf" - parent.swf has a custom loader class that extends flash.display.Loader - when my loader loads stuff, I make sure that the loader context I use is defined as Code: new ApplicationDomain(ApplicationDomain.currentDomain) From my understanding, the SWF that parent.swf loads (we'll call it "child.swf") should be in an application domain that is a child of parent.swf's app domain. As such, class definitions that both parent.swf and child.swf will be the same, and child.swf will defer to the definitions of parent.swf's app domain (I think). Having said that, suppose both parent.swf and child.swf call a static method inside a class (MyTest.myStaticMethod). "myStaticMethod" does is increment a static member within MyTest and return it. So, at this point, you can guess the issue I'm having. They're not getting the same values (or, the same value plus one). parent.swf's enter frame handler calls myStaticMethod each time, as does child.swf's handler. When I load child.swf and it starts calling the method, it starts at 0.
bend line between two points   (195 Views)
I am looking for an answer concerning the following problem: I want to draw a bent line between two points. Simply using bezier curves won't do it though, as I want a fairly realistic behaviour and the two points are not necessarily on the same height. Any ideas would be appreciated. Silke
Talking between Classes   (105 Views)
Guys, I'm hoping you can help me out with either a method or maybe I just need a better understanding to wrap my head around. I've been building Flash programs with classes for years now but I've always only been able to talk "down" the heirarchy. If i wanted to talk "up" then I just referenced the root. For example (OLD WAY AS2.0 days) Code: class Main_Program { var myList:Array;var otherList:Second_Class;function Main_Program() {otherlist = new Second_Class();myList = [global values that all classes should use];} function talkDown() {//talking "down" to the class to use it's functions.otherList.sendData();} } And then for the Second_Class in order to talk "up" i'd do something like this. Code: class Second_Class {function talkUp() {//talking "up" to the Main_Program class by referencing the root.var usingGlobalValue = _root.mainProgram.myList[0];} } So my question is this, in AS3.0 the only way i can "talk" up, is if i pass the value to the function which needless to say is very cumbersome and annoying. What should I be doing to communicate between classes
Small space between .SWF and .PNG   (89 Views)
all. I can't figure out why there is a few pixels of spacing between my flash and the tops and bottoms of my 2 graphics. Its a real simple page and I just am using the top and bottom png's for display purposes. I set as many padding references that I know about to zero, but maybe I am missing one. Someone told me to use a table to do it, but I am trying to do the project without using any tables whatsoever. Otherwise I would have had this done already.
Moving between frames?   (114 Views)
, I have quite a large movie that I have built with 10 or so layers, that all live on frame one of the timeline, controlled by a single as3 file (of 700 or so lines) in my layer 'actions'. It all works well but now I need to add a loading screen before the frame I have built, and another frame of more code in the middle of the two. So essentially my 10 layer 1 frame effort that I have already needs to go last, and first i need a loading screen that upon loading goes to a new frame with a movie clip and as3, that when you click on the movie clip goes to the frame I have already built. Sorry if thats a bit vague, i'm just wondering where I should start looking for tutorials help on performing such a process. ie frame 1: loading screen -> frame 2: a movie clip and as3 -> frame 3: more movie clips and as3... Just wondering if im going about this the right way or if i've completely misunderstood the concept of frames, in which case how can i perform the type of three stage process i described.
AS3 CS4 help passing variables between MovieClips   (162 Views)
I'm trying to develop a site map, which draws a tick over the sections of my app that have been completed. I've figured out how to draw the tick and how to pass variables from root to the MovieClip that the function is in. To make the tick appear only after an mc has been watched, I tried setting a variable equal to 1 ino the last frame of the MovieClip, and telling the function to run if that variable was 1. I'm not getting compiler errors, but I'm also not getting the tick. And I'm definitely completing the Movie Here's what I've got so far: In root Code: var xcoord = 125; var ycoord = 300; var WaterComplete = 0; In WaterMovie Code: MovieClip(root).WaterComplete = 1; stop(); In SiteMap Code: function f_testDrawing(xcoord, ycoord) { var square:Sprite = new Sprite(); addChild(square);,0x00FF00);; drawShape(square);; square.x = xcoord; square.y = ycoord; function drawShape(sprite:Sprite):void {,0x00FF00);;,0);,5);,40);,40);,30);,20);,28);,0);; } } if (MovieClip(root).WaterComplete == 1) { f_testDrawing(MovieClip(root).xcoord, MovieClip(root).ycoord); } I'd love any help or suggestions, please! -A-
MX04 Variables between scenes? (possible?)   (122 Views)
Ive been messing around with variables all day and i just cant seem to find a way to have flash rember how many points i had in scene one to be dragged over to scene two for a simple animation then to go BACK to scene 1 to continue the game. Any ideas or is this a wild goose chase Nutshell: Can flash rember my score (var:score) over to scene two for a small animation then drag that very same score back over to scene one
Housing multiple mouth frames in one symbol and switching between them   (201 Views)
I read a tutorial a while back about making a symbol for a character's mouth in an animation, and making multiple frames within the symbol, with one for each different mouth position I'd like to use (Open and saying a certain letter, smiling, frowning, etc.). What I can't figure out is how to keep it from constantly animating repeatedly through all the mouth frames on its own in each shot when I just want it to stay in a certain position on certain sequences of frames. I also can't figure out how to select the precise frame I want when it needs to change. I'm using CS4, if that means anything.
Interaction between swf file & webpage   (105 Views)
Good day all, I have a swf file with some images inside. What I want is to update the information displayed in my webpage without refreshing the whole page. In the simplest way explained I know how to do this using a simple link using jquery: $(document).ready(function() { $("#refresh").click(function() { $("#Container").load("test.asp"); return false; }); }); However, what I exactly want is the same effect by clicking on the images that move around in my swf file: // Depending on the image you click on the swf file, the page should display different info in the same div target_mc.onRelease = function() { if (ruta.indexOf("AP") != -1){ //the next line doesn't work. I made it up indeed getURL("javascript:('#Container').load('test.asp ')"); //here the rest of if's which would point to a different page. } What I've found out till now is that this is ActionScript 2.0 and not 3.0. I suppose I'm getting closer to the solution with this ;). I'm fairly new in all this stuff. Does anyone know how to solve this problem Any kind of help will be much appreciated!
communicate between 2 nested swfs   (96 Views)
I am using a flipbook that I purchased on activeden. It loads swf files as pages. If have one video on page 1 (page1.swf) and one video on page 2 (page2.swf). Both pages are on the same spread. I want the video on page 2 to start after the video on page 1 has finished. So on page 2 I want to listen for a .complete from the video on page one. This is the code that I am using to load the video on page 1 where I need to listen for the .complete. import*; var flvObj:Object = new Object(); flvObj.complete = function() { }; my_flv.load("pages/pg1.flv"); my_flv.addEventListener("complete",flvObj); Thank you.
How to insert simple line between scaled tumbnails   (165 Views)
, I have a simple gallery that pull photos from folders, dislays thumbnails and then when user clicks on a thumbnail it displays larger image. Here is a link to a gallery: http://www.joannebuttnerphotography....decompiled.swf However I would like to insert s black line between thumbnails like shown here: Bellow is action script for flash. Can you please help me where I need to insert this line creation in script and what command I need to insert I would like to control the line color since I might play around what is the best color. Thank you very much. --------------------------------------- function abc() { // this["category" + choice].gotoAndPlay("over"); clearInterval(id); } function tempA(category) { this; _root; this.createEmptyMovieClip("bar", 100); bar._x = mask._x; bar._y = mask._y; bar.setMask(mask); an = new Array(); i = 0; while (i 200) { an[click] = true; id = setInterval(aa, 100); this.onEnterFrame = null; } } ; } } ; } ; bar.onEnterFrame = function () { this; _root; if (this.hitTest(_root._xmouse, _root._ymouse)) { if (_root._xmouse > mask._x + mask._width / 2 && this._x > mask._x + mask._width - this._width) { this._x = this._x - btnSpeed; return; } if (_root._xmouse < mask._x + mask._width / 2 && this._x < mask._x) { this._x = this._x + btnSpeed; } } } ; click = 1; bb(); } function nextImage() { pause_btn._visible = 0; play_btn._visible = 0; previous_btn._visible = 0; next_btn._visible = 0; if (p < total - 1) { ++p; percent.onEnterFrame = null; clearInterval(id); click = p; if (an[click]) { screen.unloadMovie(); screen.loadMovie(path["category" + i] + "/img" + click + ".jpg", 1); screen._alpha = 0; id = setInterval(aa, 100); percent.onEnterFrame = null; } else { screen.unloadMovie(); bb(); } slideshow(); return; } p = 0; screen.unloadMovie(); screen.loadMovie(path["category" + i] + "/img1.jpg", 1); screen._alpha = 0; id = setInterval(aa, 100); percent.onEnterFrame = null; slideshow(); } function firstImage() { screen.loadMovie(path["category" + i] + "/img1.jpg", 1); slideshow(); } function slideshow() { myInterval = setInterval(pause_slideshow, 5000); } function pause_slideshow() { clearInterval(myInterval); if (p == total - 1) { p = 0; firstImage(); return; } nextImage(); } Stage.scaleMode = "noScale"; numOfCategory = 9; numOfImage = new Array(); path = new Array(); numOfImage[1] = 10; numOfImage[2] = 10; numOfImage[3] = 10; numOfImage[4] = 10; numOfImage[5] = 10; numOfImage[6] = 10; numOfImage[7] = 10; numOfImage[8] = 10; numOfImage[9] = 10; numOfImage[0] = 10; path[1] = ""; path[2] = ""; path[3] = ""; path[4] = ""; path[5] = ""; path[6] = ""; path[7] = ""; path[8] = ""; path[9] = ""; path[0] = ""; btnSpeed = 2; btnGap = 80; choice = 1; tempA(choice); id = setInterval(this, "abc", 100); i = 0; while (i
Problems with Array data being transferred between frames   (111 Views)
The array is global, so it is there for all the frames. But when data is stored in the array in frame three, going back into frame two the data is wiped. I switched the order of the frames, and the program would freeze completely and almost crash Flash when it tried storing the data.
Different between Movie Clip and Graphic in Flash   (120 Views)
Hi , I'm a beginner in Flash and I want to know all differents betweent Movie Clip and Graphic & Also I want to know when I use graphic or Movie Clip
Actionscript to "connect the dots" between movie clips   (112 Views)
I am making an interactive map for my high school web page that allows a parent to put in their students classroom numbers and then the path is plotted on the map with numbered waypoints (loaded movie clips). What actionscript will draw a line between two movie clips or points
Passing Variables between movie clips   (111 Views)
ActionScript 3.0 question... The answer should be pretty easy to find, but I'm kinda stumped. I'm creating an asteroids clone for a practice project, and I'm instantiating all the objects dynamically from the library. I need a way to tell one movie clip (the ship) to pass a couple of variables (x and y rotation) to another movie clip (the shot), so that the shot can know the rotation of the ship which is needed to calculate the shot direction. I was under the impression you could just do: myClip.var1 = var2; but that doesn't seem to work.