PDA

View Full Version : scaleform hud with flashdevelop [basic tutorial request]



sv13
08-15-2010, 08:14 AM
hi, can somebody point me to an tutorial showing how to use scaleform gfx with flashdevelop, or at lease show me some code how can i create button, text field etc. my every attempt endend in build error :) (already have decent as3 skills :P)

KY2K
08-15-2010, 08:27 AM
http://www.youtube.com/user/scaleformpress#p/a and plus you need to be using AS2 with flashplayer 8 :D

Deliverance6
08-15-2010, 08:37 AM
Along the same lines, and without hijacking your thread, any tutorials out there on getting flash minigames to work or how to set them up? (eg, ive got a lockpicking minigame made within flash cs3 (yes cs3, i find 4 an overcomplicated nightmare that runs badly on my rig) but when i put it into UDk it loops infinitly and theres little to no documentation on how to transfer the player controller either over to the game or allow you to use the mouse on the swf untill completion then triggering an ingame event, eg, unlocking the door)

sv13
08-15-2010, 09:51 AM
http://www.youtube.com/user/scaleformpress#p/a and plus you need to be using AS2 with flashplayer 8 :D
and where is flashdevelop here?

anyway, now i wonder if in order to create main menu i have to use CLICK components or regular as2 buttons etc will do?

KY2K
08-15-2010, 05:04 PM
hey i only give that link because its a scaleform channel which might include flashdevelop in the future.

And i use as2 buttons in my menu's i just find it easier aint got round to CLIK components yet

TOP-Proto
08-15-2010, 05:38 PM
yeh the last vid looks very close to the workflow i use for TA.

in TA we have a fully functional menu driven system working that uses alot of the techniques discribed in the video.

drzovil
08-15-2010, 08:19 PM
I suppose you've already known how to set up Scaleform properly in Flash.
Test this simple code (I'm a newbie to Flash :)), it should work.
I hope it helps.

//In Flash,
//at flame 0.



import gfx.controls.Button;

var textField_01 : TextField;
var button_01 : Button;

var container_01 : MovieClip = this.createEmptyMovieClip("container_01", this.getNextHighestDepth());

var container_02 : MovieClip = this.createEmptyMovieClip("container_02", this.getNextHighestDepth());


container_01.createTextField("textField_01", 1, 0, 0, 150, 20);
container_02.attachMovie("Button", "button_01", this.getNextHighestDepth());


container_01._x = 300;
container_01._y = 300;
container_01.textField_01.text = "it works, doesn't it?";
container_02.button_01.label = "test";

stop();

TOP-Proto
08-15-2010, 10:47 PM
I suppose you've already known how to set up Scaleform properly in Flash.
Test this simple code (I'm a newbie to Flash :)), it should work.
I hope it helps.

//In Flash,
//at flame 0.



import gfx.controls.Button;

var textField_01 : TextField;
var button_01 : Button;

var container_01 : MovieClip = this.createEmptyMovieClip("container_01", this.getNextHighestDepth());

var container_02 : MovieClip = this.createEmptyMovieClip("container_02", this.getNextHighestDepth());


container_01.createTextField("textField_01", 1, 0, 0, 150, 20);
container_02.attachMovie("Button", "button_01", this.getNextHighestDepth());


container_01._x = 300;
container_01._y = 300;
container_01.textField_01.text = "it works, doesn't it?";
container_02.button_01.label = "test";

stop();

your code works fine.

you need to go to the CLIK_Components.fla file.

in the library find the Button symbol and copy it, and paste it into your .fla file
also do the same for the TextArea symbol.

when pasting you can delete whatever junk it puts on your scene, and run your code - will work fine.

TOP-Proto
08-15-2010, 10:49 PM
oh and you dont need import gfx.controls.Button;

drzovil
08-15-2010, 11:35 PM
In the above case, I missed to make clear that the textField is not a CLIK component but a Flash one.

TOP-Proto
08-16-2010, 01:23 AM
well it works fine with the 2 components added.

if your using scaleform you need to use the scaleform objects i guess...