A Flash Developer Resource Site

Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 56

Thread: Real-Time* based animations

  1. #21
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:33 AM.

  2. #22
    Youbackalyte
    Join Date
    Apr 2006
    Location
    Rome
    Posts
    75
    I have removed the old code on the first frame of the main time line and added the new code you have supplied, however it still does not catch the current time and change frames, it has to be reset each time. Here, attached, is the experimental clip with the new code. Thanks again.
    Attached Files Attached Files

  3. #23
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:33 AM.

  4. #24
    Youbackalyte
    Join Date
    Apr 2006
    Location
    Rome
    Posts
    75
    Thank you very much for your time and help on this subject. I will be looking more into the setInterval on my own.

  5. #25
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    WOW, I have just caught this thread....I had a question about the 3rd method used in this script. I am devloping a website for a local radio station. I want to make 1 main .swf file. That, givin on what time (24hr) and day of the week (Mon-Sun)the user (based on their local time clock) loaded the site, would load a external .swf file into the main .swf file (the DJ currently on at the time and day). I think the 3rd method you showed would work,,,,,i think. I'm not sure exactely the code and where to put it, Thank you for your knowledge so far. This is the format i am going for:

    M-F 5a-10a: Mudflap & Mattie
    10a-3p: Chase Matthews
    3p-7p: Ed Palmer
    7pm-midnight: Austin Kelly

    except for....
    Monday 7-8pm: Dan E. Lockemy/Rudy Branham: That's Racin'

    Saturday:
    6a-9a - The Foxworthy Countdown
    9a-2p - Ed Palmer
    2p-7p - Austin Kelly
    7p-midnight - Chase Matthews

    Sunday:
    6a-10a - The Crook & Chase Country Music Countdown
    10a-noon - NASCAR USA
    noon-6p - Mudflap
    6p-11p - Mattie
    11p-midnight - 'New Music Nashville'

    Just let me know a mock code if you can, thanks

  6. #26
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:33 AM.

  7. #27
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    Ok, understand about adding more "if" statements for all the diffrent DJ times and make a .swf file for each. i tryed the code.....but i seem to be getting an error. I have the action on frame 1 of the main .swf (DjTime.swf). He is what i have:


    TimeDateCheck = function
    myMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
    myDate = new Date();
    myMonth = myDate.getMonth();
    myDay = myDate.getDate();
    myHour = myDate.getHours();
    myMinute = myDatemySeconds = myDate.getSeconds();.getMinutes();
    time = myHour+" "+myMinute+" "+mySeconds;
    myHolidayCheck = (myMonths[myMonth]+" "+myDay);
    trace(myHolidayCheck+" "+time); _root.onLoad = function() {
    this.onEnterFrame = function() {

    if (myHolidayCheck == "April 28" && time == "18 30 00")
    { _root.holder.loadMovie("some.swf");

    } else if (myHolidayCheck == "January 1" && time == "12 30 45")
    { _root.holder.loadMovie("someOther.swf");
    }
    }
    }
    }
    TimeDateCheck();


    The Errow I'm getting is this in the output box:

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: Function declaration not permitted here
    myMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 7: Unexpected '.' encountered
    myMinute = myDatemySeconds = myDate.getSeconds();.getMinutes();

    Total ActionScript Errors: 2 Reported Errors: 2



    I have attached the .fla file, do i need a stop function in there some where? And I actully don't need to worry about the month part, for the schedule will be the same every month, i really just need it to check for the day of the week and time, is there way to change/fix that?

    I am using Flash 8

    Thanks again for your help
    Attached Files Attached Files
    Last edited by NimbusBlack; 04-08-2006 at 06:46 PM.
    Sorry....I can't spell to save my life...Enjoy

  8. #28
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    Still getting that darn error...............hmmmmm
    Sorry....I can't spell to save my life...Enjoy

  9. #29
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:34 AM.

  10. #30
    Youbackalyte
    Join Date
    Apr 2006
    Location
    Rome
    Posts
    75
    Hey, I thought I would pop back in to here for help related to the time based events we worked on.

    How is it possible to make the first frame of a Movieclip not play when the .swf file is opened but have it be able to be played when something such as "targetmovieclip.gotoAndStop(1);" triggers it.

    The way I have my website setup so that a setintreval detects the current time every 1000 millisecond (Thanks for the help on this one NTD), according to what time it is in hours (1-24) it goes to 1 of the 24 frames of a specific movie clip. If frame 1 of a movie clip is dark (like 12:00 am) it will play as dark for 1000 milliseconds and then it will correct itself to the specific frame. I appreciate the help.

  11. #31
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    Awesome NTD, you are a genious....The .swf has no errors now, but its seem that it only does the "trace" function of the current time, instead of loading the some.swf file into the main.swf file (DJTime.swf). I had the if statement:

    if (myHolidayCheck == "April 10" && time == "00 05 00") {
    _root.holder.loadMovie("some.swf");

    But the when it became that time on my coputer, and published the DjTime.swf. it just "Trace"ed the current time. And didn't load some.swf, whick i do have in the same folders DJTime.swf......Got any idea's? Do i need to name the first frame with an instance name "holder"?If i can get it to load the ext .swf, i think i can do the rest....i hope.. Thank you sooooo much for your help.
    Sorry....I can't spell to save my life...Enjoy

  12. #32
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:34 AM.

  13. #33
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    OK, i tihnk i got it.....but i still don't get the some.swf to load. I have 2 layers and 1 Frame in the Main.swf. On the top layer is my action (the modified code you posted). The 2nd layer is a "blank" movie symbol (Symbol1) with the instance of "holder", i don't have anything actully in the movie. So, in theory, the some.swf should load into (Symbol1)? To have it just load the ext .swf and not do the trace fucntion, do i need to just delete the line 11?

    trace(myHolidayCheck+" "+time);

    I have attached my DJTime.fla, thanks again.
    Attached Files Attached Files
    Sorry....I can't spell to save my life...Enjoy

  14. #34
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:34 AM.

  15. #35
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    Ok, I changed the code to match what you posted last.......still i can't seem to see the some.swf (i know you changed it to someMovie.swf in your new code, but i lef the file name the same) being loaded into the main (DJTime.swf) swf. The trace function I see, and is now repeating every sec, which is cool, and i understand. But no some.swf?? I'm really sorry to keep bothering you with this, and thanks sooooo much for your help thus far. I just need to get that to some.swf, and i think i'll be good to go. I have attached the fla again please take a look and see what i have wrong, thanks

    if (myHolidayCheck == "April 11" && time == "10 03 30") {
    _root.holder.loadMovie("some.swf");

    Does that mean it will only be able to be seen for 1 sec? That it has to be 10:03:30 for it to be seen? I would like for it to be able to be seen for at least 30min.
    Attached Files Attached Files
    Last edited by NimbusBlack; 04-11-2006 at 10:05 AM.
    Sorry....I can't spell to save my life...Enjoy

  16. #36
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    O snap! I think i got it to show up:

    if (myHolidayCheck == "April 11" && time == "10 03 30") {
    _root.holder.loadMovie("some.swf");

    I changed the == to >= , so the time would be alittle less exact (not right on the sec) and i saw the some.swf load into the DJTime.swf (a little of centerd, but i saw it!)

    My next ? would be if i wanted that to be displayed between the times 10am-3pm, how would i code that argumnet instead of just >= ?

    And how could i use the day of the week instead of the "month"?

    Thanks again
    Last edited by NimbusBlack; 04-11-2006 at 10:20 AM.
    Sorry....I can't spell to save my life...Enjoy

  17. #37
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:35 AM.

  18. #38
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    WOW! Holy Sh*&. Thank you for you time and knowledge, if you got a pay pal acc, i'll hook you up with $20. I got the center prob fixed. Thanks. Haven't tryed the new code, but will soon...just wanted to thank you first for you time and effort.
    Sorry....I can't spell to save my life...Enjoy

  19. #39
    Member
    Join Date
    Apr 2006
    Location
    Florence, SC
    Posts
    73
    No dice , No errors, just don't see the some.swf load. i copied the code excat only changed the times to test "tues". Have attached, take a look when you get a chance. Will keep playing with it maybe i can figure it out. Thanks
    Attached Files Attached Files
    Last edited by NimbusBlack; 04-11-2006 at 03:53 PM.
    Sorry....I can't spell to save my life...Enjoy

  20. #40
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 07:36 AM.

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