Hi Bax,
Thanks for replying. I've tried this, however it's not recognising 'Params'. Here's my basic setup:
Code: Select all
package com.cavia.avatar {
import com.cavia.ui.ChatBubbleMC;
import com.cavia.ui.ThumbsUpIconMC;
import com.greensock.TimelineMax;
import com.greensock.TweenAlign;
import com.greensock.TweenMax;
import com.greensock.loading.DataLoader;
import com.smartfoxserver.openspace.engine.control.events.MapInteractionEvent;
import com.smartfoxserver.openspace.engine.model.avatar.Avatar;
import com.smartfoxserver.openspace.shared.view.items.Tile;
//Added to try and see if this has the missing 'Params'.
import com.smartfoxserver.openspace.engine.control.events.OpenSpaceEvent;
import com.cavia.openspace.AvatarManager;
import com.cavia.openspace.MapEditingManager;
import com.cavia.openspace.MapInteractionManager;
import com.cavia.openspace.MapsLoadingManager;
import com.cavia.smartfox.SFSEventHandlers;
import com.smartfoxserver.openspace.components.flash.OpenSpace;
import flash.display.DisplayObject;
import flash.display.MovieClip;
import flash.display.Shape;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.URLVariables;
import flash.utils.getDefinitionByName;
import flash.utils.getQualifiedClassName;
Code: Select all
public function onMouseOverAvatar(evt:MouseEvent)
{
trace("Here Nige - evt.params.id: " + evt.params.id);
trace("Here Nige - global.MyUserID: " + global.MyUserID);
if (evt.params.id != global.MyUserID)
{
this.pThumbIconMC.visible = true;
}
if (this.pThumbsupTimeline != null) {
this.pThumbsupTimeline.kill();
}
var myTimeline:TimelineMax = new TimelineMax();
pThumbsupTimeline = myTimeline;
myTimeline.insertMultiple([new TweenMax(this.pThumbIconMC, 0.5, {alpha: 1.0})], 0, TweenAlign.START, 0.0);
myTimeline.insertMultiple([new TweenMax(this.pThumbIconMC, 0.5, {alpha: 1.0})], 3.0, TweenAlign.SEQUENCE, 3.0);
myTimeline.insertMultiple([new TweenMax(this.pThumbIconMC, 0.5, {alpha: 0.0})], 3.0, TweenAlign.SEQUENCE, 6.0);
}
public function onMouseOutAvatar(evt:MouseEvent)
{
//this.pThumbIconMC.visible = false;
}
public function onMouseThumbsUp(evt:MouseEvent)
{
//this.pThumbIconMC.visible = false;
//trace("Thumbs Up Clicked lets try again");
//global.MyThumbsUp = 1;
trace("Here Nige - evt.params.id: " + evt.params.id);
trace("Here Nige - global.MyUserID: " + global.MyUserID);
if (global.MyThumbsUp > 0 && evt.params.id != sfs.mySelf.id)
{
var request:URLRequest = new URLRequest("http://www.somewebsite.com/game_site/php/clientUpdateUserInfo.php");
var data:URLVariables = new URLVariables();
data.a = "upThumb";
data.sk = "hash";
data.Dat = global.MyFacebookID;
request.data = data;
request.method = URLRequestMethod.POST;
var loader:DataLoader = new DataLoader(request, {name:"userInfo"});
loader.load();
global.MyThumbsUp -= 1;
global.CaviaMapViewer.ui_header.thumbs_up_count.text = String(global.MyThumbsUp);
}
}
/avatar/AvatarCharacter.as, Line 969, Column 46 1119: Access of possibly undefined property params through a reference with static type flash.events:MouseEvent.
/avatar/AvatarCharacter.as, Line 972, Column 12 1119: Access of possibly undefined property params through a reference with static type flash.events:MouseEvent.
/avatar/AvatarCharacter.as, Line 1002, Column 46 1119: Access of possibly undefined property params through a reference with static type flash.events:MouseEvent.
/avatar/AvatarCharacter.as, Line 1005, Column 37 1119: Access of possibly undefined property params through a reference with static type flash.events:MouseEvent.
/avatar/AvatarCharacter.as, Line 1005, Column 50 1120: Access of undefined property sfs.
Do you know what I'm missing?
Thanks!