Home | Search | Login | RSS
We have 1081 members and counting!
Next Page

1

Previous Page

Thread: ANny further guidance post tutorial

Created on: 09/04/10 02:06 PM

Replies: 13

dnetman99





Joined: 09/04/10

Posts: 17

ANny further guidance post tutorial
09/04/10 2:06 PM

The last tutorial was great. I have an idea, but was hoping for any code examples that anyone might have. What I want to accomplish, is convert powerpoint to swf(I think I have that part). Then I want to click a button from flex app admin interface that will tell all clients to see a new component container(I think I have that.) where i am sticking is what needs to occur to advance the clients slides that are converted in the swf. My guess is to either use shared object with sync event updating each slide from a click from the admin, or use broadcast message of the new slide to view. Is this the right direction? Does anyone have any sample code that might show this or any other method? What I am starting with is a viewer interface for 2 videos and want the powerpoint interface to show up over the videos but not occlude the audio.

Any help or ideas or code samples would be great.

Thanks

Link | Top | Bottom

Graeme





Joined: 10/18/07

Posts: 1593

RE: ANny further guidance post tutorial
09/07/10 10:10 AM

Converting powerpoint to SWF files is just a matter of finding a program that runs either on your computer and watches a folder or is run from the command line or server side coding in something like PHP or ASP or CFM etc. Or, you make the SWF files on the client side and upload them to the server. I don't know of any great software for that but doing a search on the internet should help quite a bit with that.


I would just use the broadcastMsg function to tell people when a new slide should be loaded in.

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/07/10 10:37 AM

Thanks,

I got it converted into slide per frame that is advanced on mouse click and can make it load. Where I am having trouble is how the server side fucntion should look and how the AS3 inside my flex app should call it, etc...

My idea is to first call to make the component visible, then make a call to qadvance the slide. Your tutorial was all in onConnectAccept and not sure how the function should look as a stand alone to take a command from the app and broadcast command back usng broadcastmsg(). Any examples would be great. using SWFloader in flex 4 and trying to expose next frame, etc... now just need the comunication with broadcastmsg()

ANy help would be great,

Thanks

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/08/10 6:25 AM

Alright, so now i understand that the onConnect or onConnect Accept is where it goes, I just need to figure out how it is called in order to send the broadcast message. Does it have to be a shared object that is called from flex and passed something that is in turn broadcast to a function on every client? Is it xxxSO.connect(nc,parm1,parm2) or is it more xxxSO.connect(nc,parm1,parm2,parmX)since I already have a username parm on the original connection? Is that parms still in the nc?

I think I am making head way, just gotta figure out how to advance slides as well with the same process.

Thanks again with any help that you can send.

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/10/10 8:20 AM

Does anyone know if flex 4 app if you need to do anything special for a function to accept a broadcastmsg() from the wowza server?

Link | Top | Bottom

Graeme





Joined: 10/18/07

Posts: 1593

RE: ANny further guidance post tutorial
09/10/10 8:38 AM

Nothing that I know of. You should be coding the same way that you do in Flash as it's all AS3 anyways.

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/10/10 8:51 AM

Weird then.

I have:

_appInstance.broadcastMsg("setPPVisible", "true");

That executes as far as I can tell in wowza debug.

I then debug myflex app function:

public function setPPVisible(setVisible:String):void{
Alert.show("Got It");

}
Just to see if I get it. Breakpoint never gets hit. Just did not know if I had to define anything differnt. I did not think so as I was going on your tutorial. Any ideas of trully seeing if it makes it on the client connection from wowza?

Thanks

Link | Top | Bottom

Graeme





Joined: 10/18/07

Posts: 1593

RE: ANny further guidance post tutorial
09/10/10 10:55 AM

did you define anything on your netconnection object? like the client object?

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/10/10 12:18 PM

var client:Object = new Object();

client.onBWDone = function():void
client.onPlayStatus = function():void
nc.client = client;

This is used for a video chat app as well, just trying to get some broadcastmsg to the client to make things visible as well ad control swf.

THanks

Link | Top | Bottom

Graeme





Joined: 10/18/07

Posts: 1593

RE: ANny further guidance post tutorial
09/10/10 12:32 PM

Well, you seem to know what you are doing so it may be rhetorical but, why don't you have?:


client.setPPVisible = setPPVisible;


There's only one way to catch calls on the netConnection object and you have to put the methods on the client object of it. Where you point it to from there is up to you.

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/10/10 12:59 PM

ok, well it is a flex component and usually you would call it by its id, ie ppload.visible = true; as it is false by default. So how would I emcompass the client part in that call. What I am seeing right now is that when I break on the function that the broadcastmsg() is supposed to call it never gets hit like I am not getting it or bringing it in or something into the app. in your tutorial you use client = this; since I do it the way I do with object should I do something else to actually get it to be seen by the app or do something to the function so that it could be.

soin a nutshell I was trying to get the broadcastmessage() to call this function:

public function setPPVisible(setVisible:boolean):void{
//Alert.show("Got It");

//trace("set control");
ppload.visible = setVisible;
}

but it never hits that so thats where I am trying to see if it comes in at all or a better way to catch it or see its actually coming in. I know this is rambling, but I would feel better to know its coming in which I can not prove yet unless you know of a way to see thato other idea.

Thanks again

Link | Top | Bottom

Graeme





Joined: 10/18/07

Posts: 1593

RE: ANny further guidance post tutorial
09/10/10 1:06 PM

I'm not sure how else to explain what I am explaining unfortunately.


You have to connect the client object of the netConnection to the function that is going to get called from the server. You don't have a choice there. You can't just declare some function in your app and expect it to magically get called by the server, you have to point it. In fact, you should be getting an error of some sorts if you have debugger player running as it will tell you that the function hasn't been declared on the client object of the netconnection object.


That's your first step. After that it's just a matter of a bit of code to point it off to your component via it's ID.

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/10/10 1:10 PM

so do you have any exapmle as to how to connect the client object of my netconnection to the function I have above? I have not found that on the net yet, so if you have a sample that would be great.

Thanks,

Link | Top | Bottom

dnetman99





Joined: 09/04/10

Posts: 17

RE: ANny further guidance post tutorial
09/11/10 3:22 PM

So everything previous is working now as expected. I have another quick question. I need to find a ppt to swf converter that I can control once loaded using mx.controls.SWFLoader and then cast to MovieClip and using gotoandstop. I used ispring free and it loads and works with mouse lcicks but when I use the gotoandstop all my code gets the correct parameters and executes but frames do not advance. So I thought it was the way they convert it. Has anyone used a conversion tool that will give me a SWF that can do this? Any help would be appreciated.

Thanks

Link | Top | Bottom

Next Page

1

Previous Page

New Post

Please login to post a response.