Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Need help starting out in Flash CS3
New Posts  All Forums:Forum Nav:

Need help starting out in Flash CS3

post #1 of 19
Thread Starter 
My school gets us all Flash CS3 (for laptops and home) so I figured I would finally learn how to do it. I went online, found a few tutorials for both games and animations, but I am having the hardest time!

I have some experience with PASCAL and a little bit of the BASIC on TI calculators (Mine is the TI-84+). I think its a cut-down/modified version of normal BASIC, but I'm not sure...

So can anybody point me in the right direction of, or walk me through, getting started in Flash? I'm really confused with actionscript (3.0) and I'm a little annoyed that I can't just type code in the actions tab of a symbol :\\
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
post #2 of 19
Thread Starter 
let me clarify
I can't type in code for a symbol because the box is greyed out and it says "current selection cannot have actions applied to it"

could somebody explain how to "unlock" symbols so that I can apply actions?
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
post #3 of 19
ActionScript 2.0 is based on Javascript/ECMAscript, and ActionScript 3.0 derives from 2.0. You can type code right into the actions tab after selecting a frame on the timeline. You can attach event handlers to your symbols that way. If you want to attach event handlers to symbols directly, you could roll back to AS2: File -> Publish Settings -> Flash -> Actionscript Version, and set it to Actionscript 2.0. But that does turn off a lot of neat AS3 features as well.

When you're working with a team, you wind up putting 99% of the actionscript in external class files anyway, so it integrates better with a source control repository.

There are some great resources at Kirpua.
    
CPUGraphicsRAMHard Drive
Intel 2.4 Core i7 AMD Radeon HD 6750M 8 GB 1067 MHz DDR3 750 GB 
OS
Mac OS-X Lion 
  hide details  
Reply
    
CPUGraphicsRAMHard Drive
Intel 2.4 Core i7 AMD Radeon HD 6750M 8 GB 1067 MHz DDR3 750 GB 
OS
Mac OS-X Lion 
  hide details  
Reply
post #4 of 19
Are you trying to code (make a game or something) or just animate (make a movie) in flash?
    
CPUMotherboardGraphicsRAM
AMD X6 1055t @ 4GHz 1.45v GA-890FXA-UD5 Diamond 4870x2 4gb Corsair Dominator 
Hard DriveOSMonitorKeyboard
Gskill 60GB Phoenix Pro + 1TB WD Green Win 7 x64 Dell U2311H Filco Tenkeyless Blue Cherry "Otaku" 
PowerCaseMouse
Antec 850w Quattro Lian Li PC-A05N Modded Logitech G500 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD X6 1055t @ 4GHz 1.45v GA-890FXA-UD5 Diamond 4870x2 4gb Corsair Dominator 
Hard DriveOSMonitorKeyboard
Gskill 60GB Phoenix Pro + 1TB WD Green Win 7 x64 Dell U2311H Filco Tenkeyless Blue Cherry "Otaku" 
PowerCaseMouse
Antec 850w Quattro Lian Li PC-A05N Modded Logitech G500 
  hide details  
Reply
post #5 of 19
Thread Starter 
both, I figure its better to learn how to animate to make games look better, but I suppose I could make a game without animations
edit: I am not able to type in the actions tab. I clicked on the script assist button and it unlocked it for me
Edited by nategr8ns - 6/30/08 at 2:47pm
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
post #6 of 19
Quote:
Originally Posted by nategr8ns View Post
could somebody explain how to "unlock" symbols so that I can apply actions?
Consider this example. Create a new AS3 document. Draw a box on the stage. Double click on it to select the box fill and stroke, then right click and click Convert To Symbol. Give it the name MyClip. It turns into an instance of the symbol type MyClip, which shows up in your library. Now in the properties panel, there's a space that says "<Instance Name>." Put there "clip" which names the instance, to distinguish it from the other MyClip instances on the stage.

Now move your cursor to the timeline, and click on the first frame (below the 1) to the right of first layer (Layer 1). Then click on the actions tab. Paste this in:

Code:
clip.addEventListener("click", clipWasClicked);

function clipWasClicked(evt:Event): void
{
trace("That just happened.");
}
Now every time you click on the clip, your function will be called and it will print some text in the output window. That's how to create a movie clip and attach an event handler to it. Does that answer your question?
    
CPUGraphicsRAMHard Drive
Intel 2.4 Core i7 AMD Radeon HD 6750M 8 GB 1067 MHz DDR3 750 GB 
OS
Mac OS-X Lion 
  hide details  
Reply
    
CPUGraphicsRAMHard Drive
Intel 2.4 Core i7 AMD Radeon HD 6750M 8 GB 1067 MHz DDR3 750 GB 
OS
Mac OS-X Lion 
  hide details  
Reply
post #7 of 19
Thread Starter 
sort of, but the real problem was that I could not type at all in the Actions frame, I figured that out by turning off Script Assist though.
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
post #8 of 19
Thread Starter 
this is the problem I'm getting:
LL
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
post #9 of 19
1. The movie clip cannot have actions applied to it. It's not lying to you. Actionscript 3.0 must be put on the timeline, or in a class file which you associate with a movie clip (from Library, right click -> Linkage -> Class) or the whole application (from Preferences, Flash -> Settings -> Document Class).

2. For you to see the output from the code snippet I posted, you have to bring up the output window (hit F2). Trace is a useful tool for debugging code.
    
CPUGraphicsRAMHard Drive
Intel 2.4 Core i7 AMD Radeon HD 6750M 8 GB 1067 MHz DDR3 750 GB 
OS
Mac OS-X Lion 
  hide details  
Reply
    
CPUGraphicsRAMHard Drive
Intel 2.4 Core i7 AMD Radeon HD 6750M 8 GB 1067 MHz DDR3 750 GB 
OS
Mac OS-X Lion 
  hide details  
Reply
post #10 of 19
Thread Starter 

I'll try getting around that.
I'm not lying when I say I am totally foreign to Flash (and OOP for that matter)
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
Sager NP5165
(7 items)
 
 
CPUGraphicsHard DriveOptical Drive
I7 2630QM Nvidia Geforce GT 555 Hitachi BLU-RAY 
MonitorMonitorMouse
1080p Matte 95% Color Gamut Yamakasi Precision 2703 LED IPS Microsoft Sidewinder 
CPUMotherboardGraphicsRAM
Opteron 170 DFI NF4 Ultra-D 8800GTS 4x1GB GSkill 500mhz HZs 
Hard DriveOptical DriveOSMonitor
160GB + 120GB LiteOn LiteScribe DVD burner Windows 7 Home Prem. Samsung 220WM 22" + LG f-Engine 17" (dual screen) 
KeyboardPowerCaseMouse
HP Internet/Media Keyboard Ultra 600W AeroCool AeroEngine II. Rice for computers Logitech LX7 
Mouse Pad
Belkin with Gel Wrist Pad 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Need help starting out in Flash CS3