I'm making a list of alarms to pick from. I've googled for answers the past two days but I cannot figure out what my problem is with this batch of code.
I've got 7 items in the menu and the dropdown works good as long as you do not select the item that is already displayed in the menu. You can select another item and then reselect the original item, but I get error "Cannot access a property or method of a null object reference." from
I'm having with a menu navigation system. I'm using Flash MX. I have created a menu system for the site I'm building ([URL]) where one of the buttons "Choose photographer" drops down a list of names. All the other buttons just jump to another page. The drop down is currently using tweens also the logo moves to the left as the dropdown appears and returns when the dropdown returns. All working fine apart from its a bit jerky.
It's I just wanted to get away from tweening and use action scripts instead, as I'm a newbie to all things Flash I trawled the net for tutorials and examples so that I could cobble together the exact same effect. I have managed to get the drop down work and return using the action script and it does seem smoother and works slightly better. But can I get the logo to move to the left and back in time with the drop down...no.
I have a button at the start and end of a short timeline, it works fine. But when I add a simple MC to the up state of the button, flash gives me this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at BtnWithMCinside_fla::MainTimeline/frame18() The 'mc within a button' method has worked great until that button is placed beyond the first frame. why this is happening and how to fix it? (SWF attached)
trying to cut text field to single letters and then do some animations on each letter. But, how do I know where to place (position) the letters? I tried using getCharBoundaries but once it reaches 3rd line, it keeps returning null values. Anybody knows why that happens
I've got an object inside an object. The child object basically loads a variable from SQL into one of it's own public variables. The SQL works 100%, because it traces out correctly.Now I've wrote a function from the child.as
Code: public get_var() : String { return var_yes_friggin_work;[code].....;
Of course the files arn't called Parent.as and Child.as I've just had to rename them because our work is monitored though checking the internet and I can't delete this form.The FilePathOriginal doesn't output anything unless the string is manually set from the child, does anyone know where I'm going wrong here? (I can't upload all my code because of the monoriting process)
I have an ArrayCollection with following structure (when viewed in debug mode): [0] - [0] -- src - [1] -- src src is the path to an image.
I need to get all of the src's out of the arraycollection. However because of the first (unnamed) node I can't take them in. I've tried ArrayCollection[0].children and save the result in another ArrayCollection, however the new ArrayCollection has 2 Objects in it but no 'src'. There are just 2 null objects firstArrayCollection is filled with the data as described above. secondArrayCollection.addItem(firstArrayCollection[0].children);
When viewing the content of secondArrayCollection i see following structure (and data): [0] null [1] null
I'm trying to implement Gravity from GraniteDS. I did everything like in example from GraniteDS website, but when I'm trying to get gravity from servlet context, ravityManager.getGravity returns null. Here is the code: Gravity gravity = GravityManager.getGravity(contextManager.getServletContext());What can be the reason of this error?
I have created a Composite Pattern type structure, with TreeNodes and TreeLeaf Objects.I works fine, except when I seach in the treestructure for TreeNodes and TreeLeafs in a resurve function with a loop, the function returns null - even on a successfull match.
public function traceTree(inComponent : TreeComponent = null) : TreeComponent{ var parentComponent : TreeComponent = inComponent; if(inComponent == null){
ActionScript Code: public function draw():Card{ return deck.pop(); //deck = array of Card } Does not work. Firstly it runs an error which says "cannot convert [] to Card"... Shouldn't it pop() return just ONE element?
Then I correct like this ActionScript Code: public function draw():Card{ return deck.pop() as Card; //deck = array of Card }
And now I get no errors but the function returns null.... why? If I try this: ActionScript Code: public function draw():void{ trace(deck.pop()); //deck = array of Card } It prints [Object Card] which is how it should be ....
I have a small issue, which is important for my project though. Namely my global var returns null when I need it. I have a global var class: Code: package { public class Global { public static var premiseGlobalName:String = new String(); }}
In another class I'm setting this var like so: Code: public function onButtonRollOver (event:MouseEvent):void { Global.premiseGlobalName = "My home"; this.addChild(premiseMenu); }
The second line in the method calls another class to the stage which uses the global var. I trace the global var: Code: public function initPremiseMenu():void { trace("GLOBAL: " + Global.premiseGlobalName); } But it returns an empty value.
I want to use the global var in a textfield like so: Code: premiseTip.text = Global.premiseGlobalName;
private function getFriends(thisSession:Facebook):void { getFr = new GetFriends(); var thisCall:FacebookCall; thisCall = thisSession.post(getFr); [Code] .....
I have an app where I am looking to make the enter key act like a tab key. I can easily capture the keypress event and setFocus to a textinput field. The problem is figuring out which textinput field to give focus to. I have this code
trace(this.window.focusManager); //returns TheWindow86.focusManager trace(this.window.focusManager.getNextFocusManagerComponent()); //returns null //This is what I was hoping would work this.window.focusManager.getNextFocusManagerComponent().setFocus();
The code is in a controller class and "this.window" references an instance of a nativeWindow mxml file "TheWindow.mxml". The first trace works as expected, but the second one gives null.
I am trying to create a custom object in AS3 to pass information to and from a server, which in this case will be Red5. In the below screenshots you will see that I am able to send a request for an object from as3, and receive it successfully from the java server. However, when I try to cast the received object to my defined objectType using 'as', it takes the value of null. It is my understanding that that when using "as" you're checking to see if your variable is a member of the specified data type. If the variable is not, then null will be returned.
This screenshot illustrates that I am have successfully received my object 'o' from red5 and I am just about to cast it to the (supposedly) identical datatype testObject of LobbyData:
I'm starting a facebook app using iframe method.I am using flex and so far I am able to connect to fb (login and out). Now I am trying to retrieve current logged in user name. In the document I see this function is what I need. Facebook.getSession().A tutorial in adobe site uses desktop api and it works for desktop (AIR app) but not for web app. (yes, i fixed Facebook.getSession() instead of FacebookDesktop.getSession(); Also, I am able to see the uid but not the user. User returns null. uid is a string and user is an object. But on the desktop app,FacebookDesktop.getSession().user.name returns the name perfectly. but on the web, it does not.
I'm currently working on a Flash application that has a sibling AIR equivalent. From inside the Flash application I would like to install the sibling AIR App. Adobe has provided an air.swf (which is also used in the Badge sample) to aid us with the install. I've managed to mimic the behavior of the Badge app butgetApplicationVersion always returns null. Note that I do not have a publisherId. Here's the documentation provided by Adobe: Installing and running an AIR applications from a web page
Air application XML: < id >MyAirApplication< /id > ...
I did a separate levelData class to be able to flexibly add levels. I was happy with it until my supervisor ordered me to convert my levelData into XML. I did an XML version of the levelData's data (question, answers, correct answer...). I used the old class and converted it so that it fetches the XML.
All seems well, I did traces of my answers array and it printed nicely...
But the headache started when I tried this.
// This code appears in a different class with // currentLvl:LevelData initialized in the constructor. quizHolder.ansA.ansHud.text = currentLvl.choices[1];
I am trying to call a method that has some xml functionality and It keeps coming up null.What I am trying to do is; I have a page that has four dynamic text fields that get their content from an xml file. I would like to create a method that will output the contents to display in the dynamic field. Maybe my approach is WAY off here, but my supervisor wants all xml related tasks contained in a xml.as fileMain.as
The Document class loads a list of external bitmap images. As the images are loaded, the following takes place for each:
Code: var obj:Object = new Object(); obj.bmpData = bmp.bitmapData; obj.bmpFilename = bmpFilename; bmpDataList.push(obj);
As you can see, an object is created and the bitmapData is stored inside of it. This object is added to an array.Later, when a key is pressed, a new instance of a class is created. A function is called that retrieves the appropriate bitmapData and this is passed to the constructor of the new instance. Example:
Code: //Instance is created: var newChar:BaseChar = new LowA(getBmpData("a"));[code]....
The problem is that getBmpData returns null when the SWF is accessed on the remote server. Result = no images seen. It works just fine locally.
I'm trying to retrieve that mediator on another page like so:
var navPageMediator:NavPageMediator = facade.retrieveMediator(NavPageMediator.NAME) as NavPageMediator;
However, that statement returns null. If I try to cast it using the NavPageMediator(facade.retrieveMediator(NavPageMediator.NAME)) syntax instead, I get a TypeError: Error #1034: Type Coercion failed: cannot convert com.website.mvc.view.page::NavPageMediator@237560a1 to com.website.mvc.view.page.NavPageMediator.`
I can't, for the life of me, understand why NavPageMediator@237560a1 would be unable to convert to NavPageMediator, nor what happened in between registering the mediator and retrieving it that caused this. Especially since trace(new NavPageMediator() as NavPageMediator); returns [object NavPageMediator].
Incidentally, and this may be part of my problem, I don't understand what the @hash at the end of the object is (@237560a1). Is it simply an internal identifier for that class instance?
Edit:Left a bit of important info: The SWF in which I instantiate and register the mediator is separate from the SWF in which I try to retrieve it.
I have a Flex application embedded in a Flash application, which was working fine and currently works fine if not embedded. As of last Friday, when embedded the Alerts do not show (no error, just nothing), DateField Calendar dropdowns do not show (null value reference of DateField), and dynamically showing the busy cursor errors (null value reference). My code for the Flex app did not change, and I can't think of any reason outside of Flash Player updates (which I think unlikely) or something has changed in the Flash application that is embedding it.
MCtext is a collection of text with frame labels. It's labeled as MCtext
The menu buttons tell MCtext to play the frame label as the button clicked. This *used to work*, but Flash was laggy as hell so I updated it. Now the same code returns #1009: Cannot access a property or method of a null object reference. at MCmenu/itemClicked()
Code: function itemClicked(butn:Event):void { parent.MCtext.gotoAndPlay(SomeArray[butn.currentTarget.label); }
I've tried just using a frame number, but still the same #1009
I've tried the Script Assist to target the MC on the stage: using root.MCtext... still the same #1009 using this.MCtext... returns a #1010
the script i wrote is working fine. but the script attached to the flash player which i have no control over is throwing a script error (im using IE8).how can i fix this? if i run it locally there is no error.
I have the following piece of code(part of a much bigger program). I this code I am re-using a motion that has been previously used successfully. The trace stmts are used to identify the exact location of the error and the error conditions as best I can.[code]
My dynamic text returns null instead of pulling the info i want from my xml file. here is my actionscript and here is my xml. the really weird thing is that i had it working at first. the only thing i changed was the name of the xml file. i used to be called "test" but i needed it to be named something more appropriate so i changed the filename and then i changed the actionscript where it is parsed. so it SHOULD work... but it doesnt. here is what you see instead of the correct info. it seems like the link between the xml and the fla are not communicating with each other anymore, is there anyway i can check to see if the parse is correct?
TypeError: Error #1009: Cannot access a property or method of a null object reference. at index2_fla::navBar_1/frame10() at flash.display::MovieClip/gotoAndPlay() at index2_fla::navBar_1/fl_MouseOverHandler_2()
I'm getting this error after creating a drop down nav_bar for a flash site i'm currently working on the action script: photosim_btn.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler); function fl_MouseOverHandler(event:MouseEvent):void { gotoAndPlay("p_down"); } graphics_btn.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler_2); function fl_MouseOverHandler_2(event:MouseEvent):void { [Code] ..... The first section of script works properly but when I mouse over the other buttons the error message above is what I get. Did I not label something correctly??
Perhaps I should leave well enough alone, but it bugs me that my hitTest gives me an error message even though it seems to work as intended. I have two movieClips running side by side. The second clip, the hitTest object is actually in an array that I keep pushing every second.
[Code]...
I have tried to trace cars[i].name and it returns "instance XXX" instead of what I would have expected, which would have been something like cars1, cars2, etc... If that is creating the error, I don't know how to fix it. I have thought also that perhaps the array itself is being referenced, but again I wouldn't know how to change it.