Be a Supporter!
Response to: favorite dj Posted August 26th, 2012 in General

DJ Pon-3.

favorite dj

Response to: "Swapping" movieclips, as2 Posted February 14th, 2012 in Game Development

There's nothing wrong with AS2. I still use it for everything unless AS3 is required. I find it much easier, but if you are familiar with C++, AS3 may be easier for you.

Anyway, as someone pointed out, that code is in fact AS1, not AS2 or 3. In AS2, the code would look something like this:

on(release){
this.page1._visible=false;
}

I think that's what you're trying to do.

Response to: Referencing variables from packages Posted February 14th, 2012 in Game Development

At 2 minutes ago, milchreis wrote: Next time, please link to the full documentation and not jsut the interface documentation.
One can assume that there is a component you drag on screen because the documentation is contains only an Interface (and Event).

So here's the "actual" documentation: http://www.livestream.com/userguide/index.php?title=API_for_
Flash_Developers

Sorry, I didn't know how much was needed

Secondly, don't tell us things like "I tried so many things, nothing worked", because that doesn't provide any useful information at all. If everything worked, you wouldn't have opened this thread.

Sorry, I guess it was just an attempt to gain more help. The point is, I tried just about every possible variable in place of "livestreamPlayer" and even tried the :String and .text and everything AS3 sometimes seems to require.

The purpose of an error message is to tell you what's wrong. If you struggle to understand them, post them here and we'll tell you.

1120: Access of undefined property player.
and
1119: Access of possibly undefined property currentContentTitle through a reference with static type com.livestream:LivestreamPlayer.

are the most common ones I get. They only display at compile-time, so it's something to do with the external .as files. I understand them though, it's saying I've not defined the variable, but I'm trying to reference the variable currentContentTitle, which is a read-only variable that should already be defined somewhere in the API.

Obviously: post the code you have. How shall we help you without knowing what you are doing?

Here is a concise version:

var pvar:String;
var nplaying:TextField;
addEventListener(Event.ENTER_FRAME, event1);
function event1(event:Event) {
pvar=livestreamPlayer.currentContentTitle;
nplaying.text=("Now Playing: "+pvar);
}
On to the problem:

As you say you can play the video, I guess you have the component on screen and the developper key is accepted?

Yes, the developer key doesn't do anything offline. It works either way.

In the above link, there is an example on how to interact with the player properly.
Did you wait for the readyEvent?

No, I'm having the same problems here trying to reference any events. I'm sure it's just me being a noob at AS3. As I said, this is my first time using it. If it was AS2, I could get the whole thing done in under an hour, no problem. AS3 isn't particularly easy to look at, I guess it just takes some time to get used to it.

You should never do busy waiting (constantly checking if a variable is "undefined") if ou can avoid it.
Neither in As2 nor As3.

The idea of the Events is simple. The Object will tell you when it's ready, you don't have to constantly ask.

Makes sense, if only I could implement it.

Response to: Referencing variables from packages Posted February 14th, 2012 in Game Development

At 27 minutes ago, Mattster wrote:
At 6 minutes ago, ElectroKitty wrote: Hi, I'm trying to make a player for a livestream channel, I've got the player working from the API working nicely, but I'm trying to reference a variable I can apparently use from the documentation, currentContentTitle. How exactly would I reference this variable to use in a text field? I've tried everything I know, but this is my first time using AS3 properly. It's probably something really obvious, but each time I try something, I get various errors relating to it being undefined or whatever.
The player object is a subclass of the ILivestreamPlayer, so you should be able to access it directly from it's instance.

Wherever you instantiated your object,
ex: var player:Player = new Player();

You would reference player.currentContentTitle.

My guess is that it is undefined because you are trying to access it right off the bat. There would likely be some sort of event (Event.COMPLETE, Event.LOADED) you would listen for before trying to access the variable.

Thanks, there is an event "CONNECTION_EVENT" that does something when loaded, but I can't seem to reference that either, I keep getting something along the lines of "access to undefined property". If this was AS2, I could just reference the variable as an object, and it would appear when it is eventually defined. I could then have an

if(var=="Undefined"){
var="loading"
}

to fix that. AS3 seems considerably different.


