Reverse Domain Naming Convention For Packages
Feb 17, 2011This is not a technical question, just out of curiosity, why do we usually use the reverse domain naming convention for packages? i.e. com.yourname.yourpackage.class
View 2 RepliesThis is not a technical question, just out of curiosity, why do we usually use the reverse domain naming convention for packages? i.e. com.yourname.yourpackage.class
View 2 RepliesI have seen lot projects following this kind of coding style
Any significant advantage the following syntax
My project name : King Author(KA)
I am going create button components. My class name "KAButton"
Is it right approach and what about namespace?
naming convention for GUI components(Flex/Html) ?
When you're working with a class that has both a private and a public function by the same name (something like playVideo())? Often my public playVideo() function only provides a hook to the real private playVideo() function, which will contain more functionality. Should I use an underscore in the private version -- _playVideo() -- or is there some better way to do this?
I know it's a matter of preference and there really is no right or wrong way, but I haven't been naming all of my private properties with the underscore so it seems odd to start now with only *some* of them. This sort of trivial thing has bugged me for a while, so I finally decided I should get it settled.
I am looking at a sample sliding image flash file that uses setInterval and rollOvers etc. I noticed that the author named his instances as numbers which isn't allowed. I don't even understand how he was able to do it unless he used an older version of flash. CS won't let you name an instance starting with a number.
He has 5 instances on the main timeline all named "1" thru "5". I figured I would try to rectify the problem by changing the actions and of course changing the name of the movieclips to "mc_1" thru "mc_5". I ran into some logic problems because his script relies on using the _name property of the clip in order to correctly select the active button when the user rollOver it.
For example, if I rollOver the 3 button the rollover = this._name property apporiately equals "3" which is simple. But when I tried to change it via a variable so that it equals "mc_3" well I have run into a problem because obviously 3 is a number while mc_3 is a string.
Here is the original code:
Code:
image_slider.onEnterFrame = function() {
var _counter = this;
_counter.x_target = -(rollover - 1) * 352 + 576;
[Code]....
A lot of people have .com websites & put all their classes & packages inside a com folder & then their website name to avoid any possible naming conflicts when using other peoples classes - all very sensible. I have a .co.uk website however - is there an equivelant naming standard?
View 3 RepliesSo I have this mc: this.slidingMenu it's a mc of a ring shaped menu, which turn around when 2 button get clicked. When the button on the right, mc goes forward until stop(), when the button on the left mc goes reverse until the stop(). In the first case i use gotoanplay, and everything goes fine. For the second I use prevFrame, like this:
[Code]....
I see examples in the SWFAddress documentation, but it's not clear what the convention should be for a multi-level path. Do their examples intend to suggest that the path separator should be a hyphen?
View 1 Repliespost the code for a working cross-domain securityfile that allows access only from the same domain as all the flashfiles and xml files are in?used to be easy in as2 but i think i dont know what i need to know about it in as3..
View 3 RepliesWe are running FMS3 on Windows 2003 Server. Videos stream and play fine when inside our domain, but outside the domain the videos take anywhere from 20 or more seconds before playing.
After analizing the connections it was determined that the player is randomly trying to access ports until it gets to the one that works, but this is ONLY happening from people trying to view videos from outside our domain.
I have moved a web application from old domain to new domain. I cannot get Flash to engage. I have changed the domain in flash_images.php file to the new domain. I have a flash_box.swf file and I have a js file these are the only flash components that I see--old domain is e.g. www.example.com new domain is [URL]..I am not a flash developer, how do I get flash to work on the new domain?
View 3 RepliesI created some game and would like to let the users play it only on my domain, so to forbid to play it offline or put on some other site. Is there a way to do it? Somehow check domain or so?
View 1 RepliesMy swf works fine when previewed locally but because of flash cross domain issues (link below) doesnt work live. [URL] Ive used a 'crossbrowser.php file to .load in xml but am not having success with the sendAndLoad command. [URL]
View 3 RepliesI am a novice in ActionScript 3.0. I am trying to use the sample code from AS 3.0 tutorial but it return me an error "Packages cannot be nested". How can I fix it? Here's the sample code: fla file format.
[Code]...
I want to set them up with packages but tried before and failed.At the moment, I've made a folder,
C:/flash/mbl
In there, I have all my classes that I want to reuse. what do I do next? I'm using Flash CS3, would also be useful to know how to do the same in Flex Builder 3.
I almost have it, ( I think) but whenever I try to use a package with more than one class in it -- even the standard ones supplied in the ActionScript references, they don't work.And, if I have anything in the flash file other than an empty single frame, it breaks. So this precludes the use of library objects, which, if you CAN use them, saves a lot of coding time..
View 3 RepliesI am trying to develop a away3d project to learn away3d. i searched internet and found some sample codes but all of them are including packages like
package
{
....
}
but i could not integrate the packages into flash action script panel. I copied and pasted but it always fails.
i just downloaded a code from the internet, but when i open it up, the code starts with ''packages''.
how can i use packages on movieclips?
Its giving error on importing mx.resource.resourcebundle that packages cannot be nested[code]...
View 2 RepliesIn the Below action script file there is an error saying cannot import mx.controls.Label, I am compiling this through command line on,linux and the environment variable path is set where flex is installed ,how to resolve this
package {
import mx.controls.Label;
public class Test
[Code]....
I cant just get what does packages and classes do.
View 1 Replieswith the following code, I receive an error stating that packages cannot be nested.
View 8 RepliesI got the error: ''Packages cannot be nested''
package
{
import flash.display.*
import flash.events.*
[Code]....
how to get this to work. So I have 2 .as files (ImageMain and FullScreenImage)And in the fla file I have a movieclip on stage called menu and this fla is linked to the ImageMain.as
ImageMain.as (part of the code):
Code:
package {
import com.gfxcomplex.display.FullScreenImage;
public class ImageMain extends Sprite {
public static var menuIn:Number=-113;
[code]....
When I run the " red" code I get the next error:1120: Access of undefined property menu. It looks like the imported FullScreenImage.as cannot acces the menu movieclip on the stage.
when i compile and run this code its give me this error 1037: Packages cannot be nested. how to fix this
package AS.socket{
import flash.events.Event;
import flash.net.Socket;
import flash.events.IOErrorEvent;
[code].....
I have made a script, and now has come the point when I need to use removechild. Whenever I try this I get an error. After looking at the problem, I think I need to learn more about scope and packages. I think if I put everything in the correct scope, I will be able to use the removechild command. I tried to make all my vars public, so that removechild would work, however I got an error that anything public needs to be in a package. I tried to add the package part to my script, but got the error that packages cant be nested. I tried some other things and still no luck, just more errors.
So, if anyone could point me to a tutorial, or recommend a book or something, that will help teach me about scope and packages, Or if you are feeling patient and generous, and you think you could explain this problem to a 5 year old, please explain it to me the way you would to said 5 year old. If you maybe think you can help me out on the script, it can be found here: [URL]
I'm brand new to AS 3.0, and I'm having a lot of trouble with it. Basically, all I want to do is load in an external swf when a button is clicked. The swf to be loaded would be defined by a variable, rather than hardcoded. Sounds pretty simple, no?[code]....
View 4 RepliesI'm using AS2, and trying to use AS2's packages for the first time, so I can organize my .as files properly. I'm running into some problems though I've got some classes that extend MovieClip, and I've put the class names in the Linkage>Class fields. When I publish, though, I get the error: The class or interface 'ClassName' could not be loaded. anyone know what I'm doing wrong? I tried importing the classes on the main timeline, and even including the directories of those classes on the classpaths list, but no dice
View 1 RepliesI was working with a sample code and when I do a 'cntrl + ENTER' I get a 'Type was not found or was not a compile-time constant: LoginEvent' error I also get the same error for the other events of 'RoomEvent' and 'XIFFErrorEvent'. My source files 'Test.FLA' and 'Test.AS' are located here: 'xiff_3_0_0src' whereas the various packages refered to in the source file are located here: 'xiff_3_0_0srcorgigniterealtimexiff'. My import statements are as follows:
import flash.display.MovieClip; import org.jivesoftware.xiff.conference.Room; import org.jivesoftware.xiff.core.JID; import org.jivesoftware.xiff.core.XMPPSocketConnection; import org.jivesoftware.xiff.events.LoginEvent; import org.jivesoftware.xiff.events.RoomEvent; import org.jivesoftware.xiff.events.XIFFErrorEvent;
i have the following AS class file:
package {
public class DropImage {
[code].....
I would like to know how can I install a library packages to a Flash project. I am using Adobe Flash CS4 and the library I'm trying to include is in AS3. The library can be found on [URL].
View 1 Replies