Click to See Complete Forum and Search --> : Calendar
w.brants
12-18-2002, 01:15 PM
I tried to make a calendar in Koolmoves.
What I've go so far is a working calendar using xml data for input.
Since I don't know actionscript very well, I hope someone who does can take a look at it. The code could probably be a lot easier and better. Some things I'm wondering about...
- Is it allowed to use strings as an index for an array.
- Is it possible to create gradient fills using actionscript.
I used a lot of movieclips. Could the mx drawing commands make things easier ?
Wilbert
http://www.geboortegrond.nl/koolmoves/calendar/calendar.html
tmoore935
12-18-2002, 05:03 PM
This is actualy another useful item that one could attach a logo or name to that a PC user would use. This does not answer your question but I have been trying to learn ways in making apps with flash technology. (and I do have a reason for this). Have not looked at the fun file yet because It will not let me download, and someone else needs to answer the action script questions. I like this.
johnie
12-18-2002, 09:38 PM
Although I don't think it is possdible, could be wrong here, to create gradients with the color object existing gradients are effected.
this is the MM example for using the color object;
// Create a color object called myColor for the target myMovie
myColor = new Color(myMovie);
// Create a color transform object called myColorTransfrom using
// the generic Object object
myColorTransform = new Object();
// Set the values for myColorTransform
myColorTransform = { ra: '50', rb: '244', ga: '40', gb: '112', ba: '12', bb: '90', aa: '40', ab: '70'};
// Associate the color transform object with the Color object
// created for myMovie
myColor.setTransform(myColorTransform);
OwenAus
12-18-2002, 10:09 PM
That's neat!
bridelh
12-19-2002, 01:36 AM
Very nice Wilbert - I like it.
If you don't know Actionscript very well, you have done a great job! Did you work it out yourself or get the code from somewhere?
Is it allowed to use strings as an index for an array.
Sort of - you can use a structure known as an associative array - although you cant use the array methods to manipulate it, you use array syntax to access it.
myObject = new Object();
myObject["fName"] = "Hilary";
myObject["lName"] = "Bridel";
You can access it like this:
for (i in myObject){
txt1+= i + " | "+myObject[i]+"\n";
}
Is it possible to create gradient fills using actionscript.
The MX drawing API does gradiant fill, but is not implemented yet....
johnie
12-19-2002, 01:57 AM
Yeah, The Flash 5 Color Object is in there already but no gradient fills from it.
OwenAus
12-19-2002, 01:59 AM
Gradients - If you use literals as parameters, it can sneak through. If you use variables for the parameters, turn them into expressions (eg, multiply by 1), which works in some cases. Be prepared to be a bit frustrated until you find the klurge that works for you. Once it works it stays working. You may have to use the (also not implemented?) matrix approach, which can also sneak through :)
Addendum:
Now I am sorry I posted this, just in case you get bogged in it. Please ignore!
w.brants
12-19-2002, 02:00 AM
Most of the code I worked out myself. I didn't have another calendar script as an example. I like thinking about things as how to calculate the places where to put the days for each month. However for how to use events and xml I used your examples.
I do have some scripting experience in php but lack a good actionscript documentation. The string as index is a good example. I tried it and it worked but couldn't find out if it was allowed.
By the way. If I draw two objects in koolmoves and place them on the same coordinates they are sometimes a pixel off. How accurate is koolmoves internally ? I know it has something to do with decimals (sub pixels ?).
Does this only occur when drawing objects manually or also when drawing with actionscript ?
Wilbert
simpelendidi
02-06-2003, 12:38 PM
Is it possible to link a certain
datebutton to a website ?
w.brants
02-06-2003, 02:26 PM
I hope this will do ? !
:)
Bob Hartzell
02-06-2003, 06:19 PM
By the way. If I draw two objects in koolmoves and place them on the same coordinates they are sometimes a pixel off. How accurate is koolmoves internally ? I know it has something to do with decimals (sub pixels ?).
Does this only occur when drawing objects manually or also when drawing with actionscript ?
-> KoolMoves is floating point accurate internally. SWF is accurate to 1/20 pixel. I will need an example. This problem should not arise if using actionscript.
TTP World
02-19-2007, 05:36 PM
Is it possible to add control to the calendar dates.
e.g when you click on a date it returns the date in a variable for use in a dynamic text box.
And also error checking i.e. only dates which fall on the weekend can be selected.
I´m looking to incorporate this in the contact form.
Has anyone done anything similar or am i better off purchasing a flash calendar off the net somewhere.? Is also possible to incorporate these in koolmoves?
Thanks
Kevin
Bob Hartzell
02-19-2007, 06:55 PM
I got confused by the first thread in this posting in which Wilbert said that he didn't know action scripting very well. Then I looked at the date which is 2002.
blanius
02-19-2007, 07:17 PM
Me too.... I was very confused and was looking very hard at the user name to make sure someone wasn't posing as Wilbert.... LOL four years he's learned alot eh?
Makulaf
02-19-2007, 07:38 PM
lol same here took me a few looks
w.brants
02-20-2007, 12:57 AM
LOL four years he's learned alot eh?
I like to think I have :)
If you look at my join date it says Dec 2002. The post was also from that month so I was a newbie back then ;)
But to answer the questions of TTP World...
You can incorporate external movies without changing them but not use a .fla source file. It's possible to modify the code of my calendar. If I understand you correctly, you don't want the whole xml part to list events but only need a date picker ?
Wilbert
TTP World
02-20-2007, 08:46 AM
Yes I want a date picker is whatI was trying to say.
Oh and sorry for picking up on an old thread, I didnt want to start another one uneccessarily lol.
Thing is I´m not sure what code to use
Kevin.
blanius
02-20-2007, 09:14 AM
date picker would be useful component.
w.brants
02-20-2007, 11:26 AM
Here's a modified version of the original calender.
Maybe it helps.
blanius
02-20-2007, 11:55 AM
seems I can only select a Saturday
w.brants
02-20-2007, 12:19 PM
seems I can only select a Saturday
You should be able to select a Saturday or a Sunday like Kevin requested.
It's easy to remove the restriction so you can select all dates.
blanius
02-20-2007, 02:18 PM
Ah.. I see
by the way this is brilliant
var m$ = String(100+month);
var d$ = String(100+this.text.text);
date.text = year+'.'+m$.substr(-2)+'.'+d$.substr(-2);
Took me a minute to figure out why you add 100 then I got it. I've always done this with much more complicated code. This is so simple I wish I had thought of it.
For those that don't see it, by adding what must be a one or two digit number to 100 then extracting the last two digits you either get the origianl two digit number or a number with a leading zero.
blanius
02-20-2007, 02:24 PM
So how would you suggest using this as a component? Exporting it as SWF then loading it could work but how to get the date from it?
TTP World
02-20-2007, 08:13 PM
Wow this is good stuff guys! where do I pay homage? :)
This is exactly what I need and yes would be good as a component.
Would be good to know how to pass the data from a loaded swf into the main swf.
On another note I imported the moded calendar fun file into my fun file, frame 54 to be more exact (so far so good). When I play it back the calendar appears in the top left hand corner of the frame.
Is there a way of using action script to re-position the calendar in my frame.
Obviously if i could do this I would not need to load it as a component.
Again this would only be a workaround perhaps, but I think I would prefer the loaded component method.
Thanks Again
Kevin
w.brants
02-21-2007, 01:05 AM
A real KM component would probably take to much time.
I attached an example how to work with it as an external movie.
necromanthus
02-21-2007, 03:52 AM
I got confused by the first thread in this posting in which Wilbert said that he didn't know action scripting very well. Then I looked at the date which is 2002.
LOL
Also, some messages from johnie, bridelh and OwenAus.
ahhh... we're getting old...
bridelh
03-23-2008, 08:56 PM
OMG! I think I'm in a time warp.
KM + AIR
Koolmoves sure has come a long way since the days I joined and started bugging Bob for Flash 5 compatability:)
Hello to all I know here, and those I don't, that have obviously taken KM to new heights over the years.
Hilary
--
Chris_Seahorn
03-23-2008, 09:39 PM
Koolmoves supporting AS3 should make it a nice match later :)
Hello Hilary :thumbsup:
bridelh
03-23-2008, 10:03 PM
Hey Chris,
Look at all those posts you've made - you must have spent your life here!
IS AS3 supported in the current version?
Hilary goes off to download KM and see what has changed....
Chris_Seahorn
03-23-2008, 10:22 PM
you must have spent your life here
I've cut back ... :)
Bob or Wilbert would be the ones to speak on AS3. I'm not sure if it's even in the beta teams hands or what stage. I sure would be curious to pound on that beta if it exists. :)
w.brants
03-24-2008, 02:36 AM
Hey Hilary,
That has been a long time : )
The current version of KM doesn't support AS3 yet.
Bob is working hard on the implementation. The next version (KM7) will support AS3.
Regards,
Wilbert
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.