Hi, I'm trying to make a player for a livestream channel, I've got the player working from the API working nicely, but I'm trying to reference a variable I can apparently use from the documentation, currentContentTitle. How exactly would I reference this variable to use in a text field? I've tried everything I know, but this is my first time using AS3 properly. It's probably something really obvious, but each time I try something, I get various errors relating to it being undefined or whatever.

Response to: The Official Mlp:fim Crew Posted January 29th, 2012 in Clubs & Crews

At 1/29/12 12:42 PM, Ragnarokia wrote:
At 1/29/12 10:35 AM, Manly-Chicken wrote:
At 1/29/12 10:06 AM, 123mine123 wrote: I cant believe they made a MLP episode with an alcoholic beverage in it...
But I guess, know will be any wiser...at least for the kids.
Also what does cider taste like?
Apple Cider isn't alcoholic.
Like I said before.
http://en.wikipedia.org/wiki/Apple_cider
It's funny because since I'm British I just saw it as the type of cider we have which is alcoholic the whole episode. Got to love it.

I'm also British, I knew they would be talking about the American cider which is basically just carbonated apple juice, but I thought it was funny that the animators seemed to imply that it was the alcoholic version.

On a side note, are any UK bronies attending the London meet on the 4th? Sorry if it's already been brought up, I've only just really found this thread. I will be attending a fur meet in London at the same time, so I'm not able to confirm my attendance to the brony meet, but I'll be sure to attend if I have any free time or whatever.

Response to: Cupcakes is fine, Posted January 29th, 2012 in General

I actually found cupcakes slightly worse, as SAM was too overdone and out-of-character. It just wasn't written well enough to seem realistic, and even cupcakes wasn't as bad as some made it out to be. I also read my little dashie the other day, I didn't really find it sad as some described it, I thought it was quite a good story.

One that did get me sobbing though was "To be an Alicorn", I don't know if it will still be as sad if any of you read it out of context, but it's a continuation from Spark, my favorite fanfic. It's quite long though, about 70 pages A4 in a size 12 sans-serif font, including paragraphs, so I don't expect any of you to read it.

Response to: Favorite anime theme song? Posted January 18th, 2012 in General

So far, so near ^.^

Response to: Theres a Furry at your door Posted January 11th, 2012 in General

I'd probably give him a massive hug and then ask why he's here and what he wants, then see if we can be friends. Furries are hard to find where I live.

Response to: TV Shows you've watched completely? Posted January 3rd, 2012 in General

MLP: FiM
Stratos 4 (anime)
The Inbetweeners (UK comedy)
Friday Night Dinner (UK comedy)

Response to: Error 1046: AS3 Posted January 2nd, 2012 in Game Development

At 1/2/12 06:24 PM, ProfessorFlash wrote: Have you imported the timeevent?

import flash.events.TimerEvent;

No, I just tried that and I now get 6 errors, 3 1046s and 3 1180s all related to that bit of code. The thing is, it works on its own in another flash file (same flash player/version and everything).

One thought though, could it be because I'm using external .as files and code on the frame?

Error 1046: AS3 Posted January 2nd, 2012 in Game Development

It's my first time using AS3, and I'm having a bit of trouble migrating from AS2. I've found some guides that have got me by so far, but I've got a weird error I can't seem to fix. It says "1046: Type was not found or was not a compile-time constant: TimerEvent." and this is the piece of code it is referring too:

var loadTimer:Timer=new Timer(5000);
loadTimer.addEventListener(TimerEvent.TIMER, timerListener);
function timerListener(e:TimerEvent):void {

Strange thing is, it works in a new flash document, but not the one I'm working on (with external AS files and that), but there's no reused variables/mismatches or anything like that, so I don't see what the problem is. Another one is trying to get a loaded image to centre, In AS2 I could just use something like:

_root.image._x=((stagewidth-image._width)/2)

but AS3 doesn't like it (with the new property names of course). I think it's because I had to create a bunch of different variables and objects to load the image. Tracing image.width just returns 0, I think because it's just a placeholder for the actual image. I tried creating another variable to get the image width from the server where the image is hosted, but it didn't work out too well. Any help would be great.

Response to: My Little Pony. Posted December 25th, 2011 in General

Yes