dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 38 of 38

Thread: techy question

  1. #21
    Member
    Join Date
    Aug 2003
    Posts
    34
    i've concluded that i am more confused following all of you submitions than i was when i started.

  2. #22
    FCS dude Ultimate99's Avatar
    Join Date
    Mar 2003
    Location
    Tokyo, Japan
    Posts
    120
    I have a pretty good feeling that you're trying to get the hang of Flashcom by copying and pasting code from other places without really understanding what it does and 'hoping' it'll all come together and 'connect' (no pun intended).

    That's cool, we've all done it, but it doesn't work so well with flashcom because there are so many things to think about, especially with the app you are trying to build. If you have the basics down then this wouldn't seem so hard I think and I truly suggest picking up the docs and going over them bit by bit. There are also a couple of recommended books on this forum that you might want to pick up.

    I know you're getting some great help over on MM's forum but I just want to clarify what I meant in my last message.

    connVal = my_nc.connect(con);

    The worst thing about this is that you are calling your sharedobject and netConnection the same thing... my_nc. This is bad. Maybe change that up. But... even if it was properly named my_so or something like that you will still need a value in con, so when you call the getmy_nc() (which is quite a misleading name..) you should pass in the netConnection object. So.. in your on status function I would call that function like this: getmy_nc(this);

    Then on the getmy_nc(nc) function you accept that object and use it to connect up the shared object.

    I hope I haven't confused you more...

    I've decided to add how I would write this code (untested but should work)

    conn_nc=new NetConnection();
    ringer_sound=new Sound();
    riner_sound.attachSound("ring");


    conn_nc.onStatus=function(info){
    if(info.code=="NetConnection.connect.success"){
    getSO(this);
    }else{
    getError();
    }
    }

    function getSO(nc){
    ringer_so=SharedObject.getRemote("ringer",nc.uri,f alse);
    ringer_so.onSync=function(){
    playSound();
    }
    ringer_so.connect(nc);
    }

    function playSound(){
    ringer_sound.start();
    }

    conn_nc.connect("rtmp:/remoteobjectsitetool");
    Last edited by Ultimate99; 09-08-2003 at 11:34 PM.
    it's all about giving it a shot, then it just goes from there

    English blog: www.sti-media.com/blog
    Japanese blog: www.3enhancedesigners.com
    FCS Tutorials:www.flashcomguru.com

  3. #23
    Member
    Join Date
    Aug 2003
    Posts
    34
    thanks for still working with me. i'm just really frustrated. i'm learning you know!?

    Here's where I'm at. The code now looks alot easier to understand.

    // Open connection to FlashCom
    //create sound object
    // Handle debug status message
    // get shared object
    //ring the bell
    // show uniform resource indicator

    and the buttons code

    function playSound(){
    ringer_sound.start();
    }

    I still can't get it to work however.

  4. #24
    Member
    Join Date
    Aug 2003
    Posts
    34
    i just tested it in the app inspector and the shared objects aren't showing up.

    ?

  5. #25
    FCS dude Ultimate99's Avatar
    Join Date
    Mar 2003
    Location
    Tokyo, Japan
    Posts
    120
    My typing mistake. Change this:

    NetConnection.connect.success

    to this:

    NetConnection.Connect.Success

    All capitals on the first letter..

    and it should work fine
    it's all about giving it a shot, then it just goes from there

    English blog: www.sti-media.com/blog
    Japanese blog: www.3enhancedesigners.com
    FCS Tutorials:www.flashcomguru.com

  6. #26
    Member
    Join Date
    Aug 2003
    Posts
    34
    ok.. shared objects are working.. but the application is not.

    I feel that I've arranged the code wrong. The code you wrote I put in both the send flash and the receive flash.. is that correct?

    The play function should only go in the recieving flash..
    and the sending flash I'm confused about the button.

    -------------------------
    on (release) {
    //ring the bell
    function playSound(){
    ringer_sound.start();
    }
    }
    -----------------------

    Besides me not even being able to get this function to play a sound, shouldn't it be sending a get object?

  7. #27
    FCS dude Ultimate99's Avatar
    Join Date
    Mar 2003
    Location
    Tokyo, Japan
    Posts
    120
    I thought about this just before I fell asleep last night for some reason and remembered that I hadn't written the code to have the ringer work or be called.

    On the admin side

    ringer_so.ringBell=function(){
    playSound();
    }

    On the user side

    on (release) {
    //ring the bell on the admin side by calling the SO function for it
    ringer_so.send("ringBell")
    }

    I'm pretty sure that will work.
    it's all about giving it a shot, then it just goes from there

    English blog: www.sti-media.com/blog
    Japanese blog: www.3enhancedesigners.com
    FCS Tutorials:www.flashcomguru.com

  8. #28
    Member
    Join Date
    Aug 2003
    Posts
    34
    i just wrote that and almost got it right.. anyway.. I have yours.

    Still doesn't work.

    Could you look at the fla's?

  9. #29
    FCS dude Ultimate99's Avatar
    Join Date
    Mar 2003
    Location
    Tokyo, Japan
    Posts
    120
    I won't have time to go over your files for a bit here (bogged down with work) so I would suggest testing if the function is getting called by having something other than the sound go off. Maybe something visual. If that isn't getting called then maybe both clients aren't connected up to the SO properly.

    If you haven't figured it out by the end of the weekend I'll see if I can get back to it.. though hopefully somebody else will be able to step in, or you figure it out.
    it's all about giving it a shot, then it just goes from there

    English blog: www.sti-media.com/blog
    Japanese blog: www.3enhancedesigners.com
    FCS Tutorials:www.flashcomguru.com

  10. #30
    Member
    Join Date
    Aug 2003
    Posts
    34
    ultimate.. I just can't make it work.

  11. #31
    Member
    Join Date
    Aug 2003
    Posts
    34
    I can't seem to make the receiving end do anything. It's not getting the message at all.

  12. #32
    FCS dude Ultimate99's Avatar
    Join Date
    Mar 2003
    Location
    Tokyo, Japan
    Posts
    120
    Admin Code:

    // Open connection to FlashCom
    conn_nc = new NetConnection();
    //create sound object
    ringer_sound = new Sound();
    ringer_sound.attachSound("ring");
    // Handle debug status message
    conn_nc.onStatus = function(info) {
    trace(info.code);
    if (info.code == "NetConnection.Connect.Success") {
    getSO(this);
    } else {
    getError();//not used yet
    }
    };
    // get shared object
    function getSO(nc) {
    ringer_so = SharedObject.getRemote("ringer", nc.uri, false);
    ringer_so.onSync = function() {
    //ring it when they come in
    ringTheBell();
    };
    ringer_so.ring=function(){
    trace("ring was sent");
    ringTheBell();
    }
    ringer_so.connect(nc);
    }

    function ringTheBell(){
    ringer_sound.start();
    }


    Client code:

    // Open connection to FlashCom
    conn_nc = new NetConnection();
    // Handle debug status message
    conn_nc.onStatus = function(info) {
    if (info.code == "NetConnection.Connect.Success") {
    getSO(this);
    } else {
    getError();//not used yet
    }
    };
    function getSO(nc) {
    ringer_so = SharedObject.getRemote("ringer", nc.uri, false);
    ringer_so.onSync = function() {
    trace("synced up");
    this.send("ring");//sending a ring when we log in
    };
    ringer_so.connect(nc);
    }

    m_btn.onRelease=function(){
    trace("button pushed");
    ringer_so.send("ring");
    }

    Your client side never would have worked because the movie was continuously looping through about 20 frames. I deleted those and cleaned the code a bit. Compare it to yours and you'll see where you might have been mistaken I think.

    Good luck there.
    it's all about giving it a shot, then it just goes from there

    English blog: www.sti-media.com/blog
    Japanese blog: www.3enhancedesigners.com
    FCS Tutorials:www.flashcomguru.com

  13. #33
    Member
    Join Date
    Aug 2003
    Posts
    34
    Thank you so much for the help ultimate. Is there anyway I can repay you?

    Ok.. I've replaced the code.. deleted all of the extra frames.. named the button instance m_btn per your code but I don't see anything else. It doesn't work yet and I'm not sure if I did something wrong. They don't even come up in the app inspector.

    Any ideas? Did you get it working on your end?

    thanks again ultimate

  14. #34
    FCS dude Ultimate99's Avatar
    Join Date
    Mar 2003
    Location
    Tokyo, Japan
    Posts
    120
    I didn't include the connection line in the code above so you might not be even connecting up if you replaced all the code. Is that it?

    Also, I hear you've been spamming others mailboxes with your links and asking for help... it's up to you who you want to alienate and piss off but I strongly suggest refraining from doing that, as:

    1. It doesn't help the community to get personal help. Your questions and answers to those questions help a lot of people who are too lazy or embarrassed to ask around.
    2. Not too many people want to be a private help desk to you or anybody else (even if they are big helpers in the community)
    3. It's rude, unless you are trying to procure services from that person and are willing to pay.

    Though I cannot speak for all, but so far this is a general consensus. If I'm way off, I'm sure somebody will correct me here.

    Anyways, the code above worked fine for me, so the only thing I can think of is that you are not connecting up to the server properly. Might want to check up on that
    it's all about giving it a shot, then it just goes from there

    English blog: www.sti-media.com/blog
    Japanese blog: www.3enhancedesigners.com
    FCS Tutorials:www.flashcomguru.com

  15. #35
    Member
    Join Date
    Aug 2003
    Posts
    34
    Hi Ultimate.

    I genuinely appreciate the help and thank you for helping me understand alot of this. I've been encouraged to dive in, read, study, and practice different things. It's just frustrating sometimes because I never see it work and can't tell if what I'm doing is right or wrong. There is nothing to compare to. I didn't think I was spamming, just searching for more help. I know it sounds dumb, but sometimes I want to cry. Other times I just get mad.

    My appolgies.

    Will you forward your fla's to me so I can see what I am doing wrong?
    queenbee398@yahoo.com

    Thank you.
    j~
    Last edited by littlebee; 09-17-2003 at 09:17 PM.

  16. #36
    FCS dude Ultimate99's Avatar
    Join Date
    Mar 2003
    Location
    Tokyo, Japan
    Posts
    120
    I'm not actually at the comp that I fixed up your files with right now, and won't be for another 8 hours or so.. all I did was use the code above in each file changing absolutely nothing else. When you added the instance name to the button did you delete the action that you placed on the button? That's important too. Other than that I would suggest running either one in the flash authoring environment to see if the trace is coming up to say that you connected up and synced up to the shared object. I've included traces in each function, along with when the client presses the button.

    make sure to also include the connection line which I didn't add above. conn_nc.connect("rtmp:/APPNAME") - for local and conn_nc.connect("rtmp://SERVER NAME OR IP/APPNAME") for remote server.

    On a last note, are your speakers on and turned up? I found the sound very quiet on my comp and had to turn up my speakers a bit to hear it. It should ring when the admin logs in, and when a client logs in after the admin, and when the client pushes the button.
    it's all about giving it a shot, then it just goes from there

    English blog: www.sti-media.com/blog
    Japanese blog: www.3enhancedesigners.com
    FCS Tutorials:www.flashcomguru.com

  17. #37
    Member
    Join Date
    Aug 2003
    Posts
    34
    It Works!!!!!!!!!!

    Thank you so much Ultimate! Thank you Thank you!

  18. #38
    Member
    Join Date
    Jan 2003
    Location
    berlin
    Posts
    88
    hi Ultimate99,

    i was reading u're disscusion and u sound preaty familer with FlashCom so i was wonderin do u know does Cam with intergrated Mic can stream audio without external Mic?
    u can see my explanation on this thread:
    http://www.flashkit.com/board/showth...hreadid=497181
    titeld like
    can Cam with intergrated Mic stream audio?

    thanks for any ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center