ActionScript 2.0 :: Component, Class Or MovieClip - Structuring A Site?

Oct 20, 2005

I'm building an all Flash site, and trying to streamline my approach as much as possible. In the site, I have 3 main panes. Navigation, ContentText, and Slideshow.

I want to keep each of these areas self contained, and just call methods to make things happen. Something along these lines: slideshow.showImage, or navigation.loadData("nav.xml") or contentText.loadTextfile("about.txt").

I could make each pane a componant, or a movieClip with methods defined on the first frame, or perhaps I could use classes. I was hoping the more experienced people here might have some advice on what is the best approach to take.

View 8 Replies


Similar Posts:


ActionScript 3.0 :: Structuring A Preloader Class Around A Button Event

Apr 26, 2010

I'm putting together a portfolio site in the external method of using a document class structure.

Of the classes I have involved thus far include:

:: Master.as
and a
:: Intro.as

The Master class loads the Intro class (and others as well). The Intro class has the button event to trigger the Preloader. However, I want the button to trigger the Preloader as a separate class. Meaning, I don't want to build the entire function set inside the Intro class. I'm trying to build everything around the Master class and not go of in a tangent based around one event.

The problem I'm having is passing variable instance information in the Intro class to an external class whether it's a Preloader or otherwise.

I see tutorials for Preloaders, but how do people incorporate them into a pre-existing class structure? That is, in a modular fashion so I could re-use the Preloader class somewhere else? What's a common structure philosophy that's used to pass info?

View 0 Replies

ActionScript 3.0 :: Structuring A MovieClip Into Units That Are Loaded To A Different Time

Dec 16, 2009

itīs clear to me that I can load external SWF-Movies and other stuff like Bitmaps, Sounds etc. But how is it with the differentDisplayObejcts in the swf-root.
 
My specific problem: For a numerous mask-effected MovieClip-Field, the Constructor inside  an external class creates 3 Instances of different DisplayObjects in every loopcycle. First, the masked Object, then the mask (simply a black movieclip without code) and then, to seperate the masking from the Main-Class, a object container which contains the previously mentioned two Objects.
 
After creating the instances, they should brought into their Relationship on the DisplayList and added to Stage.
 
My Problem is: I think, the instancing of these many objects will take some time. Is there an Even-Listener and an Event, that checks if the Instancing was successfull and is ready be to displayed? Or do I have to create a boolean variable complete to my Constructor Funtion in the instanced object, that is set true after the end of the procedure? A loop in the Parent DisplayObject would check the value of the attribute and if it is set true, it will all add to the DisplayList and stage. Are there alternatives?

View 1 Replies

Actionscript 3 :: Structuring System Architecture In A Flex Web Application On A Budget (w/o Java)

May 28, 2010

I started a project a while back using the following architecture from Adobe Developer Article talking about Creating marketing platforms in Flex. I did my first set of coding locally forgetting that my server did not handle Tomcat. So I said okay, and cut some corners and then some other limitation came up and I cut some more corners. Eventually for a good week or two, it was trying to get the project working with making the ends meet. Layers started to merge.

In the end I used a

PureMVC (Presentation/Client) -> ZendAMF (Communication) -> MySql (Data) Layout.

It worked but I never felt as though I had some layer just to take care of all the SQL calls to the data.It just felt hacked together

So should I keep the above setup and just start from the presentation layer and move downwards like they said in the article or is there a better layering (based on a hosting plan that does not handle Java) I could accomplish ?

UPDATE: My current hosting plan - [URL]

View 1 Replies

ActionScript 3.0 :: Create Movieclip Class That Subclasses Another Movieclip Class

Sep 3, 2010

I want to create a movieclip class that subclasses another movieclip class and inherits all its properties (rather than having to rely on the include statement). In my project I'm using:An abstract parent class that extends a movieClip: "infantryDroid".[code]However everytime I try this, flash acts as though nothing was imported from the parent movieclip class.If I was to try the above code I would get the message that _root and speed (which were defined in the parent class) "are undefined".

View 6 Replies

ActionScript 2.0 :: Can't Remember Flash Class Site?

Nov 14, 2006

I cant remember the URL to a site with actionscript class resource. Had a look in Sen's lists but couldnt find it.

it had a red and grey rocket in the top right corner with the classes and examples listed underneath and something like locos.tweens in the title

View 3 Replies

ActionScript 3.0 :: Horizontal Flash Site - Tween Class

Apr 7, 2009

I am trying to make a horizontal flash website in AS3. I have my navigation all set up and want it to Tween (slide) to the right for all of my 4 pages. My stage size is 2880w X 600h and I want my X to slide over in increments 720px to the right when the navigation is clicked. I also want it so when I test me SWF that I only see a 720 X 600 px area at a time. So far I have looked up Tweener classes online and they seem very confusing and need to be stripped down a lot.

