ActionScript 3.0 :: Efficiently Adding A Loader Object To 2 Movieclips?

May 21, 2010

My code:

ActionScript Code:
var request:URLRequest = new URLRequest(XMLslides.item.thumbnail[i]);
var tloader:Loader = new Loader();[code].....

Works fine (it's in a for loop, ...after the main XML object is loaded)... but this:

ActionScript Code:
var request:URLRequest = new URLRequest(XMLslides.item.thumbnail[i]);
var tloader:Loader = new Loader();[code].....

Causes those thumbnails to be attached to the masked buttons, but not the new ones.Is there a way to do this without creating another loader object? I want to keep it efficient.

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Adding Loader Object Distorts Image

Nov 3, 2009

I've loaded an image with a loader, and if I add the loader to the stage, all is well, the image looks fine. Although if I add the loader inside a display object container, then the image gets distorted- and on top of that, trying to change the width and height once its in the container doesn't work either.

View 1 Replies

Adding Movieclips To Object Class?

Aug 25, 2010

I am building an image gallery which has a very simple design. The gallery has a button area, where the buttons are movieclips, and an area where there are images, which are also movieclips.I am using flash CS3, AS3.Each time I use an eventlistener to tween the alpha value of each image (the brightness) when the button movieclip is pressed, I must call a command to reduce the value of every OTHER image that is in my gallery as well as increase the alpha value of the single image I want.This means I have a lot of typing and I was wondering if there was an easier way to manage my movieclips, such as to use the Array class or the Object class. However I can not seem to on the subject on adding a movieclip instance name and its property to a class that could store the data, or the reasonable command to select/omit other movieclips

View 9 Replies

ActionScript 3.0 :: Way To Connect Loader Object Of Photo Object With EventRatio Object?

Mar 25, 2010

So I have this Photo class than handles loading a pic, and dispatches an event when the loading is done with:[code]which is simple and works, but now I'd like to make something more advanced. I'd like to dispatch the load ratio.So far I have extended the Event class, with my own EventRatio class, and I can put properties on that class. Which is cool, but I need something more dynamic than just sending a fixed value.So, what is the best way to connect the Loader object of the Photo object, with the EventRatio object?

View 5 Replies

ActionScript 3.0 :: Adding A Progress Bar To Loader?

Aug 19, 2010

I have a xml image gallery and I want to add a simple progress bar component from flash cs5 to the thumbs when they 1st load up in the carousel.

I understand about the progress bar and how it works and I have tried all day to insert the correct code into my project but I just can't seem to get it right. I dont want to use buttons for the progress bar as demonstrated by Republic of Code, I would just like the progress bars to load when thumbs are loading.

I have included below the progress bar AS3 code from the site "republic of code" which I have been learning from. Also below is the code from my xml gallery.
 
progress bar AS3 code
import fl.controls.ProgressBar;
import fl.controls.Button;

[Code].....

View 3 Replies

Swf :: Flash - Adding Movieclip Into Loader?

Feb 19, 2010

i have created a preloader for my swf file. I want to simply add an image onto the stage whilst another swf is loading. My image is saved in a movieclip called image in the library. How would i add it to the stage and make it stay there whilst it is being loaded. I have tried manually moving it onto the stage but it only stays for 1 frame.

import flash.display.*;
import flash.events.*;
import flash.text.*;

[code].....

View 3 Replies

Swf - Flash - Adding Movieclip Into Loader?

Aug 17, 2011

i have created a preloader for my swf file. I want to simply add an image onto the stage whilst another swf is loading. My image is saved in a movieclip called image in the library. How would i add it to the stage and make it stay there whilst it is being loaded. I have tried manually moving it onto the stage but it only stays for 1 frame.

import flash.display.*;
import flash.events.*;
import flash.text.*;

[code]....

View 1 Replies

ActionScript 3.0 :: Adding One Loader To Many DisplyObjectContainers

Jan 25, 2010

Is it possible to add the same Loader to many different DisplayObjectContainers?

I'm using a Loader instance to load an image which I would like to place in about 40 different Sprites. Using the addChild function the loader can only be added to one Sprite though. Is there any way around this or do I have to create 40 different loaders also?

Or is there a way to load an image straight into a Sprite without even using the Loader?

View 9 Replies

Professional :: Adding A Progressbar Components To A Loader?

Apr 2, 2007

im having trouble adding a progressbar components to a loader...all the images load and the progress bars too but the progress bars only change when they reach 100% and they do not disapper either..

View 2 Replies

ActionScript 3.0 :: Adding Background Image Using Loader ()

Feb 6, 2009

Am working on a simulation and am running into some trouble. I am attaching what I have so far. (I'm just in beginning stages so it's nothing fancy) What I still need to do is place the main image into the code using this code:

[Code]...

View 2 Replies

ActionScript 3.0 :: Adding A MouseEvent Listener To A Loader?

Jan 14, 2011

I'm loading .JPGs into loaders, setting the alpha of the loaders to .5 and would like to add a ROLL_OVER event to set the alpha to 1 then back to .5 on ROLL_OUT.Here's what I've got so far and it works well.
 
var ldr1:Loader=new Loader();var url1:URLRequest=new URLRequest("thumbs/1t.jpg");ldr1.contentLoaderInfo.addEventListener(Event.COMPLETE, done1);ldr1.load(url1);
function done1(event:Event):void{    event.target.content.alpha=.5;    event.target.content.x=currentX;   //currentX & Y are already set    event.target.content.y=currentY;    addChild(event.target.content);    currentX+=event.target.content.width;}
 
NOW, I'm trying to add the MouseEvent and can't figure out what to add the listener to - the loader or its content?
 
ldr1.addEventListener(MouseEvent.ROLL_OVER, rollOn); <<<<--- this doesn't work.
ldr1.contentLoaderInfo.addEventListener(MouseEvent.ROLL_OVER, rollOn); <<<<---this doesn't work either.

View 3 Replies

ActionScript 3.0 :: Adding - Removing Child For A UI Loader?

Nov 9, 2009

I have 4 separate photogalleries, they are all swfs called by buttons with UI loaders attached. The problem is when one is called the loader remains on the stage I need to be able to remove any loader on stage BEFORE calling another page weather its a photogallery or not.Easiest explanation is how I used to do it in AS2 example 2 btns /2 load separate swfs into level1 on each btn I would have

unLoadMovie(1)
LoadMovie (xxx.swf) 1

I need to do the same thing in AS3 Also, do I need to use separate loaders or can I use one loader and instance names? Below is the code I have now (btns are in two areas)

main timeline btns (all btns except photogallaries)
stop();
home_btn.addEventListener(MouseEvent.CLICK, onHomeClick);

[code]....

View 0 Replies

ActionScript 3.0 :: Add Loader As A Child To More The One MovieClips?

Apr 7, 2009

I would like to use the addChild method of more then one MovieClips with the same parameter, eg add the same loader to two or more MovieClips.

Code:
var loader:Loader = new Loader();
loader.load(new URLRequest("http://www.actionscript.org/forums/images/misc/navbits_start.gif"));

[Code]....

View 6 Replies

ActionScript 3.0 :: Flash 2 MovieClips One Loader?

Dec 11, 2010

I have a question about loading external swf.I have an swf that will be loaded into the main swf, and then moved into the movieclips

Code:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
function loaded(e:Event) {
holder = e.target.content;
Holder = e.target.content;
Play();
}

the code works fine but the problem is when I want to go to say frame 2 in "holder" the "Holder" also goes to frame to but "Holder" should stay on frame 1 I use to movieclips to be able to make nicer alpha transitions (tweens) but that wont work because the two movieclips mirror each order.

View 5 Replies

ActionScript 3.0 :: Adding A Pre Loader To An XML Photo Gallery Between The Photos?

Feb 15, 2010

I have made a photogallery in actionscript 3 which uses an .XML file to import pictures. As the user clicks on the displayed image the code loads the next image in the cycle into the display. Now, I would like to add a preloader which displays the loading progress of each image as the user clicks (otherwise there is just a blank area as the image loads). I have made a pre-loader for the main .SWF but I can't figure out how to make it work for the images or how to make a seperate one for the images. The fact is that I am a bit of a muppet when it comes to AS3, and am finding myself getting lost an confused quite easily.

I have attatched the .FLA if that helps any! If not then...

here is the link to the .HTML page that contains the .swf:

[Code]...

View 2 Replies

Actionscript 3 :: Adding A Border To A Flash.display.Loader?

Mar 22, 2011

I'm developing an ActionScript 3 app for Blackberry PlayBook.

I'm loading an image with flash.display.Loader.

I want to show that image with a 5px black border.

How can I do that?

View 2 Replies

Actionscript 3 :: Adding An External .swf Preloader When Using Null Loader?

Mar 24, 2012

I'm trying to make a navigation system for my website where each nav item is loaded as an external .swf. I was able to get that functionality in place. The problem is I want to add a preloader for these external swfs as well.

The code I'm working with is this:

var loadedSWF:Loader = null;
/**
* Loads an SWF and adds it to container once complete
* @param file The URL to the SWF to load

[Code].....

View 1 Replies

Actionscript 3 :: Turning Loader Content Into MovieClips?

Jul 3, 2011

So heres a loader that works:

public var loaders:Array = new Array();
public var loaderClip:Array = new Array();
function loadPersonmenu() {

[Code].....

The wierd thing is, my function fileCompleteListener() doesn't even referance any of these Loader instances or swfs, which is why I didn't include it in my code. This isn't a problem in the first conde

View 1 Replies

ActionScript 3.0 :: Adding Multiple Images To Stage Via The Loader Class?

Dec 28, 2009

I want to move my multiple externally loaded images a little each time they are added to the stage along the x axis via the Loader class. It all works - But HOW do I access the added graphic synatically, so i can change its x pos?! Ive tried picLoader.x ... but that's the Loader - NOT the image...??

Code:
private function setPics():void
{
for(var i:int = 0; i < xItems; i++)

[Code].....

View 2 Replies

Actionscript 3 :: Clear An Array Efficiently?

Feb 10, 2010

I've been looking to clear an array in ActionScript 3.[code]...

View 2 Replies

Php :: Handling Server Load Efficiently?

Feb 11, 2011

I am building a Flex application using Pure MVC pattern and Zend framework for calling php code on the server. I need to sync some data with my server which is using MySQL as the database. And there are 5 such tables I need to sync. So I call these php functions at regular intervals from Flex and use long polling on php side. The client side code for my subjects lies in 5 different proxies.

Should I send 5 separate requests from each proxy to call the php code which is lying in separate classes. Or should I build a separate proxy to send 1 request from 1 php file and then distribute this data among different proxies on the client side. Which one will be more effecient? Mathematics shows using separate proxies and php classes allow more number of users to be accomodated on the server.Can I write 1 SQL command to fetch data from all 5 tables given they cant be joined on any column?

View 1 Replies

ActionScript 3.0 :: How To Storing Bitmaps Efficiently

Feb 17, 2009

The game that I'm currently making has many bitmaps, for the sheets for various things. Is there a way that I can store these efficiently so my flash file is huge?

View 3 Replies

ActionScript 3.0 :: Reacting To Events Efficiently?

May 3, 2010

I have 9 movieclips in the stage. When I click a movieclip I load an image to it. The below code does this with one movieclip named o1. I feel stupid to just copypaste the code nine times for o1, o2, o3.. etc. What would be more efficient way of doing this?

Code:
import flash.events.EventDispatcher;
import flash.display.MovieClip;

[code]....

View 3 Replies

Professional :: Adding A Progress Loader To A Dynamic Text Field / ScrollPane

Apr 28, 2011

I have a dynamic text field which is loading images from an external html.  This text is named scrollPaneImage and is a child of a movieClip called scrollPaneContent.  I then load scrollPaneContent into a scroll pane named scrollPane
 
When the user interacts with my swf different images are loaded into scrollPaneImage. Since some of the images take a few seconds to load, I'd like there to be a progress loader displayed in the scrollpane.
 
I have tried adding the progress event listner to the dynamic text, the movie clip and the scrollpane and cannot get it to respond or track the loading.

scrollPaneContent.addEventListener(ProgressEvent.PROGRESS,reportProgress);
function reportProgress(e:ProgressEvent):void {
trace(e.bytesLoaded + " loaded out of " + e.bytesTotal);
trace("LOADED");
}

View 13 Replies

Professional :: How To Setup Authortime Sharing Efficiently

Jun 3, 2011

I have one fla with a lot of library symbols. At some time part of these symbols were copied to another fla, and updated. Rather than copying the modified symbols back to the original movie, I want to use authortime sharing. So I click on one symbol at a time in the original fla, click source, scroll to the other file in the file chooser, wait for the library to open, scroll to an identically named clip inside an identically named folder ....the source is shown as a full path - is there a way to make it relative (in fact the two fla files reside in the same folder)?

View 1 Replies

Flash :: Professional - New Dev Center Article On Using Pro Efficiently

Aug 30, 2011

Longtime Flash Pro, Flex, and AIR developer, Dmitriy Yukhanov, has written a new article for the Dev Center listing over 60 tips for efficient use of Flash Pro. Categories include: Improving performance Optimizing file size of project assets Developing Flash projects more elegantly Making project files easier to update Most of the tips are illustrated and quite easy to understand. This is one of the most comprehensive articles on this topic that I have seen.

View 1 Replies

IDE :: Adding MovieClips To MovieClip?

Apr 24, 2010

I'm trying to split my stage into 2 sections

- bubbleZone
- menuZone

so I have created 2 sections and turned them into movieClips. On the first bubbleZone movieClip I want to add multiple "bubble" movieClips which will only appear in the bubbleZone movieClip. See code below. However, the bubbles seem to be appearing all over the stage and are hidden by the bubbleZone movieClip. Is there anyway to make the bubbleZone movieclip pretty much just a background for catching events and then tying the individual bubbles to just the bubbleZone so they don't appear anywhere else on the stage?

var bubbleZone:BubbleZone = new BubbleZone();
bubbleZone.vx = 1;
bubbleZone.height = 600;
bubbleZone.width = 820.8;

[code]...

View 2 Replies

Flash :: Efficiently Splicing Items From An Array Using Flex?

Aug 14, 2009

I have overcome a problem, but my solution seems really inefficient and clunky. Please consider this problem:

I have an array collection with articles in.

This array collection is filtered to a currently selected article category. 

There is a cursor bound to a view that shows the current article. When a category is deleted I need to delete orphened articles, I can't use the cursor or collection without affecting the views as they are bound. 

[Code]...

View 2 Replies

ActionScript 3.0 :: Adding Movieclips Along A Path?

Mar 7, 2009

Is there a way to use an existing path drawn on the scene, as the basis for path made up by many movieclips that also follow the original curves "curveture"?I kind of want to make a "road" consisting of "yellow stickit notes" overlapping each other.I want to do this without manually having to draw each stick-it note, so I can easily change the curve without having to redraw the whole thing.

View 1 Replies

ActionScript 3.0 :: Adding Variables To MovieClips?

Jul 3, 2009

(Using AS3) I'm doing a simple grid layout of boxes (movieClips), i'm then trying to save their current position to each of the movieClips. So in AS2 i'd do something like ...

obj.origX = obj._x;
obj.origY = obj._y;

but it's saying; 1119: Access of possibly undefined property targetX through a reference with static type flash.displayisplayObject. How can i add custom variables to movieClips?

View 3 Replies







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