ActionScript 3.0 :: DropDown Returns Null Error

Feb 2, 2011

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

[Code]...

View 0 Replies


Similar Posts:


ActionScript 2.0 :: Menu Navigation System - Dropdown Appears And Returns When The Dropdown Returns

Jul 15, 2004

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.

View 1 Replies

ActionScript 3.0 :: MC On Button State Returns Error #1009 - Null Object Reference

Sep 10, 2009

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)

View 4 Replies

Professional :: GetCharBoundaries Returns Null?

Mar 2, 2011

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

View 3 Replies

ActionScript 3.0 :: Function Always Returns Null?

Apr 25, 2011

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)

View 10 Replies

XML :: Flex - ArrayCollection Children Returns Null

Aug 12, 2009

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

View 1 Replies

Java :: GravityManager.getGravity() Returns Null?

Feb 27, 2012

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?

UPD:
From web.xml:
<servlet>

[code].....

View 1 Replies

ActionScript 3.0 :: Resursive Function Returns Null?

Oct 29, 2009

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){

[code]........

View 4 Replies

ActionScript 3.0 :: Array Pop Function Returns Null

Jul 25, 2010

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 ....

View 9 Replies

ActionScript 3.0 :: Global Var Returns Null In TextField

Aug 13, 2010

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;

View 7 Replies

ActionScript 3.0 :: Flash Facebook API GetFriends Returns Null

Jul 6, 2009

private function getFriends(thisSession:Facebook):void {
getFr = new GetFriends();
var thisCall:FacebookCall;
thisCall = thisSession.post(getFr);
[Code] .....

View 8 Replies

Flex :: SetFocus To TextInput Field - Returns Null

Jul 3, 2009

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.

View 5 Replies

Actionscript 3 :: Casting An Object Using 'as' Returns Null MyObject?

May 3, 2010

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:

[Code]...

View 4 Replies

Actionscript 3 :: Facebook Api: GetSession() Returns Null For User Name

Nov 2, 2010

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.

View 2 Replies

Flash :: Flex - GetApplicationVersion() Always Returns Null Version?

Feb 8, 2011

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 >
...

[code]......

View 1 Replies

Arrays :: Accessing Variable From Other Class Returns Null

May 10, 2011

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];

[Code].....

LevelData Class in PasteBin: [URL]

View 2 Replies

ActionScript 3.0 :: XMLLoader Class Returns NULL In Flash?

May 2, 2008

So I dived into AS3 and decided to create an XML Loader class.

Code:
package
{
import flash.events.Event;

[Code].....

View 7 Replies

ActionScript 3.0 :: FlashVars Root.loaderInfo.parameters Returns Null?

Jul 29, 2010

I continue, I must say I've searched on forum and on google and all the different kind of code didn't work On my actionscript panel, I have this:
 
import com.greensock.*;import flash.net.URLRequest;
import flash.display.Stage;import flash.display.LoaderInfo; 
var sujet_no:String = LoaderInfo(this.root.loaderInfo).parameters["sujet_no"];var timer:String = LoaderInfo(this.root.loaderInfo).parameters["timer"];var back_url:String =

[Code]...

View 7 Replies

Flash :: Calling A Method In Custom XML Class Returns Null?

Sep 7, 2011

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

package classes
{
import flash.display.*;

[code]....

View 1 Replies

ActionScript 3.0 :: Send Array Using AMFPHP And Get It Back - Returns Null

Jan 3, 2010

I am new to php and specially AMFPHP, now all I am trying to do is send and Array to PHP using AMFPHP and get it back, but it returns "null";.

Code:
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class Main extends Sprite {
[Code] .....

View 3 Replies

ActionScript 3.0 :: GetBmpData Returns Null When The SWF Is Accessed On The Remote Server?

Mar 17, 2010

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.

View 1 Replies

Actionscript 3 :: Casting A Retrieved Mediator With PureMVC As Its Proper Class Returns Null?

Jul 15, 2010

I have a mediator that I've registered for a navigation page:

facade.registerMediator(new NavPageMediator(viewComponent));

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.

View 1 Replies

Flex :: Alerts, Dropdown Calendar Of DateField, Cursors Resulting In Null Value References Once Embedded?

Aug 18, 2009

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.

View 1 Replies

ActionScript 3.0 :: Flash Updated CS4, Code Returns #1009: Cannot Access A Property Or Method Of A Null Object Reference?

Jun 7, 2010

I have two MC's on stage,

MCmenu is a button array,

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

View 1 Replies

Javascript :: Flash Embed Error - 'null' Is Null Or Not An Object

Jul 18, 2010

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.

'null' is null or not an object

try { document.getElementById("").SetReturnValue(__flash__toXML(function() { return document.location.hostname; }()) ); } catch (e) { document.getElementById("").SetReturnValue("<undefined/>"); }

but this is from flash script and i dont have control over it. it just say JScript - script block.

View 1 Replies

ActionScript 3.0 :: Null Object Error That Is Clearly NOT Null

Sep 15, 2010

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]

View 4 Replies

ActionScript 2.0 :: Dynamic Text Returns "null"

Jan 17, 2011

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?

View 1 Replies

ActionScript 3.0 :: String Alway Returns As "null"?

Jan 15, 2012

I fail to deliver a simple string via flashvars from the HTML-object-tag into the SWF to work with it.
I've stripped down everything to basics:

in HTML:
<param name="flashvars" value="myVideoFileName=teststring" />
in AS3 code:
var videoFileName:String = "";[code].........

What happens:In fact the string alway returns as "null" ... no matter what I try ... is there any basic thing I cannot see?

View 5 Replies

ActionScript 3.0 :: Getting Error After Creating Dropdown Nav Bar

Nov 23, 2010

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??

View 6 Replies

ActionScript 3.0 :: HitTest Works But Also Returns Error

Sep 5, 2009

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.

View 11 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved