Difference between revisions of "Talk:Bookclick.as"
From Organic Design wiki
(Will redo function) |
(variables change) |
||
Line 9: | Line 9: | ||
::Another problem with the current setup is that the calculate function needs to stay in with the main function because it behaves slightly differently - you should just do the work as described with the diffs in [[SWF e-book]], this other way you're going will need to be backtracked... | ::Another problem with the current setup is that the calculate function needs to stay in with the main function because it behaves slightly differently - you should just do the work as described with the diffs in [[SWF e-book]], this other way you're going will need to be backtracked... | ||
:::I made the calculate function seperate because it suited my purposes at the time but I see your point, I'll work on it l8r. | :::I made the calculate function seperate because it suited my purposes at the time but I see your point, I'll work on it l8r. | ||
+ | ---- | ||
+ | happy hanukah! | ||
+ | |||
+ | It seems need to reassign (1,-1) the variables like x, w, h etc before the draw, because they refer to the sign that existed before the calculation, but has changed since. Anyway I'm working on the parameter end. |
Revision as of 20:21, 24 December 2006
You need to reduce all folds to one function first, before any "playing animation" stuff because the animation sequences need to be send a sequence of x,y coordinates to the fold function, and you don't want your sequence-playing function to have to deal conditionally with four fold functions --Nad 10:26, 9 Dec 2006 (NZDT)
- You can't just do a for loop around the drawing routine, you need to make the fold-function work wrt to passed coords instead of mouse, then make your mouse-events and per-frame animation functions call the fold function --Nad 10:30, 9 Dec 2006 (NZDT)
- OK this stripped-down test code works fine in Flash with reduce() in Frame 2 and gotoAndPlay(2) in frame 3, :). But where do I put the reduce() function in the Wiki to make it animate? Jack 02:07, 20 Dec 2006 (NZST)
- You put the reduce function definition in the first (and only) frame along with the others, it will be called at runtime from frame2 every frame
- Yep this works fine now as a test, i'll just get it to reset i after all its iterations. Onwards and upwards :) Jack 03:13, 20 Dec 2006 (NZST)
- Oh yeah that's a good reason to decrement instead of increment - so that it ends up at zero so it can stop, and also means it auto-resets --Nad 03:21, 20 Dec 2006 (NZST)
- Yep this works fine now as a test, i'll just get it to reset i after all its iterations. Onwards and upwards :) Jack 03:13, 20 Dec 2006 (NZST)
- You put the reduce function definition in the first (and only) frame along with the others, it will be called at runtime from frame2 every frame
- OK this stripped-down test code works fine in Flash with reduce() in Frame 2 and gotoAndPlay(2) in frame 3, :). But where do I put the reduce() function in the Wiki to make it animate? Jack 02:07, 20 Dec 2006 (NZST)
This won't actually compile on the wiki, I know not why, but it compiles in Flash ... Jack 06:44, 24 Dec 2006 (NZST)
- Yep -- Jack 07:00, 24 Dec 2006 (NZST)
- Another problem with the current setup is that the calculate function needs to stay in with the main function because it behaves slightly differently - you should just do the work as described with the diffs in SWF e-book, this other way you're going will need to be backtracked...
- I made the calculate function seperate because it suited my purposes at the time but I see your point, I'll work on it l8r.
- Another problem with the current setup is that the calculate function needs to stay in with the main function because it behaves slightly differently - you should just do the work as described with the diffs in SWF e-book, this other way you're going will need to be backtracked...
happy hanukah!
It seems need to reassign (1,-1) the variables like x, w, h etc before the draw, because they refer to the sign that existed before the calculation, but has changed since. Anyway I'm working on the parameter end.