| View previous topic :: View next topic |
| Author |
Message |
NoManchesPuto I post too much
Reputation: 0
Joined: 24 Jan 2009 Posts: 2820
|
Posted: Sun May 17, 2009 11:32 am Post subject: Help With Flash CS4 Please |
|
|
Ok I am trying to make something in Flash(Developer) like buttons that do an assigned function when clicked, etc. I have a source from which I would like to code the buttons in, I have a Delphi 7 source and I was wondering if it is possible to put the same codes in the Flash buttons as I do for the Delphi buttons....
Example: For Delphi making a checkbox checked: | Code: | | Checkbox1.checked:=true; | But when I try to use that for the Flash checkbox I get errors..... Is there a way I can implement my source from my Delphi source, so that way I would be able to use that code? Or do I have to use ActionScript? If I have to use ActionScript does anyone recommend a great tut for beginners?
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sun May 17, 2009 12:31 pm Post subject: |
|
|
first you have to set instance name..
set it to checkBox1
then the code will be
| Code: | | checkBox1.selected = true; |
Also, what ActionScript are you talking about?
_________________
|
|
| Back to top |
|
 |
NoManchesPuto I post too much
Reputation: 0
Joined: 24 Jan 2009 Posts: 2820
|
Posted: Sun May 17, 2009 1:16 pm Post subject: |
|
|
| Epic Cat Garfield wrote: | first you have to set instance name..
set it to checkBox1
then the code will be
| Code: | | checkBox1.selected = true; |
Also, what ActionScript are you talking about? |
ActionScrpit 3.0 And can I use the codes that I use for Delphi?
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Sun May 17, 2009 2:18 pm Post subject: |
|
|
nope, actionscript is realy much different from delphi...
by the way, the question is stupid no language actually equals another
well..
C++ includes whole C
VB.Net invcludes whole VB
_________________
|
|
| Back to top |
|
 |
NoManchesPuto I post too much
Reputation: 0
Joined: 24 Jan 2009 Posts: 2820
|
Posted: Mon May 18, 2009 1:41 pm Post subject: |
|
|
| Epic Cat Garfield wrote: | nope, actionscript is realy much different from delphi...
by the way, the question is stupid no language actually equals another
well..
C++ includes whole C
VB.Net invcludes whole VB |
I don't think you understand what I'm asking, but I appreciate your help. I am asking can I implement a source from Delphi into Flash so I can use Delphi codes....Or no? Above was an example of a checked toggle in Pascal.
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Mon May 18, 2009 1:54 pm Post subject: |
|
|
Flash Action script is different than delphi.
you apply the codes to the objects like folders
lets say you wanted to run a function for a button
then you should call On(release) or On(press) { and your function here }
for tutorials about action script check on www.newgrounds.com search for action script tutorial, there are some interactive tutorials.
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Mon May 18, 2009 1:58 pm Post subject: |
|
|
| gogodr wrote: |
then you should call On(release) or On(press) { and your function here }
|
not for AS3..
@OP
i still dont get what you want then
_________________
|
|
| Back to top |
|
 |
gogodr I post too much
Reputation: 125
Joined: 19 Dec 2006 Posts: 2041
|
Posted: Mon May 18, 2009 1:59 pm Post subject: |
|
|
| Epic Cat Garfield wrote: | | gogodr wrote: |
then you should call On(release) or On(press) { and your function here }
|
not for AS3..
@OP
i still dont get what you want then |
>.>? sorry I got stuck with Action script 2.0
what he wants is to know if he can merge his Delphi code into the Action Script.
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Tue May 19, 2009 4:20 am Post subject: |
|
|
This is one way to do it. You add a eventhandler/listener for the button and then you assign a function for it.
| Code: |
Button1.addEventListener(
MouseEvent.MOUSE_UP,
function(evt:MouseEvent):void {
CheckBox1.selected = true;
}
); |
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Tue May 19, 2009 8:17 am Post subject: |
|
|
I got this as a working onPress code
| Code: | btn1.addEventListener(MouseEvent.CLICK, mousePress);
function mousePress(evt:MouseEvent) {
trace('Penis'); //your code instead
} |
_________________
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Tue May 19, 2009 1:05 pm Post subject: |
|
|
Gives out a message on compiler (so only on test run not on swf)
_________________
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Wed May 20, 2009 4:46 am Post subject: |
|
|
| Epic Cat Garfield wrote: | | Gives out a message on compiler (so only on test run not on swf) |
Aha. So it's prints the text to the debug console? So that you can see that it has reached the code block which traces the text.
Also has this thread been answered yet?
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Wed May 20, 2009 7:44 am Post subject: |
|
|
Good question, i still dont get what OP realy wants to know..
_________________
|
|
| Back to top |
|
 |
|