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


Similar Posts:


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 :: Using A Widget For Facebook Application - Get The Current User's Facebook ID?

Sep 24, 2009

I am using a Flex widget for my facebook application. How can I get the current user's facebook ID?

View 1 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 :: 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

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

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

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

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 :: Flash Player Only Returns The Domain Name Of The User's Machine?

Nov 19, 2011

I have developed a flex application (Flex 4.5.1).I want the flex application to be used only by the domain names that I allow. As soon as the application is loaded, I check with the remote database if the domain name is valid.

The problem is that flash player only returns the domain name of the user's machine. What I want is the domain name of the website that the flex application is part of. For instance, if the webpage I browse for my flash application is[url]...., I need [url]...or [url].... Is that possible? Every method I have tried only returns the name of the website visitor's computer.

View 2 Replies

ActionScript 3.0 :: Facebook Params Getting Null?

Jun 7, 2010

i m working on AS3 project and called an fbjs function but i found this parameter null (fb_local_connection) when i check others like fb_ fbjs_ connection this is also null, it happens first time to me, anyone knows whats the problem ??

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

Flash :: Getting User's Friend From Facebook Using As3

Mar 16, 2010

i have seen in flash game that it retrive user's friend in same application.How is possible.I searched the code but i have not found yet.

View 2 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

Flash :: Take A Picture From User's Webcam Ala Facebook?

Sep 25, 2010

I didn't find a recent question so somethign might have changed:

there is any widget, ready to use, to integrate with my website in order for my users to take a picture of themselves ala Facebook when they register to my site? i guess is Flash/flex based

View 2 Replies

AS3 :: Can't Retrieve A Facebook User's Friends List?

Apr 20, 2011

i am trying to write a facebook app using as3 and the facebook-actionscipt graph api library i am having trouble getting a user's friends list, while i have no problem getting a user's other data (favorite movies, for example)

[code]...

ok after doing some more searching i find that getting friends-of-friends with any api is impossible this is very interesting - you can access friends-of-friends manually as a facebook user, but not automaticallythis means it is not a privacy issue at all - it is something Facebook wants to keep for itself only - for the "People You May Know" section in the facebook page

View 1 Replies







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