• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community The Community Real Life Discussion Software & Hardware
« Previous 1 … 26 27 28 29 30 … 91 Next »
Actionscript 2.0

Server Time (24h)

Players Online

Active Events - Scoreboard

Latest activity

Actionscript 2.0
Offline jxie93
07-31-2011, 09:52 PM,
#1
Member
Posts: 3,740
Threads: 80
Joined: Sep 2009

I've been trying to learn AS2 for the past week along with Flash. But I've come to this road block which frustrates me to no end. So I was hoping some of you might know Actionscript or just smart enough to help me out.

Here's what I have

- A button (as a movie clip, instance name "btn") on the first frame
- The same button (also movie clip) but with glow effect on frame 10
- An actionscript layer with key frames on 1 and 10

Here's my code on the action layer (frame 1)

Code:
stop();

function gotoOver()
{
    this.gotoAndStop(10);
}

function gotoOut()
{
    this.gotoAndStop(1);
}

btn.onRollOver = gotoOver;
btn.onRollOut = gotoOut;

I'm trying to make the button glow whenever a mouse is over it. But when I compile and export the swf it just refuses to do the glowing part. When I hover my mouse over the button the cursor turns into a hand but it doesn't glow.

Yes I know I could have used a button instance but I'm trying to learn event handlers here.

Can you help?

edit: I just tested it again by throwing in a this._alpha = 50 along with the onRollOver handler and it seems to work, it's just the gotoAndStop at frame commands that don't work. I also tried referring to the frames using label names and it still won't work.

[Image: jxie93.gif]
*Signature Walkthrough* | *deviantART Gallery* | *Graphics Repository*
  Reply  
Offline atlantis2112
07-31-2011, 11:38 PM,
#2
Member
Posts: 1,350
Threads: 125
Joined: Apr 2009

Code:
btn.onRollOver = gotoOver();
btn.onRollOut = gotoOut();

Try that. I haven't done AS since January but I'll try to help.
  Reply  
Offline Vladimir
08-01-2011, 12:45 PM,
#3
Member
Posts: 1,597
Threads: 39
Joined: Oct 2009

If i remember it right, you can just create the button with different stances, including the one when mouse is over it, and use it.

[Image: 158aufs.jpg]
Reply  
Offline jxie93
08-01-2011, 08:38 PM,
#4
Member
Posts: 3,740
Threads: 80
Joined: Sep 2009

Alright, Josh is so kind to help me with AS2 at the moment.

Thanks anyway!

[Image: jxie93.gif]
*Signature Walkthrough* | *deviantART Gallery* | *Graphics Repository*
  Reply  


  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2025 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode