IDE :: Adding Loaded Asset To Display Hierarchy?

Apr 1, 2009

I have a class called Bike.as, linked to a movieClip in the library. The class essentially tweens a bike graphic across the stage. At the end of the tween, I instantiate a new class called Slideshow. Slideshow loads an image. The image loads(I get no loading error, and I can trace info about the loaded content)... I just can't seem to see it. In attempting to debug, I wrote the loading code(in Slideshow) into the Bike.as file(replaced the code that instantiates Slideshow), and it worked. Did it work because Bike is linked to a movieclip, and Slideshow is not(Slideshow is called in Bike.as)? I'm attempting to transition from AS2 to AS3. Here's my Slideshow class:

public class Slideshow extends Sprite {
private var container:Sprite;
private var loader:Loader;

[code].....

View 1 Replies


Similar Posts:


Flash - Rescale An Asset That's A Hierarchy Of Bitmaps?

Jan 25, 2012

I have some FLA/SWF assets which are hierarchies of bitmaps.They have timelines which page-flip through different bitmaps.I'd like to scale these assets down in pixel-size, including the bitmaps they're composed of.I'm not a Flash Animator, but the artist i'm working with doesn't know of an automated way to achieve this. ie, that it's a long a laborious manual process.Does anyone know of a tool which can simplify the re-scaling of bitmap-based FLAs ?

View 1 Replies

Flash :: Determine The Display Object Hierarchy An Event Will Capture/bubble Through?

Jun 7, 2011

In Actionscript 3 is there any way to determine the precise display object hierarchy an event will traverse through when dispatched from a given object? The object is not necessarily a display object.Although I could imagine this actually being useful somehow, in my particular case it is a learning exercise. I'm trying to master the event system in flash and have some locations where I'm very curious what path an event will take when I dispatch it.

View 2 Replies

ActionScript 2.0 :: Resizing A MC According To The Loaded Asset?

Jun 9, 2008

I have tried many things but when i load my external jpg inside a MC (thru the use of a MovieCliploader which then load the jpg inside that MC in an empty MC). I have put my code in the onLoadInit() and did something like

MC._width = target._width;

My MC has a specified width and height in the library. is it because of that or should i put it smaller.

View 1 Replies

ActionScript 3.0 :: Child-parent Relationship \ Adding Them All As Children Of The Stage And Creating A Parent-child Hierarchy Between Them?

Jun 6, 2011

i am slightly confused about the parent and child relationship. lets assume we have several different instances, what would be difference of adding them all as children of the stage and creating a parent-child hierarchy between them(other than the access path).

View 5 Replies

ActionScript 3.0 :: Access To An External Asset Of An External Asset

Jan 21, 2010

I have an externally loaded swf that contains thumbnail movieclips. When a thumbnail is clicked an external image is loaded. I would like to be able to reposition this external image. I know I can use typecasting to control a movieclip of the swf but how do I control nested externally loaded files? I have a different approach that should work fine but I was just curious about my initial attempt.

View 0 Replies

ActionScript 3.0 :: Preload Multiple - Load And Display The Percentage Loaded Of Total Bytes And Bytes Loaded Of All The Files

Jul 13, 2009

What I'm trying to do is get the total bytes of all the files I want to load and display the percentage loaded of total bytes and bytes loaded of all the files. Its a slideshow so i want all the files loaded and then it will play. I've looked at bulk-loader but it wasn't what I needed. The image are loaded from an xml file. I think I would need to create an Array and then find out the total bytes but I don't know how to reference the loader in the progress.

[Code]....

View 2 Replies

ActionScript 3.0 :: A Class Adding Itself To Display List?

Dec 14, 2009

What i'm trying to do is create an errorAlert class. The role of this class is to as you might expect display an alert:) So the current class is set up in such a way.
 
1. pass in an errorcode returned from the server into the constructor.
 
2. This runs through a switch and sets a msg variable to the right textual prompt based on the code. At this stage it also sets an alert type, so as an example it could be a severe alert where the user has no option other than ot refresh the browser. Or it is a softer alert where the user is able to press a close button and proceed.
 
Because all of the type handling and everything is held within the class. I want to avoid adding the instance to the display list within the main document class. Ideally just letting the class add itself to the stage AND IF it is a softer alert, it can show the close button, add an event listener, and, then remove itself.

View 3 Replies

ActionScript 3.0 :: Adding Image More Than Once To Display List

Dec 26, 2009

I load an png image and add it to the display list. Now I want to add this image more than once, like a pinball game there could be 3,4,5 balls, all with the same image. But I cant add the same image reference more than once to the display list, right? So should I make a copy of it? How can I copy it and add to the display list without needing to load it from file more than once?

View 3 Replies

ActionScript 3.0 :: Adding Single Image To Display List?

Mar 31, 2010

I have a single image I imported to the library of an Fla document. I could have easily imported it to the stage, but I chose the library instead. It is a .png file. It's name is ace_clubs.png. On import a symbol was created  by Flash and I deleted it. THE ONLY THING IN THE LIBRARY IS ace_clubs.png . I then right clicked on the the image and filled in for properties the following:

1. Export for ActionScript

2. Export in Frame 1

3. The class was by default named ace_clubs.png which I renamed to
my_images .

4. The base class by auto default is flash.display.BitmapData

So how do you get the image (ace_clubs.png) to display in the Flash movie at say
(0,0) ? Meaning in the ActionScript window what code is needed?

View 18 Replies

Flex :: Resize A SpriteAsset Without Adding It To The Display List?

Mar 31, 2010

I have an embedded image asset (with a scale9 grid), and I'm trying to get the bitmapdata when it's resized, but I can't seem to do this without adding it to the display list.

I try this:

spriteAsset.setActualSize(w,h);
spriteAsset.width = w;
bmd.draw(spriteAsset);

But when I then draw out the bitmapdata with graphics.beginBitmapFill(), I just get the original un-stretched image.

Or do I need to take 9 separate BitmapData images and make 9 separate bitmap fills?

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 2.0 :: Adding Points By Clicking And Display In TextBox?

Sep 9, 2009

Each time I click the "fold_btn" I need to be able to add 10 points and display it in a text box (rot1_txt).
Code:
on (press) {
_root.rot1_txt = 0;
_root.rot1_txt = _root.rot1_txt + 10;
}
Not working!

View 7 Replies

ActionScript 3.0 :: Adding And Removing Movieclip From The Display List?

May 9, 2011

why I cant kill a child in my display list. So I'm working on an ad that is going to load in different swfs depending on the link you click. What I wanted to happen is when the ad loads the first swf is auto loaded in to my container. Then when you click on the next link the new swf would cancel out the last one. What I am getting is an overlap of the swfs and I understand that. I can't figure out how to kill the other children. I tried unload and remove child but have been unsuccessful.

ActionScript Code:
import flash.events.MouseEvent;
import com.greensock.*;

[Cod]....

View 3 Replies

ActionScript 3.0 :: Adding TextField To Display Video Time Elapsed

Apr 4, 2011

How to add a dynamic text field to display the time elapsed and time remaining to play. I have been checking out the Adobe Live Doc but cannot search for what I need. Below is the code I have already that just shows the video and its controls.

Actionscript Code:
//the below script it on a button on click actionvideoholder.vidPlayer.source = "videos/Introducing our team.flv"//this code is in the same frame as my FLV holder called 'vidPlayer'import fl.video.*;// vidPlayer is the FLV holder//CustomVideoControls is the mc where the play, pause, mute buttons arevidPlayer.playPauseButton = customVideoControls.playpause;vidPlayer.seekBar = customVideoControls.seekvideo;vidPlayer.muteButton = customVideoControls.mutevideo;vidPlayer.fullScreenButton = customVideoControls.fullScreenButton;

View 2 Replies

ActionScript 3.0 :: Adding Buttons Via Display List Breaks This Function?

Jan 31, 2012

I'm trying to add the btns in array "but" via stageMc.addChild(section1), but instead of tracing "section1" I get "instance1", and of course stageMc wont advance. I guess what I'm asking, is whats the diff. from a functional standpoint if I embed the clips in flash, or embed them into the stageMc clip via the display list? what am I missing? FYI, this code works, so long as i place the assets on stage myself. But I want to add the btns via the display list, and i can add them, they just instanciate wrong?

[Code]...

View 0 Replies

ActionScript 3.0 :: Remove A Child Of The Display List If It Exists Before Adding Another To The Stage?

Mar 3, 2009

I'd like to remove a child of the display list if it exists before adding another to the stage. This gives me Error the first time I call it because 'myMC' doesn't exist.

HTML Code:
function callMc(){
if(myMc) removeChild(myMc);

[Code]....

View 5 Replies

ActionScript 3.0 :: Nav - Adding The Thumbnails To The Display Object Via An Array Based On An External XML File

Jan 30, 2009

I'm going to be building a site for a photographer and would like to be able to do something like the thumbnail navigation in this example: [URL] I'm assuming it's adding the thumbnails to the Display Object via an array based on an external XML file, and displaying them once their corresponding full-size images are loaded ... Perhaps it's building the nav simply by looking to see how many photos there are in a folder on the server (i.e. no discreet XML added for each shot). Not sure if this idea is even possible -- would like to hear from any of you if in fact it is.

View 0 Replies

ActionScript 3.0 :: Adding Reflection To Thumbnails Loaded From XML?

Feb 12, 2011

I have a .fla which loads thumb nails and when clicked shows the large image. It all works fine. I would like to have a reflection for each thumb how would I go about doing this, or how would amend my code to add the reflection.

Code:
var holder:thumbNail = new thumbNail();
var thumb:Loader;
var container:MovieClip = new MovieClip();

[code]...

View 3 Replies

ActionScript 3.0 :: Dynamically Adding Loaded Thumbs?

Dec 9, 2008

I'm trying to create a portfolio with ten images that I needto be loaded and added on the stage.The problem i not to load theese images or adding themdirectlyt on the stage, but I want them to be added inside a thumbthat I've created as a movieclip.I've also created a for...loop so the thumbs dynamically areadded on the stage. To access them I've given them an instance-nameusing [object].name = "[name]" and I've also created an Array tokeep track of the names.

View 1 Replies

ActionScript 2.0 :: Adding A Link To A Xml Loaded Image?

Apr 21, 2009

I've got a xml gallery. Now I want to add a link to a image but I don't know how to do this.This is my code:

portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;
timeline = this;

[code].....

View 3 Replies

ActionScript 1/2 :: Adding A Function Once A Scrollpane Has Loaded?

May 15, 2009

I have a scrollpane but need to put the scrollbar on the left. I've used the code:_root.scrollPane.vScroller._x = 0;This only works once the scrollpane has loaded. up a function/listener? I'm useless with listeners so I've tried on(complete) with no success.I've also heard an "added" event listener may be the answer, but I've not managed to succesfully set that up.

View 7 Replies

ActionScript 3.0 :: Adding Content To A Loaded Movie

Jun 10, 2011

I've got an application which loads anexternal swf, then needs to add content to a specific depth in it. It does this by finding a named placeholder clip and replacing it with a UIComponent, using addChildAt(); This seems to work fine - I have a trace utility that walks back up the display list and it shows my UIComponent right where I expect it, then the parent movie clip, then all the containers up to the stage. At each level the container is a) visible b) 1.0 alpha and c) the size I expect it to be, and from my trace I can see that I have a structure which looks something like this:[code]

All well and good, but if I draw a rectangle on the graphics of the UIComponent (or add an image to it, or do anything else), nothing is visible. I can trace any parameters of the UIComponent, I can use it to make changes to its parent SWF, I can even note that if I draw a rectangle on the UIComponent which is larger than the Loaded SWF, then the SWF changes size to accommodate the new bounds - but I can't see a thing.I was wondering if some security stopped the parent application adding content to the Loaded SWF, or if there was some other issue.

View 1 Replies

Actionscript 3 :: Adding Item To A Combobox In A Loaded Swf?

Jun 30, 2011

I've created a flash builder actionscript 3 project which loads an external swf which was created in flash cs5 which contains the combobox component.How do i dynamically add items to it?

mc1['itemList'].addItem({label:"test"});

View 1 Replies

ActionScript 2.0 :: Adding Border To Xml Loaded Images

Jan 14, 2009

I have a very simple scrolling image strip where the images are loaded via xml. I was wondering if there is a way to add a white border around the pics by way of actionscript. Here is the code that I have to load the images and make them scroll.

[Code]....

View 0 Replies

ActionScript 3.0 :: Adding Objects To Stage Before It Is Loaded?

Oct 20, 2009

I am using gaia with a fluid layout at here is what I get:
This is the error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.gaiaframework.FluidLayout::FluidObject/reposition()
at com.gaiaframework.FluidLayout::FluidObject()
at pages::MemberPage()

Here is my MemberPage code:
package pages{
import com.gaiaframework.templates.AbstractPage;
import com.gaiaframework.events.*;
import com.gaiaframework.debug.*;
import com.gaiaframework.api.*;
[Code] .....

Note there may be some extra classes and imports etc. I was trying a bunch of things. The full fluid layout tutorial I followed is here: [URL].

View 1 Replies

ActionScript 3.0 :: Adding Object To Externally Loaded SWF?

Jul 19, 2010

Is it possible to add Display Objects to an already loaded SWFs? I gave it a shot, by going "loader.content.addChild" but as I found out, content does not contain an addChild() method.

View 4 Replies

ActionScript 2.0 :: Adding A Link To A Xml Loaded Image

Aug 12, 2006

I've got a xml gallery. Now I want to add a link to a image but I don't know how to do this. This is my code:

portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;
timeline = this;

[Code]...

View 2 Replies

ActionScript 2.0 :: Adding Randomly Loaded Variables Together And More?

Feb 1, 2004

I'm struggling with a project. I'll try and describe it. 10 mc are loaded randomly with one of two ext.swf's. Each time you click/drag on one, 1 of 6 questions are randomly loaded from an array into a text box on the main timeline. I need to count and add up how many of each of the 2 ext.swf's have loaded and whether they have an x pos < or > 300. My first problem is: The question shows up in the text box when the mc is clicked/dragged but when I trace it, the question that shows in the output doesn't match the one that's loaded into the text box?The second problem is a big one. I need to be steered in the right direction as to keep track of what is where on stage. I only have a vague sense of how to go about it, and combining all the bits is too much.

1. I need to trace the question2. I need to say if the question is 'blah' do this3. The 'do this' is pretty complicated. I need to add up the #1 movies that have an x pos of <300 and the #1 movies that have an x pos of >300 and then do the same for the #0 movies. Then I need to compare a users input answer to the correct one!!! The question AS is in the external swf. [AS]stop();

// Questions Array
question = new Array(); {
question[0] = "How many hedgehogs are in the bed?";

[code]....

View 11 Replies

Actionscript 3 :: Loaded Swf Does Not Display?

Jul 21, 2010

I am trying to use the Loader class to load an swf animation. If I do addChild(ldr); the animation is displayed and perma-looped, but if I try it as below, the animation doesn't display.

public var ldr:Loader;
public var explosion:MovieClip;
public var req:URLRequest;

[code].....

View 1 Replies







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