Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Nisage

Button in Adobe Flash

Recommended Posts

I've already tried searching for what I want, but it seems google has failed me, again.

 

I'm making a Flash program where there's a button that whenever you press it, it'll change the text around it to something else. I want the button to change the text roughly 4 to 7 times, then an explosion happens. The explosion I believe I can set-up, but the coding for the button to change the text I can't figure out. Here's what I have so far.....

 

ButtonAttempt1Picture.png

 

The button right now just opens Youtube.

Edited by Nisage

Share this post


Link to post
Share on other sites

You know you can create buttons without scripting with Adobe Flash Catalyst. You create the graphics in Photoshop/Illistrator and then import the whole file into Catalyst where you can easily configure button for websites or for your own personal use, while doing all coding in the backround for you. It comes with the CS5 suite if you have it, I'm using it right now to create a website for my grandma without scripting at all. :biggrin_002:

Share this post


Link to post
Share on other sites

I can? I didn't know that. Sadly I don't have Adobe Flash Catalyst or the CS5 Suite, I only have Adobe Flash Professional and Photoshop. Can Flash Professional still work for what I want to do?

 

Really, creating a website without scripting at all? Wow.

Share this post


Link to post
Share on other sites

Did you already right click on the image and made it into a symbol and choose button as format? that's a good start ;)

if you have done that, i'll try to explain what to do next.

Share this post


Link to post
Share on other sites

Cool. Omar has been trying to tech me the same thing but I don't think I want to learn anymore. It's too much coding. <_<

Share this post


Link to post
Share on other sites

Did you already right click on the image and made it into a symbol and choose button as format? that's a good start ;)if you have done that, i'll try to explain what to do next.

The actual button or the text I want to change? Just in case, both are "buttons" right now. Hope you can explain it :)

 

Cool. Omar has been trying to tech me the same thing but I don't think I want to learn anymore. It's too much coding. <_<

I like to code, I find it fun :) As long as I know what to code that is :P

Share this post


Link to post
Share on other sites

I can? I didn't know that. Sadly I don't have Adobe Flash Catalyst or the CS5 Suite, I only have Adobe Flash Professional and Photoshop. Can Flash Professional still work for what I want to do?

 

Really, creating a website without scripting at all? Wow.

 

Of course flash can do it, it just requires prior knowledge of coding.

 

And yes, just like Adobe dreamweaver, Adobe Flash Catalyst does the coding in the back as you create your web in the front.

Share this post


Link to post
Share on other sites

I'm not a Flash programmer at all, but after doing a lot of searching, I think I was able to find what you need. Directly from the Adobe site:

// Import the required component classes.  
import fl.controls.Button;

// Create a new Button component instance, and add it to the display list.
var myButton:Button = new Button();
myButton.label = "Click me";
myButton.move(10, 10);
myButton.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(myButton);

/* Handler function for the Button component instance. This function updates
  the button's label property when the button is clicked. */
function clickHandler(event:MouseEvent):void {
   myButton.label = "Ouch!";
}

Lemme know if this helps.

Much love,

~Steven a.k.a. ShinyToyGuns~

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...