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


Similar Posts:


Browser Link To Specific Section Of Flash Site?

Nov 12, 2009

I was wondering how can I make my links in Flash readable for browsers? In other words, to be able to provide link to specific section of my website. For illustration, take a look at Jenson Button's website:The link above points to the "News" section, although the site is in flash.

View 2 Replies

ActionScript 2.0 :: Navigate To The Health+science Section On Each Site?

Jan 24, 2008

[URL].. If you navigate to the health+science section on each site, you'll notice in the dev, the XML displays properly. If you check it out in the first one (not dev) you'll notice a break or two between each line.

The swfs and XML are identical. Anyone know of a reason why it would change like that?

View 3 Replies

ActionScript 2.0 :: Unload Movie When Moving To Different Section Of Site?

Nov 26, 2004

On my site I have 5 buttons for navagation along the top, when you go to the Photos section there is a button that appears on stage and, when clicked, loads an external swf onto the stage, no problems so far.If I or the user clicks this button to load this external swf onto the stage and then clicks one of the other navagation buttons to go to a different section of the site, that external swf doesn't disappear.

View 1 Replies

ActionScript 2.0 :: Interesting Site Layout - Flip The Page To Get To The Next Section?

Sep 24, 2003

I was recently given the task of creating the webpage for my school's physics department. I want to recreate a textbook where you would actually have to flip the page to get to the next section. While searching the net, I found exactly what I was looking for.

link

How on earth can I recreate that effect? I know it has somethning to do with rotations and dragging a mask with the mouse but how?

View 3 Replies

ActionScript 3.0 :: Flash - Navigation Buttons That Scroll To A Certain Section In A Site?

Feb 2, 2011

I have a feeling I will be a frequent visitor.creating a site for a client. The entire site will be in AS3, we're doing one long page with navigation that will always sit in a box to the left. When you click on a button in the nav, we want the site to scroll down to a certain section.

View 2 Replies

Professional :: Jump Out Of UI Loader Image To A Labeled Section Of The Main Site?

Aug 25, 2010

I have my entire site layout in Flash CS4 and using AS3. I was able to successfully segment the site with labels, add UI Loaders to desired sections to make the site smaller and work faster, I was able to put a close button above the UI Loader, which closes it and brings a user back to a designated section of the site.

And then I encountered a problem. I have a few images in each UI Loader which I would like to function as buttons and also bring the user to the desired section on the main site, however it seems to be a problem that the buttons are located inside the UI Loader I can not figure out how to jump out of the loader to the main site.
 
Is there a specific code for it or the whole layout has to be somehow restructured?

View 10 Replies

ActionScript 3.0 :: Swfaddress Navigation - Disable The Menu Until New Section Of Our Site Gets Animation

Sep 26, 2010

now we all used to disable the menu until new section of our site gets animation but how do you handle user repeatedly abusing for example back button on the browser when moving though your website?

View 1 Replies

ActionScript 2.0 :: Create A Section For A Site Where Mousing Over A Button Will Play A Certain Frame Of A Movie Clip?

Dec 10, 2009

Flash CS4/Actionscript 3 I am trying to create a section for a site where mousing over a button will play a certain frame of a movie clip, which is sitting next to the button. Mousing over different buttons will play (and stop) different frames in the movie clip.

View 1 Replies

ActionScript 3.0 :: Load External SWFs, AddChild(Loader) Versus AddChild(Loader.content), Etc?

Jul 29, 2009

I have a main "shell" swf which, by clicking several buttons, will load/unload various external swfs into a Placeholder_mc which resides on the main timeline in Shell.swf In the documentation and tutorials I've seen a couple different methods, and I'm not sure I quite understand the difference, or at least the reason you would use one over the other...In the 1st method, you can just add the Loader object using the addChild() method:

Code:

var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);
Placeholder_mc.addChild(myLoader);

This will apparently add myLoader to the display list once it has completely loaded.The 2nd method, you supposedly can add the Loader.content; however, it appears you can only do this once the content has completed loading, so you need to incorporate an event handler with the contentLoaderInfo object:

Code:

var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);

[code]....

What are the pros/cons of adding the entire Loader object, as opposed to the Loader.content and vice versa?

View 7 Replies

ActionScript 2.0 :: Play A Section On The Timeline And Then Move Onto Another Section Or Scene

Mar 9, 2009

I have a button that I would like to use with the basic actionscript as follows:

on (release) {
this.gotoAndPlay("15");
}

What I would like it to do is play a section on the timeline and then move onto another section or scene.

[Code]....

I know this is incorrect, so would anyone know how to write an actionscript button that plays a section then goes somewhere else?

View 4 Replies

ActionScript 2.0 :: OnLoad Function Not Running Within Section SWF

Feb 9, 2004

I have 2 swf's:
Section.swf (to be loaded in main)
Main.swf

