ActionScript 3.0 :: Effective / Quick Management Of Elements On Webpage?

Jun 6, 2010

Just a question about a page im building.. it may not be the optimal method of doing it (and im open to other suggestions) but still would like an answer to if the below is possible... Every time I switch pages, the 'new elements specific to that page' are created with AS3, placed on the page, animated etc etc. On frame one I have attached to each button a 'check' for the destination when the button is clicked and based on where the user currently is, all elements from that section are removed from the stage.

My question... I am removing each element individually by its name.. and some sections are quite large and i plan to modify heavily continuously. Can I add them to an (invisible) container of sorts in each of their respective sections and then remove via some kind of '.childrenOf' method ?? eg. when user is in the 'about' section of the site and clicks to go 'home', all elements in 'about container' are removed via 'for all childrenOf about_container ?

View 0 Replies


Similar Posts:


ActionScript 1/2 :: Generate Array Whose Elements Are Each Arrays To Make Quick Loading Database Of Sorts

Jul 7, 2009

I'm trying to figure out how to generate an array whose elements are each arrays to make a quick loading database of sorts.the main array could essentially be something like "employees" while each employee would have demographic data like age, salary, gender, etc.In some cases the information on some employees would be greater than others, and options created by "push" would imply the number of elements within each employee array would be variable until generated.[code]But I get the feeling this type of array as it is currently described doesn't lend itself well to adding new elements in the way I've described.My goal is once an employee's information has been entered and saved, I can call up their info by array number like aEmployee[2], and if employee 2's name is Bob, then Bob's name would appear in the text field, along with all the other fields related to Bob's array, such as being male, 42 years old, and living in Witchita Kansas.Would I modify a multidimensional array, or do I want an array within an array, and is there a way to add "arrays" as elements?

View 8 Replies

ActionScript 3.0 :: Effective Way To Write?

Nov 27, 2009

Lately i've been trying to right in external classfiles to create everything and make everything work instead of stuffing everything in my timeline. So now i have made a classfile that first creates all the movieclips i wan't on the stage and then defines what all the buttons do.
 
But when i want to acces a variable that has been created in "createMc" from a private function i get an error, so i have fixed this by giving the var's a name and then use getChildByName().
 
But i think this looks like a really innificiant way off writing something and was wondering if it was possible to write this in a better, shorter, and thus more effective way.

[Code]...

View 5 Replies

ActionScript 3.0 :: Password Protecting A Swf: Effective Or Not?

Feb 15, 2012

I've created a password variable w/input text on the first frame of a swf to enable private viewing of a swf; so if you dont know the password you cant procedd to frame 2, to see the whole thing.

View 21 Replies

CSS :: Most Effective Way To Style Flex Application?

Feb 2, 2010

I have a fairly complex Flex application that uses many different components. I want the application to be able to custom styling and/or skinning. I also want to be sure that the styling approach makes the most efficient use of system resources (memory, CPU, network), and that it does not adversely impact performance. We currently are using a hybrid approach to styling the application that uses both CSS and a Flash skin created in CS3. It seems odd to me to have a two-pronged approach to styling an application and ideally would like to settle on one approach or the other. Some outline about advantages and disadvantages of using either exclusively CSS or a Flash skin? Is there a justification for using both within the same app?

Using CSS exclusively seems advantageous because it is approachable by anyone with a basic understanding of other uses of CSS, especially when using the Flex 2 Style Explorer. On the other hand, I know that the CS3 skin we use declares up/over/down/disabled/pressed skins for each component where these states are needed and Flex manages the transitions to the appropriate skins as each state is (de)activated. However, my impression is that creation of a Flex skin in CS3 requires somewhat specialized skills and tools. So what would you recommend for styling a Flex application if performance, customization, and efficient resource utilization are priorities?

View 3 Replies

ActionScript 3.0 :: Making More Effective Code?

Feb 16, 2011

It's working and all..however... It's not very dynamic.. It's hardcoded every tween / fade function , one for each of the images, and pause functions...when basically it does the same thing for each image...So thought I'd have a go here with you guys which are much more experienced than myself on this field.This is the code I currently use: (displays first image..then fades it out...fade in the next image...pauses...fades out..fades in next..pauses..etc etc.. )

