rod
New Member
Posts: 40
|
Post by rod on Sept 16, 2007 9:15:55 GMT -5
Now I have my hands dirty a question, what is the intended strategy to allow or accommodate animation on web pages?
I realise I will have to think differently and I am not talking about "Doom" style video.
In this code I tried to render more than once but only ever saw the last render and I tried a time$("seconds") type delay in a wend loop but it never triggers. Only the link triggers a render.
Is animation a no no? I wouldn't be downhearted I just want a steer on where to spend my time.
DIM Cell(50,50) GRAPHIC #1, 300,300 LINK #draw, "DrawIt", [Draw] GOSUB [DrawGrid] RENDER #1 WAIT
[Draw] CLS LINK #draw, "DrawIt", [Draw] GOSUB [DrawGrid] GOSUB [RandomSeed] RENDER #1 wait
[RandomSeed] #1 SIZE(5) #1 COLOR("green") for y = 1 to 50 for x = 1 to 50 if rnd(0)>.95 then Cell(x,y)=1 #1 SET((x*6)+1, (y*6)+1) end if next x next y return
[DrawGrid] #1 SIZE(1) for x=150 to 0 step -1 #1 COLOR(255,min(255,x*2),255) #1 PLACE(x,x) #1 BOX(300-x,300-x) next x #1 COLOR("white") for y = 0 to 49 for x = 0 to 49 #1 PLACE(x*6,y*6) #1 BOX(x*6+6,y*6+6) next x next y return
|
|
|
Post by StefanPendl on Sept 16, 2007 13:34:05 GMT -5
Animation is possible with GIFs, Carl mentioned to include a REDIRECT command, which will allow for timed display. Currently display is only updated before user interaction.
|
|
|
Post by Janet on Dec 16, 2007 10:21:55 GMT -5
Animation is possible with GIFs, Carl mentioned to include a REDIRECT command, which will allow for timed display. Currently display is only updated before user interaction. Animated gifs display as static images, and without transparent backgrounds, when a graphic area is rendered. Will animated gifs be possible in native graphics, or only with html / css styling? I've only tested using Loadimage. I'm off to check Run BASIC wiki to see if any demos have been posted for animated gifs.
|
|
|
Post by Mike on Dec 16, 2007 10:44:56 GMT -5
I have an animated gif on my RB homepage, but only got it to work with html ie
div animation html "<align=""left""><img src=""/moon.gif"">" end div
|
|
|
Post by StefanPendl on Dec 16, 2007 11:27:37 GMT -5
Animated gifs display as static images, and without transparent backgrounds, when a graphic area is rendered. If you render a graphic area you create a static PNG. You must use HTML image tags to display external graphics.
|
|
|
Post by David den Haring on Dec 17, 2007 12:42:00 GMT -5
RB is a server-side technology. For client-side (i.e. browser) animation, you might try embedding and utilizing a javascript/AJAX framework like Rico (www.openrico.org). This particular library is well-suited for doing animation.
You can use the AJAX features of Rico to get/set data on the server-side (i.e. RB). Using Rico is not trivial, but it does open the door to browser-based animation without resorting to other technologies like Flash.
BTW, I haven't tried embedding this framework in an RB app yet, but I looked into Rico for another project.
|
|