My account: Login | Sign Up
Loading...

I want my own package function! | Thread profile

Thread profile page for "I want my own package function!" on http://www.kirupa.com. This report page is a snippet summary view from a single thread "I want my own package function!", located on the Message Board at http://www.kirupa.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity, which are reported in a table below. Additional thread profile information is also shown in the following ways:

1) Top Contributing Authors
2) Related Threads on "eBay Auctions"
3) Related Threads on Other Sites

Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a thread's popularity and/or exact posting volumes at any given reporting period.

Title: I want my own package function!
Site: Kirupa Forum  Kirupa Forum - site profile
Forum: ActionScript 3.0  ActionScript 3.0 - forum profile
Total authors: 6 authors
Total thread posts: 12 posts
Thread activity: no new posts during last week
Domain info for: kirupa.com

Thread posts in I want my own package function!:

1. 
Started 2 months, 1 week ago (2008-06-27 20:13:00)  by ad.sign
Hey guys. I know that this is not in the best practices manual, but I need to place a method DIRECTLY inside a package of mine. Pretty much like flash does with the as3 new flash.utils.* package methods. Could anyone guide me on this ... I've been searching around hardly with zero results. Tanks!
Size: 460 bytes
Customize:  Customize "I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
2. 
Started 2 months, 1 week ago (2008-06-27 20:46:00)  by Felixz
I don't remember, but: ActionScript Code: package s. utils { public function doSomething ( ) : int { return 1 ; } }
Size: 1,046 bytes
Customize:  Customize "<b>Reply 1</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
3. 
Started 2 months, 1 week ago (2008-06-27 20:56:00)  by ad.sign
Ok, but when calling the method from outside, how would it be? Maybe something like: (please confirm) ActionScript Code: import s. utils .* this . doSomthing ( ) ;
Size: 789 bytes
Customize:  Customize "<b>Reply 2</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
4. 
Started 2 months, 1 week ago (2008-06-27 21:06:00)  by sekasi
(Like I said on GTAL) ActionScript Code: package com { public class myClass { public function myClass ( ) : void { } public static function myFunction ( ) : void { trace ( "tjohoo" ) ; } ; } ; } ; import com.myClass. myClass.myFunction(); ActionScript Code:
Size: 2,339 bytes
Customize:  Customize "<b>Reply 3</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
5. 
Started 2 months, 1 week ago (2008-06-27 21:06:00)  by Felixz
ActionScript Code: import s. utils . doSomething ; trace ( doSomething ( ) ) ; http://www.mail-archive.com/flexcode.../msg48837.h tml
Size: 915 bytes
Customize:  Customize "<b>Reply 4</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
6. 
Started 2 months, 1 week ago (2008-06-27 21:33:00)  by ad.sign
The link you've reported brings that there can be only one public function per AS file. So, taking the example of flash.utils.* methods, to do something like that (with may methods directly inside a package), should I have to create multiple AS with the same package name? One for each method?
Size: 332 bytes
Customize:  Customize "<b>Reply 5</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
7. 
Started 2 months, 1 week ago (2008-06-27 21:58:00)  by Krilnon
Give the .as file the same name as the function. doSomething.as, etc.
Size: 108 bytes
Customize:  Customize "<b>Reply 6</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
8. 
Started 2 months, 1 week ago (2008-06-27 22:13:00)  by Anogar
What? You can have as many public functions as you please, can't you? I know I certainly have custom packages with a bunch of public functions in a single file. You can only have a single constructor, but that's different.
Size: 261 bytes
Customize:  Customize "<b>Reply 7</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
9. 
Started 2 months, 1 week ago (2008-06-27 22:28:00)  by Krilnon
Quote: Originally Posted by Anogar What? You can have as many public functions as you please, can't you? I know I certainly have custom packages with a bunch of public functions in a single file. You can only have a single constructor, but that's different. Are you sure that you're talking about package functions?...
Size: 2,937 bytes
Customize:  Customize "<b>Reply 8</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
10. 
Started 2 months, 1 week ago (2008-06-27 22:44:00)  by Anogar
Ah, no, you're right. I thought he meant a class within a package. What is the benefit of just putting it directly into the package?
Size: 171 bytes
Customize:  Customize "<b>Reply 9</b>: I want my own package function! :: ActionScript 3.0 :: Kirupa Forum"
 

Top contributing authors for I want my own package function!

Name Posts
ad.sign 4
Felixz 2
Krilnon 2
Anogar 2
sekasi 1
TheCanadian 1