Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Questions about V6 (https://forums.graalonline.com/forums/forumdisplay.php?f=196)
-   -   Flash Impovements? How? (https://forums.graalonline.com/forums/showthread.php?t=76382)

Switch 08-20-2007 04:55 AM

Flash Impovements? How?
 
Hmm, is it me, or did whoever made the newsletter make a mistake?

Who KNOWS about how to even script flash into the game.

*Waits for reply*
Exactly, no one.

Stefan, how about telling us how to script it in, commands ect.?

Chompy 08-20-2007 10:01 AM

Uhm, it's actually pretty easy to make it, it's explained pretty well on the wiki, but as you stated in another thread, you don't like the wiki :p

PHP Code:

with(findimg(200)) {
  
flashfile "flash.swf";
  
1015;
  
layer 4;
  
//wee, can play around with the flash too :o
  
flash.getLayer(0).alpha 0.99;


You can use other method as well as GuiShowImgCtrl or GuiFlash

PHP Code:

new GuiFlash("Flash_file") {
  
7;
  
24;
  
moviefile "flash.swf";
  
loopmovie false;
  
requiresactivex false;
  
tryactivex true;

  
playmovie();


And, there is also threads in the scripting forums :p

Switch 08-20-2007 04:19 PM

Kay xD

It's not that I don't like the Wiki it's just confusing to me.

M!ke and I wanted to know and I didn't think there were threads since it's v5 improvements, so... yeah. xD thanks

PHP Code:

new GuiFlash("Flash_file") {
[
stuff that I understand]


"Flash_file" is that meaning that the following is for a flashfile or the filename goes there?

Chompy 08-20-2007 05:03 PM

Quote:

Originally Posted by Switch (Post 1341666)
PHP Code:

new GuiFlash("Flash_file") {
[
stuff that I understand]


"Flash_file" is that meaning that the following is for a flashfile or the filename goes there?

No, that's a name I gave the control

Switch 08-20-2007 05:09 PM

Ohh so I can name it anything like "Flash1" then name another "Flash2" and so on?

Chompy 08-20-2007 05:15 PM

Yeah

Switch 08-20-2007 06:03 PM

thanks chompinator :D

Cherrykao 08-20-2007 09:30 PM

what i want to know is if it's possible to communicate like send and recieve variables to and from the graal client into flash and vice versa?

Admins 08-20-2007 10:27 PM

There is
guicontrol.setFlashVariable(varname,value)

And flash games can do fscommand("event",commaparams) which is invoking an event "onEvent", e.g.
function MyFlashGame.onEvent(params) { ... }
commaparams is a string, parameters connected with comma, e.g. "1,2,3"

zokemon 08-20-2007 10:30 PM

Quote:

Originally Posted by Switch (Post 1341666)
It's not that I don't like the Wiki it's just confusing to me.

When the wiki is back up, I'm gonna work on making it a little more user friendly. Any input would be of help :)

Cherrykao 08-24-2007 03:19 PM

Quote:

Originally Posted by Stefan (Post 1341824)
There is
guicontrol.setFlashVariable(varname,value)

And flash games can do fscommand("event",commaparams) which is invoking an event "onEvent", e.g.
function MyFlashGame.onEvent(params) { ... }
commaparams is a string, parameters connected with comma, e.g. "1,2,3"

excellent! As far as i know Flash won't work for users on Macintosh. Is there a graal script function to detect the presence of a Flash player on the user's machine? Also when getting the platform a user is using, i know "win" is for windows. I don't have Linux or Macintosh, so i don't know if the output when getting the platform from a user on Linux is just "lin" and Macintosh just "mac"?? Thanks.

Skyld 08-24-2007 03:29 PM

Quote:

Originally Posted by Cherrykao (Post 1342629)
excellent! As far as i know Flash won't work for users on Macintosh. Is there a graal script function to detect the presence of a Flash player on the user's machine? Also when getting the platform a user is using, i know "win" is for windows. I don't have Linux or Macintosh, so i don't know if the output when getting the platform from a user on Linux is just "lin" and Macintosh just "mac"?? Thanks.

PHP Code:

if (player.platform in {"win""linux"}) 

... for if the player is using Windows or Linux.
PHP Code:

if (player.platform == "mac"

... for if the player is using a Mac.


All times are GMT +2. The time now is 11:32 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.