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 ?
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.
Any programming language is at its best before it is implemented and used.
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;
Code:
// 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);
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....
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!
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 ?
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.
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?
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.
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?
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 ?