In section.swf, on the first frame I have this:
[AS]
onLoad = function(){
// start doing stuff
}[/AS]

When I run the section.swf on its own, the onload function works, and the "doing stuff" code runs. But when I load it into main, this onload (within the section.swf, above) does not run!

View 7 Replies

Load The Music For A Particular Section Using Streaming Audio?

May 13, 2009

Im making a website in flash 8 pro and would like to know how i can load the music for a particular section using streaming audio. I mean i dont want the soundtracks to occupy to much space so i want to make the website load in and then if someone clicked and navigated into contacts then i want the contacts soudntrack to load only then or preferably stream from a folder.

View 4 Replies

ActionScript 2.0 :: Load External Swf Files Into The Middle Section?

Sep 30, 2003

i have a movie and want to load external swf files into the middle section. my navigation allows users to access from 10 buttons. i can load the swfs either thru createEmptyMovieClip, or loadmovieNum. but i can't seem to control the levels. that is previous movies can be seen underneath the new loaded movie... i need to clear previous movie clip before loading the next, here is createEmptyMovieClip code.

this.createEmptyMovieClip("generic_mc",2);
generic_mc.x=0;
generic_mc.y=62;

[Code].....

View 6 Replies

ActionScript 2.0 :: What Is The Word 'section' In _root.section

Dec 17, 2003

on [URL] what is the word 'section' in _root.section? I assume it is a movie clip instance, but can't seem to find it on the timeline.

View 2 Replies

ActionScript 2.0 :: ANOTHER Image Resize - Put The 'this.onEnterFrame' Section Just Before The ResizePic Function Is Called

Mar 2, 2006

I've followed the tuts on the site and written||cut'n'paste a few bits together that resize my picture to the border's size.

[Code]...

First; this code didn't work properly until I put the 'this.onEnterFrame' section just before the resizePic function is called. Why? Second; I've noticed a lot of times 'onEnterFrame' is called, its deleted again further down the code. Should I be doing so in this case? Why is it normally deleted? Memory managent?

View 2 Replies

Use A Variable And Then AddChild With A RemoveChild For The Old MovieClip After The New MovieClip Has Loaded

Mar 30, 2009

This is something I'm experimenting with, but haven't seemed to figure out... I have several MovieClips, basically the same, only different colors. As each one plays, I'd like it to "overlap" whichever one is already there. Right now I have each button linked to a gotoAndPlay function, but I don't think that will ever get me what I want. You can see how I have it now here: [URL]

Instead of having the content MovieClip go back to all white when a button is clicked, I'd like the preivious one to remain, and get "covered up" by the new one. You continue to see the old color, and the new color overlaps it. I have a feeling I need to use a variable and then addChild, with a removeChild for the old MovieClip after the new MovieClip has loaded, but I'm not getting any good results yet.

View 1 Replies

ActionScript 3.0 :: Event.currentTarget - Use One Function For All Buttons - Load Another MovieClip In Library

Dec 7, 2009

I have a movieClip in my library that I am loading into a scrollPane. When I click on the scrollPane I want to know the name of the target I am clicking on. I am trying event.currentTarget but all that I get in the output box is ObjectMovieClip. I want to use one function for all my buttons so when I click on them it loads another movieClip in my library. I realize I could make 3 separate functions, but I'ld like to use just one.

[Code]....

View 13 Replies

ActionScript 3.0 :: Can't AddChild To Movieclip Inside Movieclip

Jul 13, 2010

my_mediafile.load(new URLRequest("PMP2.jpg"));
//trace ("my_mediafile "+my_mediafile);
trace(mc_pmp.gfx_pmp)
mc_pmp.addChild(my_mediafile);

i have a movie clip(called gfx_pmp) inside of my movieclip (called mc_pmp) and i wanted to add a child to that movieclip gfx_pmp

thought i could use this code

mc_pmp.gfx_pmp.addChild(my_mediafile)

but it doesn't seem to work. when i ran a trace on mc_pmp.gfx_pmp it returned null as a value

trace(mc_pmp.gfx_pmp)
//returns null

i dont see what the issue is here, or why the trace on that is returning null

[object mc_pmp_43]
1st trace gfx_pmp [object MovieClip]
2ndtrace gfx_pmp [object MovieClip]

[Code]....

View 2 Replies

ActionScript 3.0 :: Make The Site Load Faster Is To Load In Swf's Externally

Mar 16, 2011

I'm pretty new/bad at actionscript (3) for web. I have a site up for a client/friend [URL], but it takes FOREVER to load. I'm under the impression that a good way to make the site load faster is to load in swf's externally. Right now, the site, in its entirety, is one big movieclip. I have large images (movieclips) for background images. If you look at the site and are kind enough to wait for it to load (aprox. 45 seconds or so) you will notice how the background image changes when you click to go to each section.