View 4 Replies

ActionScript 2.0 :: One Long Horizontal Movieclip As A Site

Aug 16, 2011

URL...Seems to me like a simple, long movieclip on a relatively intuitive but still pretty simple timeline.I've worked a little in flash before, made this site (oneandabit.co.uk, runs slow, bit blocky etc) but I'm looking to revamp it into something like the yellsite.Can anyone give me a clue as to what goes into this? Is it as simple as it seems? It needs to be seamless.Does anyone know of any nice (simple-esque) tutorials for me to download source files from, so I can figure it out?As usual I've tried kirupa etc but everything I've found is UBER heavy on ridiculous coding which puts me in a bit of a squeeze where it comes to customisation.

View 2 Replies

ActionScript 2.0 :: Clicking A Movieclip That Links To A Site?

May 6, 2007

Basically, I need it so you click my movie clip with instance name of "bg"and it links to a site.. but it also opens as a new tab (Not a new window, but a tab like in mozilla), or a new window in internet explorer

View 1 Replies

ActionScript 2.0 :: Start Movieclip Dynamic Like Site?

Sep 26, 2002

how do you start movieclip dynamic? like start a movieclip ONTOP of another on like this site.[URL].. Does anyone have a tutorial or something like it ..?

View 2 Replies

ActionScript 2.0 :: Add To Movieclip That Will Bookmark Site In Viewer's Favorites?

May 19, 2005

what's the actionscript that i could add to my movieclip that will bookmark my site in viewer's favorites?

View 2 Replies

ActionScript 2.0 :: Add To Movieclip That Will Bookmark My Site In Viewer's Favorites?

May 19, 2005

Does any of you know what's the actionscript that i could add to my movieclip that will bookmark my site in viewer's favorites?

View 2 Replies

Actionscript 3 :: Can A Document Class Extend Another Custom Class That Extends MovieClip?

Aug 16, 2011

If I have a Document class that extends MovieClip, and I want to use it as the basis for another Document class, is it possible to create a subclass that extends the main document class and use that for a different FLA?

For example,

fla1.fla has a document class of MyMainClass:
public class MyMainClass extends MovieClip
fla2.fla has a document class of MySubClass:
public class MySubClass extends MyMainClass

I've tried, but now I'm getting errors that all of my variables that reference stage instances aren't being found.

View 1 Replies

ActionScript 3.0 :: Referencing A Textfield Inside A Movieclip Class From Document Class

Feb 3, 2009

Ok, this is one of those walls that I know once I can jump over it, I will be a much happier developer again.

I've done tons of reading, and think I have a firm understanding that the general consensus is that if you want to reference something, it needs to be added to the display list, using addChild().

I hate to be defiant, but what if I don't want to?

Or at the very least, what if I want to add a movieclip class to the stage using addChild, and then reference objects inside it?

It is much easier this way than what most people recommend - adding 15 objects via addChild, then setting the x and y for the, etc.

That said, I'm all about using classes and using as3 the way it was meant to be used. So what this is, is a best practices question I guess.

HERE ARE THE STEPS I'M TRYING:

- Create new flash document

- Draw graphic symbol bg, with text field over it, select them, convert to movieclip symbol, and export class name "box", then delete it from stage

- Add document class .as file, which simply adds that class "box" from the library, to the display list using a simple addChild()

- Set a name for that box using box.name = "test" let's say

- Do a simple trace like the following - "getChildByName('test').textFieldName" - it shows up great

- So then, I'll now try to set the text by doing this - getChildByName('test').textFieldName.text = "yo";

That last line above, is what doesn't work. I know I'm referencing wrong, but how would a pro as3 developer, reference something on the stage within a movieclip class, from the document class?

View 1 Replies

ActionScript 3.0 :: 5000: The Class 'fla.class' Must Subclass 'flash.display.MovieClip'?

Jun 24, 2009

And i cant figure it out.the "my.fla.class"content looks like this

