Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

+ Reply to Thread
Results 1 to 8 of 8

Thread: As help!!!

  1. #1

    Default As help!!!

    Hello folks.

    I really need your help here. I once bought a small favor from a flash coder from activeden.net a few years ago.
    I would like to have modified it slightly. I do not know so much about flash and hope you can help me here. I wanted 2 things, which I got. I wanted a small flash application where I had the opportunity to log in and out http://shahirart.com/ check out the link. Login and out with the password "flash". It works as it should when you login, the green ball with text "You are connected" and vice versa when you log off the ball is red and the text "You are disconnected." This app would be on a separate page. When I was logged in, another app with a similar green or red ball and with the text "admin is online" or "admin is offline" would be on the main website http://shahirart.com/app.html . This should then just indicate that visitors at home could see that the admin (me) was "physically" present on the site, ready for i.g a chat. The app on the site is therefore just a little graphic and a text which will be based on something genareret AS.

    I want instead of bullet and text (admin is online / offline) is displayed when I log in, it must be a picture. Actually 2, both images have the same dimensions, but one show that I am not online and the other shows that I am. Hope it made ​​sense. Here is the code of the app which is the part that shows the admin is online or offline:

    Code:
    
    import caurina.transitions.Tweener;
    
    var intervalo = setInterval(stat, 1000);
    
    function stat():Void
    
    {
    
        var lv:LoadVars = new LoadVars();
    
            lv.load("status.txt?" + random(9999));
    
            //lv.load("http://localhost/hamid/status.txt?" + random(9999));
    
            lv.onLoad = function(succes)
    
            {
    
                if(succes)
    
                {
    
                    if (this.status == "online") {
    
                        Tweener.addTween(status_mc.circle, {_color:"0x009900"});
    
                        status_text.text = "Admin is connected";
    
                    } else {
    
                        Tweener.addTween(status_mc.circle, {_color:"0xFF0000"});
    
                        status_text.text = "Admin is disconnected";
    
                    }
    
                } else trace("Error loading data");
    
            }
    
    }
     


    And here is the code of the app on the independent side where I log in or out.:

    Code:
     
    import caurina.transitions.Tweener;
    
    status_text.text = "You are disconnected";
    
    login_mc.login.onRelease = function():Void
    
    {
    
        trace(login_mc.txtPass.text);
    
        var lv:LoadVars = new LoadVars();
    
        var rv:LoadVars = new LoadVars();
    
            lv.passw = login_mc.txtPass.text;
    
            lv.sendAndLoad("login.php", rv, "POST");
    
            //lv.sendAndLoad("http://localhost/hamid/login.php", rv, "POST");
    
            
    
        rv.onLoad = function():Void {
    
            if(this.ok == "OK") {
    
                trace("login")
    
                Tweener.addTween(status_mc.circle, {_color:"0x009900"});
    
                login_mc.txtPass.text = "";
    
                status_text.text = "You are connected";
    
            } else {
    
                trace("no login");
    
                Tweener.addTween(status_mc.circle, {_color:"0xFF0000"});
    
            }
    
        }
    
    }
    
    logout_mc.login.onRelease = function():Void
    
    {
    
        var lv:LoadVars = new LoadVars();
    
        var rv:LoadVars = new LoadVars();
    
            lv.passw = logout_mc.txtPass.text;
    
            lv.sendAndLoad("logout.php", rv, "POST");
    
            //lv.sendAndLoad("http://localhost/hamid/logout.php", rv, "POST");
    
            
    
        rv.onLoad = function():Void {
    
            if(this.ok == "OK") {
    
                //trace("logout")
    
                Tweener.addTween(status_mc.circle, {_color:"0xFF0000"});
    
                logout_mc.txtPass.text = "";
    
                status_text.text = "You are disconnected";
    
            } else {
    
                //trace("not logout");
    
                Tweener.addTween(status_mc.circle, {_color:"0x009900"});
    
            }
    
        }    
    
    }
    
    I really hope you can help me out here. I know that the problem is not greater than I make it. but I just can not figure it out.
    Sincerely HRB
    Last edited by Vlykarye; 11-15-2011 at 06:42 PM.

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    485

    Default

    Hey! That's quite fun! It seems to actually be connected to a database? Interesting. I like the text myself. Usually when people start replacing text with pictures, they choose bad pictures and it just looks bad.
    If you have some good pics, then go for it.

  4. #3
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    485

    Default

    K mate. So I think I can help you, but I don't have much time, so could you give me the username and password to your site? And possibly your credit card info?

  5. #4

    Default

    Yes ofcourse, do you want my wife also? LOL... hehe..

    Yes I do have some good pictures which actually integrate well with the background..

    Kind regards HRB

  6. #5
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    485

    Default

    Sounds good. I'd try to help today, but I just got home, and have had a massive headache all afternoon, so I'm going to bed. I would like to look at all the files that are being used to make the admin login work. Then I might be able to find out how to put the pictures in place of the text.

  7. #6

    Default

    Thank you man. Can I PM you to send file or link to file? I googled the topic a little bit, and basiclly the pictures should be in a movieclip and on frame 1 and 2. The rest code stuff I canīt handel..

  8. #7
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    485

    Default

    Yeah. There are many ways to put the pictures in, but the creator did it with a movieclip. So you just need the pics to swap out when on and offline.

  9. #8
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    485

    Default

    The problem with your pics are that they are way too big in dimensions. Are you sure you want to use these pictures? If so, decide how you would like them to be displayed (how big, where in each screen, etc) and I can develop it for you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial