Live Questions
We turn to our live students to see if they have questions.
Video Transcript
00:00So let's see, how could we solve this issue? Now, instead of adding our child directly to the stage, what we could do is instead of that, we could add a few event listeners, image one. So I just delete a comment to that instead of delete it. Okay, we're going to go to our image one, dot image one, dot add event listener.
00:24Oh, too much these. Perfect. Now, before I choose an event, I'm going to ask you guys a question. And let's see if maybe I will even let's do this. So let me ask you a question. How could I know what events does my image? What what what events does this object loader support? Okay, it's a fair question. We've been working out with objects for a while. We've seen a few events. Some of you've seen more events than others.
00:54And even if you don't know, try to take a take a guess, if you will, by the way, the way I got to that, by the way, is control space. Yeah, you know what, actually, I think that is a good answer, because it looks like that most of these events right here are relatively useful. But they're, I think you're right. I think they're, they're, they're, there's, it's a good way for searching for it. So I'm going to take that back and say, you know what, that's probably a good way of looking for it as well. So let's see what else use the Google S3 search engine. That is a really, really good answer.
01:35Carol and Danny, I like that question. I like that answer much more. So let's let's try it with that one. That was actually what I wanted. But your original answer was good. Just I like the searching with Google S3 better. So we know that we want to get their loader. And in our loader, we could go into basically you want to get into your action script three reference. And in our loader, all we have to do is just like scroll a little bit down, go to our events, show inherited events. And these are all the events that are
02:04relevant to our, to our loader. Now, I think that this is correlates also the stuff that came up in flash. But so I guess you have two options here. Well, this one will give you a little bit more info, if you don't really know what it is. So I think both approaches are good. All right.
02:19Control and space actually enables you. So if you're in the application, you can just click on control space. And that would give you the list of what's relevant at that point. Okay, so we know that we have that option. So if we go right back into the browser for a second, and in the browser, let's search for the stuff we want. First, we want to we want to get an event of basically when things are loaded. So we could search for and see maybe we have a loaded event or maybe a complete event. So we could search and see, is there a complete event?
02:49No, maybe there's a load. And really, in the beginning, this is really the way you would be searching for stuff until you stuff until you start getting more comfy with these stuff. And I'm going to show you how I would usually do it. So first of all, we see that there is no complete event. And that suggests just suggests us one thing. And I'm going to ask you guys, what does that suggest? And this is a really, really tricky, hard question. But the loader doesn't have a complete event. Why is that?
03:22And it connects to the it connects to something that we were talking about when we were talking about the flash vars. And that's my hint. And I can give you another hint in a minute if you can't figure it out yet. That's close. But think about when we're talking about the flash when we're talking about flash vars, we said that everything that's loaded into flash has some sort of object that contains all of its information. Right?
03:59Definitely. So we encountered an issue, we have our loader. Now one of our issues with our loader, we're searching here for a way to know when our event as completed when the load process is done. But all we see here is stuff that are related to display objects. So if we look into it, we'll see that this is a display object. And all our events are like mouse events, they're like gesture events, which are more like touch screen stuff, enter frame, these all these stuff are not really relevant to loading.
04:28Where is our loading? Now, I know this is a rough question and not a fair one, because we never really loaded anything together. But if you think again for a second, we were talking about flash vars in a previous video. In the flash vars, we said to access the flash vars, where did we have to go? Do you guys remember? We kind of we spent a little bit of time on that one. Where did we access the flash bar information? Bingo, loader info. Yep, exactly. That's the answer.