Code:
package my_fla
{

[code].....

View 2 Replies

ActionScript 3.0 :: Reference Movieclip On Stage From Custom Class Of Document Class

Dec 7, 2009

Is there a way I can reference a Movie clip I have on the main stage from a custom class of a document class?[code]

View 1 Replies

ActionScript 3.0 :: Using The AddChild Function To A Movieclip To Load Up Another Section On The Site?

Apr 24, 2011

I'm using the addChild function to a movieclip to load up another section on the site. However,everything behind that loaded SWF is still running,meaning sections are constantly stacking and it slows down the more sections you access.I've been trying to think of ways to resolve this and have yet to come up with a decent solution. I've thought of removing the previous swf,but that would would take the swf with it that was loaded as a child.Here's the important bit of my code you should see:

ActionScript Code:var section2Request:URLRequest = new URLRequest("Tracks.swf");var section2Loader:Loader = new Loader ();tracks_mc.addEventListener(MouseEvent.CLICK, tracksPage);function tracksPage(event:MouseEvent):void{[code]......

View 1 Replies

ActionScript 3.0 :: Call Function Of Document Class From MovieClip Class

Aug 8, 2008

How can I run function of the main document class from a class of a MovieClip? I usually just used MovieClip(parent).function(), but now my MovieClip has another parent. Or what do I have to pass to the MovieClip class when creating the MovieClip to acess the main document class?

View 9 Replies

ActionScript 3.0 :: Dispatch Event From Class That Isn't Extended Class Of MovieClip?

Oct 20, 2009

Is it possible to dispatch event from class that isnt extended class of MovieClip? I created my own class and put import flash.events.Event; import flash.events.*; but when i call dispatchEvent compiler throws error:"1180: Call to a possibly undefined method dispatchEvent."

View 3 Replies

ActionScript 3.0 :: Reference Movieclip On The Stage From A Class Of The Document Class?

Dec 8, 2009

Is there a way to refer to a Movieclip on the stage from a class file of the document class

Lets say I have 3 MovieClips on the stage(a Circle, a Square and a Triangle)

I have the document class which calls another class that controls the MC on the stage

Example

ActionScript Code:
package {
public class Example extends Sprite {
//Create the instance of the class being called

[Code]....

View 1 Replies

Professional :: Shuffling Class - Error: "5000: The Class 'Shuffle' Must Subclass 'flash.display.MovieClip'

Jul 28, 2010

I'm trying to build a shuffle function that somebody gave me into my card game. I two external .as classes; one is Shuffle.as, which is my document class, and the other is card.as. I'm building the shuffling function into Shuffle.as. I think I'm getting close to making it work, but there are some problems. I keep getting this error message: "5000: The class 'Shuffle' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type." Here is my code. Shuffle.as code
 
[Code]....

View 2 Replies

ActionScript 3.0 :: Access A Movieclip On Document Class From Another Class?

Mar 3, 2011

Going further on my app, I felt in another problem. Despite having lots of posts on the web regarding this, none of the solutions worked for me In my document class (Main.as) ve two containers. One empty and another with a star that is being imported from the library. Hereīs the main class:

package
{
import flash.display.*;

[code]......

View 4 Replies

Flash :: Use A New MovieClip As A Class Or To Copy It Without Reference To Its Class?

Jul 21, 2011

I am doing a looping background with 2 identical BG movieClip (B1 and B2). Those 2 are "new" by the same class.

var B1:MovieClip = new BG();
var B2:MovieClip = new BG();

But because this BG class picture is loader from the internet and the picture is rather big. When I addressed its loading by using progressEvent. The picture is really loaded 2 times. Is there anyway I create B2 based on B1 without using new BG() again? Since it definitely makes a new BG with Loader code inside.

[Code]....

View 2 Replies

Actionscript 3.0 :: Custom Var On Class That Extends MovieClip Class?

Sep 27, 2011

If I can create dynamic variables on a MovieClip.. why would I not be able to create dynamic variables on a class that extends MovieClip?

[Code]...

I created from a mc symbol in the library. it works fine, except for adding the custom variable.. .. which I need to be able to do.

View 7 Replies

ActionScript 3.0 :: Static Class To Component?

Aug 26, 2010

i created One Static Class. This class used to Trim, TrimFront, TrimBack, Replace in string.How can i convert this class to component?

View 2 Replies

Java :: How To Call ID Of Component In AS Class

Jul 27, 2009

I have a class with a method name, and now I have a Flex MXML... how would I call the id of the component in my ActionScript class...

View 1 Replies

ActionScript 3.0 :: Targeting A Component In A Class?

Sep 1, 2011

I want to load a swf into a byte array before loading it into an swf loader. I'm wondering how I would target a specific swf loader to do this to since I have 3 different ones.

View 1 Replies

ActionScript 2.0 :: Attach Component Within A Class?

Jan 11, 2006

i'm looking for a way to add an instance to a component from a class...Something like

Code:
class myClass extends MovieClip{
function myClass(){
}

[code]....

but i dont know about the "thecomponent" part.. i tried "textInput" but it doesn't work..

View 8 Replies

ActionScript 2.0 :: Cannot Use The PopUpManager Class / Component

Mar 12, 2006

I cannot use the PopUpManager class.

[Code]...

View 1 Replies

ActionScript 3.0 :: Cast A MovieClip To A Custom Class That Extends MovieClip Called MovieClipExt

Jun 4, 2010

i'm trying to cast a MovieClip to a custom Class that extends MovieClip called MovieClipExt

ActionScript Code:
package {
import flash.display.MovieClip;

[Code]....

...but sadly returns null instead of a MovieClip converted to MovieClipExt

what should i change to make this work?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved