Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Change text with On / Off button


BTBob
4/2/2004 10:18:26 PM
I'm new at Flash

What I want to do is make a mock up of a control panel fo an appliance.

I want a status indicator (dynamic text?) set to 'On' or 'Off' and by pressing
a button on the page it should switch 'Off' to 'On' and vice versa.

I tried a button that I had scripted:

on (release) {
if (OnOffVAR == ON) {OnOffVAR = OFF;
}
else{
OnOffVAR = ON;
}
}

OnOffVAR is used in the Dynamic text box

but it doesn't seem to work!

Also, It doesn't initiate the OnOffVAR to an ON or OFF value before we start.

Any clues?


Also perhaps something to press numbered keys and reflect a temperature in
another text box.

I'm sure it's probably quite simple but as I said I'm new to this and I'm
feeling a little lost.


BTBob
4/2/2004 11:25:23 PM
Hey that's great :o)

Unfortunately I get an Unexpected file format error message when I try to read your file :o(

Can you paste the code here please so I can see how it's done.

Cheers
Laiverd.COM
4/3/2004 1:08:33 AM
Something like this ?
http://home.hccnet.nl/john.mulder/flash/temp/onoff.swf

file: http://home.hccnet.nl/john.mulder/flash/temp/onoff.zip

John

--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

Laiverd.COM
4/3/2004 1:30:44 AM
I assume you're using flash mx? This is an MX version file. If it still
doesn;t work, I'll post the setup here.

file: http://home.hccnet.nl/john.mulder/flash/temp/onoff.zip (now FlashMx
version)

Let me know if it works out.

John
--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

BTBob
4/3/2004 4:14:32 PM
John

Thanks I just downloaded and opened it.

Excellent :o)

Cheers

AngelOfDarkness21
4/20/2004 1:56:53 PM
I know this is kind of not on track but can someone please tell me how to get
round the whole unexpected file format thing. I'm trying to use a .fla file
that was created on a mac but i have a normal pc. I desperately need some help
on this.

Thanks
AddThis Social Bookmark Button