Code:
package{
import com.greensock.TweenLite;

[code]......

View 3 Replies

ActionScript 1/2 :: Effective Preloading With Sound In FLA Library?

Sep 9, 2010

I've run into some trouble with making a preloader for my flash file. First I went ahead and made an external preloader that loaded in the swf file - but then all my audio did not play (they are called upon as sound objects). Found this out because the file is loaded into the preloader but not the audio files from the library???
 
But if I put the preloader in the actual flash file it's kind of useless as it wants to preload all the audio on the first frame. Now I went ahead and changed it to load on frame 2 or 3 (using the publish settings to set "Export frame for classes") but now the audio will not play at all!
 
Are preloaders doomed to fail in AS2 when there is audio files being called within the library as sound objects??

View 2 Replies

ActionScript 3.0 :: Effective EventListener With Many Event Listener?

Jun 19, 2009

I'm new to AS3.0 Is there a good way to deal with many event listeners like say MouseEvent.MOUSE_OVER and MouseEvent.MOUSE_OUT for the same type of movie clips? I've been getting the following error if the mouse rolled over or out too fast.

TypeError: Error #1009: Cannot access a property or method of a null object reference. at csAS/onSubmenuRollOver()
TypeError: Error #1009: Cannot access a property or method of a null object reference. at csAS/onSubmenuRollOut()

View 4 Replies

ActionScript 3.0 :: Effective Slideshow - Fading Image Transitions

Apr 5, 2009

I'm trying to create a simple yet effective image slideshow for my homepage. It'll be a bar, 600 pixels wide, by 300 pixels high. There will be 4 buttons that will line the bottom, numbered 1 through 4, that will control 4 separate slides that'll appear in that window. If you don't click anything, the images will fade in and out after x amount of seconds. Clicking on the numbered buttons will load the appropriate slide, and each slide when clicked will take you to a certain part of the website.

I wish to do this in actionscript... not using the timeline as I prefer to do all transitions in actionscript. Can anyone shed light on how to set this up? I've been trying to use the TransitionManager function... however I'm getting mixed results. Here's a screenshot:

Code:
import fl.transitions.*;
import fl.transitions.easing.*;
ss1_mc.alpha = 1;
ss2_mc.alpha = 0;
ss3_mc.alpha = 0;
ss4_mc.alpha = 0;
var currentImage:MovieClip = ss1_mc;
[Code] .....

View 1 Replies

ActionScript 3.0 :: Scale World Larger And Smaller To Effective Zoom In And Out?

May 22, 2010

For lack of a better description, I have a world of bitmaps, but some are outside the boundaries of the stage. How can I scale my world larger and smaller to effective zoom in and out?

View 7 Replies

Actionscript 3.0 :: Drawing API - Effective Rationalising Of Code Using Functions And Loops?

Jan 4, 2010

i need to draw an API Drawing and do the following with it;

-Effective experimentation with the drawing API e.g. gradient fills, curves etc.

-Effective rationalising of code using functions and loops.

-A sophisticated/realistic looking drawing, that shows the ability to use the drawing API with a high degree of skill.

View 14 Replies

Professional :: Position Elements Relative To Other Elements Or In Absolute Values?

Jan 26, 2010

Is it generally to position elements relative to other elements or in absolute values?

View 2 Replies

ActionScript 3.0 :: Shift Array Elements Without Deleting The Elements?

Oct 1, 2009

does anyone know how to shift all the array elements by one or more without deleting the array itself?

Something like rotating the array:

1,2,3,4,5,6,7,8,9,10
10,1,2,3,4,5,6,7,8,9
9,10,1,2,3,4,5,6,7,8
8,9,10,1,2,3,4,5,6,7
7,8,9,10,1,2,3,4,5,6

View 4 Replies

Html :: Show Elements Over Flash Elements?

Jun 9, 2010

When i create a menu, the dropdowns go behind the flash element. But in some sites, like Digg, it is shown above. z-index is of no use

View 2 Replies

ActionScript 2.0 :: CheckBox & XML Quick Bug?

Nov 6, 2007

I have a small big (well I hope it's small, that I can't see where I am goign wrong).

I have a check box and when the user selects that and then clicks a ok button then it should load some new XML into a textfield. The problem is it doesn't seem to want to get past the actual function. I know with the trace statement that it knows it's selected and the OK button has been clicked but it just won't go to the loadXML function. Can anyone see something I'm not?

[Code]...

View 2 Replies

ActionScript 3.0 :: Stacking Elements Under FLA Elements?

Jul 10, 2009

I made a .as Class where some graphical elements are spawned into the stage. However, the Flash (.fla) have some internal graphics that are supposed to be over the graphical elements spawned from the custom class.I tried to make another layer over the layer where the as3 Class is being called, but unfortunately it doesn't do anything, the graphic from the .as still appearing over the internal .fla graphics.

View 2 Replies

String :: Achieve Fast And Effective String Compression

Dec 2, 2011

I have an Object which stores pairs for a find and replace that I perform on up to 1500 Strings at a time.The Object is populated with pairs using a method that will accept a String and then store this as a property with the value being an automatically assigned base 36 number, like this:[code]nextShort returns an automatically incremented value being the subject of .toString(36), so running the above a few times might make _pairs look like this:[cod]ehowever in my mind I foresee a massive problem in a case where I might want to "shorten" 2000+ Strings and the _pairs Object has at the same time has over 500 pairs.That ends up being 1,000,000 iterations all up which obviously doesn't seem very efficient at all.

View 2 Replies

ActionScript 2.0 :: Flash Not Loading Quick Enough

Mar 22, 2005

Ok, the WD who designed my site put a flash header at the top w/ my testimonials. Now I have another WD fixing stuff on my DW template & there seems to be a problem for me in Fire Fox. Whenever I go onto certain pages, the flash catches & doesn't load smoothly with the rest of the page or some times not at all. See page... [URL] (or any page in that test folder)

I'm about to launch the site & he says there is nothing wrong, but this didn't happen b4 & the last thing I want is for my beautiful site to show white space at the top LOL He had deleted the flash cards (is that what they are called?) saying the testimonials are in the flash file, but I still have them on my HD just in case. Can someone tell me what the problem is & how to fix it. This is my first time using flash & I want it to be a positive experience for all.

View 2 Replies

ActionScript 2.0 :: Quick Falling Snow ?

Dec 1, 2005

is it possible to have the snow moving from right to left?someone had designed something completly sideways as they were rotating there monitor 90 degrees instead of buying a video card that would do it for them.

View 3 Replies

ActionScript 3.0 :: Quick About Loading From A Php File?

Oct 6, 2010

Here's my problem in a nutshell. I have a database (mysql), then i get data from an external php file that connects to the database. I use URLReqest and URLLoader to access the php file.

My question is, when i change data in my database, the change reflects in the php file. But when i access the php file from Flash, it doesn't refresh. I have to make a new php file, then access this new file to get the updated data.

[Code]..

View 2 Replies

ActionScript 2.0 :: Flash - Not Loading Quick Enough?

Mar 22, 2005

Now I have another WD fixing stuff on my DW template & there seems to be a problem for me in Fire Fox.Whenever I go onto certain pages, the flash catches & doesn't load smoothly with the rest of the page or some times not at all. See page... I'm about to launch the site & he says there is nothing wrong, but this didn't happen b4 & the last thing I want is for my beautiful site to show white space at the top LOLHe had deleted the flash cards (is that what they are called?) saying the testimonials are in the flash file, but I still have them on my HD just in case.Can someone tell me what the problem is & how to fix it. This is my first time using flash & I want it to be a positive experience for all.

View 2 Replies

ActionScript 3.0 :: Quick ColorTransform Of Button Clicked

Apr 18, 2009

I wrote a simple class to tranform the color of the btn clicked to a random color everytime its clicked but my lack of understanding of AS3 is giving me deadends, I'm not sure how to set it up and my current set up its giving me the following error:
ReferenceError: Error #1069: Property event not found on flash.geom.Transform and there is no default value.
at colorChanger$iinit() at mainBeta2_fla::MainTimeline/setName()
 
So this is my colour transform class:
package { import flash.display.MovieClip; import flash.events.*;
import flash.geom.*;
public class colorChanger extends Sprite {
// Not sure if I should put e:MouseEvent or a pass a variable to the function
public function colorChanger(colorPass) {
[Code] .....
I need the button to change to a random color everytime its clicked and I'm using a custom class because I have over a dozen buttons in one time line...

View 3 Replies

ActionScript 3.0 :: Super Quick Drawing Effect?

Apr 27, 2011

I want to end up with the following effect. Bitmap pencil quickly moves accross the canvas diagonally and reveals an image. The image itself is drawing so I kinda want to make the illusion that the pencil draws whatever is on it. I don't want the pencil to follow the actual line in the image just to ask like a mask and quickly reveal the picture. So I was wondering if there is any cleverer way to achieve this, instead of animating everything manually

View 1 Replies

ActionScript 2.0 :: Quick Mouse Take Off From Button OnRollOut?

Mar 20, 2012

I'm going to create simply menu in AS2 and everyting is ok except this onRollOut.

"on", "off", "start" = are labels

My code in first frame:

Code:
stop();
this.onRollOver = function() {

[Code].....

and problem is that when I quick take off mouse from button the efect is not disapear.

View 3 Replies

ActionScript 2.0 :: Frame Rate Quick Code?

Mar 12, 2005

this seems so simple but i cant figure out the logic or commands to do it.Q. How would i make a movieclip with a text box inside called FrameRate show the frame rate.To make it easy im just going to put the code on the movieclip itself.

View 3 Replies

ActionScript 2.0 :: Quick Troubleshoot: Preloader With External MP3?

Apr 27, 2005

I had a preloader that would load in some external SWF's... and now decided to also preload a sound I am importing using aSoundObject.load(). This is how I added the sound to the preloader:

Code:
mySound = new Sound();
mySound.loadSound("som/fundo.mp3", false);
bytes = myExternalSwfContainer.getBytesTotal() + mySound.getBytesTotal();
loadedBytes = myExternalSwfContainer.getBytesLoaded() + mySound.getBytesLoaded();

For some reason, whenever the preloader starts now... it'll start something around 70%, so I traced the loadedBytes and found out that it thinks its already loaded about 100Kb on the first loop through (even though it hasn't). So then, the preloader reaches 100%, calls the site, and the sound isn`t even loaded in completely yet.

View 4 Replies

ActionScript 2.0 :: Variables Passed In From HTML / Not Quick Enough?

Mar 11, 2008

I'm having a bit of a problem with external vars and timing.I'm building a custom FLV player. In the parent HTML I have some boolean variables that I'm passing to the SWf, stuff like autoStart and loopPlayback.[code]The problem is that line gets executed before the external var gets in, I think. If I place a dummy var at the top of the AS then everything works fine. And the external var is definitely getting passed in, I have setup a check for that.I would need something like loadVars.onData ...but I'm not using loadVars, I wnat the vars to come in from the SWFObject HTML, or maybe a query string.

View 2 Replies

ActionScript 2.0 :: Tapping Game - Quick Key Pressing

Oct 26, 2002

I have this tapping game where I need to quickly tap a key, but I don't know how to do it in Flash... All I know is on(KeyPress) but that allows me to simply hold down the key...How to increase a scale of something (lets say a bar) every time spacebar is pressed or released, but having to tap spacebar instead of holding it...

View 9 Replies

MX04 Quick Question About Dynamic Text Fields

Nov 29, 2009

I'm making a simple program in Flash MX 2004 and I can't figure out if what I'm trying to do is possible.I have an animation of a card flipping over. It's a movie clip with a dynamic text field placed on it.It animates fine, but the text only shows up when the animation stops, not while it's moving.Is it possible to have a dynamic text field actually move with the animation? (rotate, resize, etc...)

View 3 Replies

ActionScript 3.0 :: Quick Time Movies Not Playing Audio

Nov 12, 2009

Using Flash CS3, Actionscript3.0, Player Version 9.0

My video player plays H.264 videos.

But some of my Quick Time movies are not playing audio. Only video is working.

View 1 Replies







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