Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-01-2006, 10:58 AM   #1
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default two AS3 newbie questions

1 If i dont want to use classes,can i make the same way as before, putting all the code in the first frame?And it still works with the new player?

2 Now i have to import the properties i want to use too?I mean, isnt enough to import flash.display.movieClip, also if i want to use _alpha have to import flash.idunknowant.alpha ?
Incrue is offline   Reply With Quote
Old 04-01-2006, 02:20 PM   #2
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

not sure about not using classes. flash 9 has not been released yet so I don't know how thats going to go, but i suspect it will work like that.

no you only have to import the class, properties and methods are availible on the class, nothing else required.
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 04-02-2006, 03:11 PM   #3
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default

So, when they say:
'_alpha is deprecated, now use:flash.display.DisplayObject.alpha'
doesnt mean i have to
import flash.display.DisplayObject.alpha;
rigth??
Incrue is offline   Reply With Quote
Old 04-02-2006, 03:12 PM   #4
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

it means you have to use .alpha on your movieclip/displayobject/sprite
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 04-03-2006, 09:00 PM   #5
Incrue
the ever-living
 
Incrue's Avatar
 
Join Date: Jan 2006
Location: inside this plane
Posts: 113
Send a message via MSN to Incrue
Default

What i want to know is if, in the beginning should i
import flash.display.MovieClip;
import flash.display.DisplayObject.alpha;

or just
import flash.display.DisplayObject.MovieClip;
Incrue is offline   Reply With Quote
Old 04-03-2006, 09:19 PM   #6
mrand01
Senior Member
 
Join Date: Jun 2003
Location: Morris Plains, NJ
Posts: 621
Send a message via AIM to mrand01
Default

just movieclip. Movieclip is a class, it has to be imported, alpha is a property that is specific to an instance of that class, it does not have to be imported. only import classes
mrand01 is offline   Reply With Quote
Old 04-05-2006, 07:31 PM   #7
abeall
Senior Member
 
Join Date: Feb 2006
Posts: 819
Default

Can I just do
import flash.*
That would be so much nicer.
abeall is offline   Reply With Quote
Old 04-05-2006, 07:32 PM   #8
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

yes you can, but then it will only import the classes in the flash package.
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 04-05-2006, 07:40 PM   #9
webninja
Registered User
 
Join Date: Mar 2006
Location: Rhode Island
Posts: 51
Default

If you're not sure what to import, omit the import statement and let the compiler do the work. It will tell you what you're missing, then just go add it in.
webninja is offline   Reply With Quote
Old 04-05-2006, 07:41 PM   #10
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

or press ctrl-o or enter behind the class.
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Randomly Loading Questions from XML for Quiz. Dave At ADC ActionScript 2.0 0 12-14-2005 02:49 PM
Newbie questions.. timemachine ActionScript 1.0 (and below) 5 05-21-2005 08:59 PM
help on simple questions infernojericho Gaming and Game Development 0 05-08-2005 07:52 PM
[Q] Do we need those forums??? CyanBlue General Chat 59 07-27-2004 12:13 PM
A couple more newbie PHP questions simontheak Server-Side Scripting 13 06-09-2003 05:59 PM


All times are GMT. The time now is 04:06 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.