I am trying to find a way to load in the background as external .swf's to cut down on the initial load time. I'm also open to any other ideas. Below is the as3 code for my buttons/how they direct the site. I'm hoping to use a similar/generic style to load the background images. I'm hoping to load the movieclips underneath the rest of the site, and use the same naming scheme (e.g. homeBTN.swf) to keep it organized.

[Code]...

View 3 Replies

ActionScript 3.0 :: AddChild Is Not A Function?

Aug 4, 2010

There's not really much to say. I'll jsut post a code and hope somebody get an idea of what's wrong with that.

ActionScript Code:
private function selectPeon(e:MouseEvent):void
{

[code].....

View 3 Replies

ActionScript 3.0 :: Populate AddChild In A Function?

Jul 19, 2009

I would like to create a function that adds a child to whatever mc i choose like this where targetMc is the mc that i want the child (libraryMc) to be added to

PHP Code:

functionName(targetMc,libraryMc);

so right now my function looks like this

PHP Code:

function functionName(targetMc:MovieClip,libraryMc:MovieClip):void
{
var libContent:libraryMc = new libraryMc();
targetMc.addChild(libContent);
}

i know this is wrong as new libraryMc() is also being replaced with the libraryMc:MovieClip and that is probably why it's not working.

View 5 Replies

ActionScript 3.0 :: AddChild Function In Another Class?

May 13, 2011

I am trying to pull a funtion that adds a child to a container. This function gets pulled in another class. All the traces do work by the child doesn't show.

pulling the function from StickerBook_Class
---------------------------------------------------------------------- -----
public static var stickBook_Class:StickerBook_Class = new StickerBook_Class  ;

[code].....

View 2 Replies

ActionScript 3.0 :: AddChild() Is Not A Function Error?

Jul 8, 2011

I think maybe I need to import something else? because I am getting the following error.TypeError: Error #1006: addChild is not a function.at Function/<anonymous>

Code:
package
{

[code].....

View 3 Replies

Actionscript 3.0 :: Static Function And AddChild?

Jul 30, 2009

I have some problems working with "static function"For example:

Code: Select all   public static var someText:TextField = new TextField(); 
public static var FORMAT:TextFormat = new TextFormat("Arial", 12, 0x000000);
public static function myText():void

[code].....

View 8 Replies

ActionScript 3.0 :: Attaching A Function To Every AddChild() Object?

Mar 7, 2009

Code:
var rockSpawn:rock;
function doCollision():void
{
trace("collision detected at "+collisionLoc+", Time: "+flash.utils.getTimer());
rockSpawn = new rock;

[code]....

This function spawns a rock object from the library at a given location, and then moves it to the right every frame until it reaches the edge of the screen, at which point it's deleted. The problem: when a rock is spawned, it moves to the right, but when a new rock is spawned, the previous one stops dead. Each rock moves progressively faster, as if each rockSpawn.x++ is stacking to make the object move 1 pixel faster each time the function is called.

How would I modify this code to spawn separate instances of a projectile that behave the same? Also, how would I reference them for say, collision detection? That is:

Code:
if (a rockSpawn instance collides with the movieClip ship)
{
do stuff;
}

View 1 Replies

ActionScript 3.0 :: Stage.addChild In Static Function?

Aug 13, 2007

Does anyone know how to addChild(aMovieClip) to stage by using a static function, like:

public static var player
public static function LoadPlayer()
{
GameEngine.player = new Player
stage.addChild(player)
}

(Or better yet tell me how to run functions in different class without creating instances of them or using static function )

View 8 Replies

Actionscript 3 :: Image Load With Site Load?

Jan 2, 2012

I make simple site but I have a little trouble with loading images. As you can see with new category there is new image. There is a problem, beacause only then img is loading, and I want to load all images when my site is loading. sample code how I operate with those img.

imgUrls.push("img/01.jpg");
imgUrls.push("img/02.jpg");
var k3:Boolean=false;

[Code]....

How can I load all img with site.?

View 1 Replies

Actionscript 3 :: Remove All Instances Called By AddChild Function?

Mar 30, 2011

Short multiple instances of a MovieClip are created and I need them all to be removed at the same time when a if statement is executed. [code]...

View 2 Replies

ActionScript 3.0 :: AddChild MovieClip Within MovieClip

Dec 21, 2010

On my stage I have a movie clip called 'm1'. I also have a variable 'i' which is equal to 1. if I load in a bitmap (called 'bmp') and then use: this["m"+i].addChild(bmp) it attaches the bitmap to the movie clip - no problem. However, if I have a second movie clip WITHIN 'm1' (let's say this second movie clip is called 'mm1') - I can't figure out how to dynamically attach the bitmap to the second movie clip. this["m"+i].this["mm"+1].addChild(bmp) doesn't work....

View 1 Replies







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