ActionScript 3.0 :: Loader Class As Lame?

Sep 14, 2009

my application needs to load an swf into something that looks and acts like a video player. so you can scrub through the parts that are loaded and see the progress of the load. im not using any pre-fab video components, but to make it work i need to know which frames are loaded and i need to be able to skip to them.

1) to know how many frames are loaded (not bytes!) and
2) to be able to skip to a loaded frame before the movie finishes loading.

it seems to me that using the Loader class you can do neither. sure, you can check progress with bytesloaded (not useful to me) but you cant do ANYTHING to the swf, programmatically, until it is fully loaded! am i wrong about this?

[Code]...

if you look at the comments in the code above you see my problem. if i cant see which frames are loaded or skip to them before the movie is finished loading, the user has to wait until the movie is done loading before they can start no navigate and i can't show them a meaningful loading progress bar like they have on video players (bytes doesnt tell me how much "time" is loaded)

am i the only one who thinks its crazy that in flash, which is all about showing content quickly while it loads, you cant do anything with the swf until its complete? am i missing something or is this a real limitation?

View 7 Replies


Similar Posts:


ActionScript 3.0 :: Loader Class - Error 1061: "Call To A Possibly Undefined Method Load Through A Reference With Static Type Loader"

Oct 20, 2010

siteLoader.as, Line 23 1061: Call to a possibly undefined method load through a reference with static type Loader.

[Code]....

View 2 Replies

Flash :: Loader Class Problem Tracing The Swf (document Class)

Oct 12, 2010

I am using the Loader class to load 3 external swfs: sharedTopics.swf (does not have a document class) fonts.swf (document class is FontManager) main.swf (document class is Main) The same loader is used to load all 3 assets.

[Code]...

View 2 Replies

ActionScript 3.0 :: Using The Loader Class?

Mar 24, 2010

I have created a drop menu, with a nice little transparency. I have also set up the buttons to link to other SWF files and load them into a loader on the page. My problem is that the loader sits above the drop menus, so when you go to click on the menus they drop down behind the loader and you can't see them. Is there away of sending the loader to the back of the flash work? Maybe using a sprite, not that I have had much experience with sprites.

var my_loader:Loader = new Loader();
my_loader.x = 10;
my_loader.y = 40;

[code]....

View 3 Replies

ActionScript 3.0 :: Loader Class + As A Package

Jan 9, 2011

I wanted to design a [relatively] all purpose class to load images and SWF's with a preloader MC and error handler. I made this BUT, when I load the MC I cannot control it. i.e. I load an SWF containing an animated GIF, but I cannot say mc.gotoAndStop();

[Code]...

View 1 Replies

ActionScript 3.0 :: How To Get Loader Class From ProgressEvent

Jan 2, 2011

How can I get Loader class from Progress event.
function loadMovies () {
var ldr:Loader=new Loader()
ldr.load(new URLRequest("test.swf"))
ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,getper)
addChild(ldr)}
function getper (event) {
var info:LoaderInfo=LoaderInfo(event.target)
trace(info.loader)
}loadMovies()

View 4 Replies

ActionScript 2.0 :: Memory Leak In The New Loader Class?

Aug 3, 2006

I am making an application where I load a picture from the web at a rate of once per second. When I load a new picture I unload the old one the problem is that the old pictures are never completely erased from memory and the application keeps on consuming more and more memory until I'm guessing it eats all the memory in the cache (I haven't run it for that long yet :))

here is the code: what this does is load a picture when you click the screen, then unloads it when you click the picture. do it a few times and notice that the numbers (which show System.totalMemory) only go up but never go down to their original amount...

Code:

var url:String = "http://www.memorycity.com/shop/MBB/images/GIGABYTE_memory.jpg";
stage.addEventListener(MouseEvent.CLICK,onclick)
var txt:TextField = new TextField()

[code]....

View 1 Replies

ActionScript 3.0 :: Load External Swf Using Loader Class?

Apr 25, 2009

I have a flash rotating banner script that I purchased, and wish to incorporate into my homepage. Instead of creating a page with HTML and adding the banner code as a separate object on the page, I wish to load it as an external swf into a movieclip on my stage. This is what the banner looks like:

[URL]

I have a page that I'm redesigning, it's located at:

[URL]

I have a movieclip named load_banner. Inside the movieclip in its own frame, I put in the following code:

Code:
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;

[Code]....

However when I test it, the images load off to the right hand side of the screen, not centered in the movie clip like I want...

View 11 Replies

ActionScript 3.0 :: Loading Image Using Loader Class

Jan 17, 2010

I'm trying to load images using the loader class but it doesn't seem to ever trigger the complete event (in this case anyway). The images are only 16x16px images from the local machine, so it should take no time at all to load. I use the totalImages variable as a counter; as an image is loaded, it subtracts 1 from it. Once it is 0, all images are loaded. I can create an instance and it goes as far as tracing "Begin loading images", but that's it. No errors in the console either.

PHP Code:
package lib{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Loader;
import flash.geom.Rectangle;
import flash.net.URLRequest;
import flash.events.Event;
public class Frame extends Bitmap{
[Code] .....

View 2 Replies

ActionScript 3.0 :: Loader Class - Two SWF Files (One Loading Another)

Feb 2, 2010

I'm working with Loader class in as3 and there comes some really strange problem. I have two swf files, one loading the other. In the first one, I have codes like this:

var loader:Loader=new Loader();
var context:LoaderContext=new LoaderContext();
context.applicationDomain=ApplicationDomain.curren tDomain;
var req:URLRequest=new URLRequest("Untitled-1.swf");
loader.load(req);
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE,onCPL);
function onCPL(e):void{
trace("finish");
addChild(e.currentTarget.content);
}

And the second one, with the name "Untitled-1.swf", doesn't seem to work in the first one. I find out that as long as there are ANY codes in the second swf file, the first one will repeat tracing "finish" endlessly.

View 1 Replies

ActionScript 3.0 :: Loader Class - How To Add Custom Preloader

Feb 11, 2011

I have a loader which loads on a MouseEvent.Click. It uses this for multiple swfs
Actionscript Code:
myLoader.load(new URLRequest(event.target.name + ".swf"));
How can I add a custom preloader to this?

View 5 Replies

ActionScript 3.0 :: Scaling Loader Class Content?

May 27, 2009

I have a "master" SWF file into which I load content (other SWFs) via the Loader Class (with code below).
var contentLoader:Loader = new Loader();this.contentContainer.addChild(contentLoader);I load the content (these other SWFs) into a MovieClip container on the stage called "contentContainer". The "contentContainer" is much smaller than the "master" SWFs stage and also much smaller than the original size of the SWFs that the Loader is loading in. Also, and this is very important, the "contentContainer" itself is sized -- not scaled -- (see code) and placed on the stage depending on how large the stage is scaled (I am trying to make one of those "liquid stage" flash sites that fills the browser window with flash content regardless of window size).//this resides in a function that is called whenever the stage RESIZE Event is fired

[Code]...

View 3 Replies

ActionScript 3.0 :: Get Loader Class From Progress Event?

Jan 1, 2011

I was Load test.swf file threw Loader class. How to get Loader class from ProgressEvent, IOErrorEvent .

[Code]....

View 5 Replies

ActionScript 3.0 :: Load Image Using The Loader Class?

Jun 16, 2011

I'm trying to load an image in a movieclip using using the following:

Load_image_btn.addEventListener(MouseEvent.CLICK,Load_image);
function Load_image(event:MouseEvent):void{  var my_loader:Loader = new Loader();  my_loader.load(new URLRequest("C:UsersAmandaDesktoppicture1"));  addChild(my_loader);}

[code].....

View 26 Replies

Flash - Parameter To Swf Loaded With Loader Class

Apr 15, 2010

im loading a child swf into my parent swf and I want to pass some parameters to the child swf.

Here is my code:

var req:URLRequest = new URLRequest( "test.swf" );
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener( Event.COMPLETE, loadComplete );
loader.load(req);

[Code]....

View 1 Replies

Actionscript 3 :: Return Loader Object As Class?

May 16, 2011

I have to implement a menu with icons using actionscript only. I create a data provider from XML and set

menu = Menu.createMenu(null, dataArray, true);
menu.iconFunction = iconFunction;

Till here everything is fine and my menu is presented, but only with labels.
I create iconFunction as following:

private function iconFunction(item:Object):Class
{
var st:Loader = new Loader();
st.load(new URLRequest(item.icon));
return ?;
}

how do I return my loader object as Class?

View 2 Replies

ActionScript 3.0 :: Access Loader Object From Class?

Jul 27, 2009

I created a button class with a method that will allow me to control an external SWF. However, the loader for the SWF is created on my main timeline. Is it possible to access the loader object from within my button class?No matter what I try I either get an error that the variable is not defined (rightfully so because I haven't defined it in the class, it's defined on the main timeline) or that the object is null (when I declare the loader from within the class, which I know is wrong as well)

View 4 Replies

ActionScript 3.0 :: Loader Info In Custom Class?

Nov 10, 2009

I'm trying to use a custom class to create a mosaic type of gallery, and load jpegs in which some may have different dimensions. I'm using the Loader Class and I can get the content width value of the jpegs I'm loading, but I'm having trouble adding that value to the property of the (custom) object. Here is the Class:

package {
import flash.display.*;
import flash.events.*;

[code].....

View 0 Replies

ActionScript 3.0 :: Created A Loader Class FileLoader?

Nov 30, 2009

Basically, i have created a Loader class fileLoader.as into which i pass URL of the image to load from my main class and on load complete i dispatch an event from fileLoader.as class which i listen to and respond in my main application class by displaying it on the stage.All this works fine.If i go and click next button 10x, then 10 images will be loaded and displayed. However, my question now is, if i click back button to image 9, it starts loading the image again.So my question is how can i save or reference images that i have loaded already so that i can just call on them within the main application when needed and not start loading again? Can i load these images in an object or an array or just their reference?

View 0 Replies

ActionScript 3.0 :: Creating A Custom Loader Class?

Aug 24, 2010

I've been trying to create a simple loader class that loads an image file onto the stage.

Writing the code to perform the task is simple via the main timeline:

Code:
var picloader:Loader
picloader = new Loader()
picloader.load(new URLRequest("photo/1.jpg"))

[Code]....

How should I write the class such that it performs this function? Ideally I would like to specify the file I want to load eg. loadimage("photo/1.jpg") when I run the method.

View 3 Replies

ActionScript 3.0 :: Resizing An Image From The Loader Class?

Oct 14, 2010

I'm trying to resize a .jpg file that I'm loading in the loader class, and I can't get it to work. Here's the code I'm working with. (Note: I had to cut the URL to the jpg out because the forum blocks me from posting URLs with images!)

ActionScript Code:
getURL = new URLRequest("*URL to a jpg goes here*");
// Load slide image from URL

[code].....

View 2 Replies

ActionScript 3.0 :: Access Loader Class From ProgressEvent?

Jan 2, 2011

How can I access Loader class from Progress event.

[Code]...

View 1 Replies

ActionScript 3.0 :: XML Gallery Using Greensock Loader Class?

Jun 28, 2011

I am finding my way with AS3 but am having difficulty with a gallery project I am trying to put together based on the sample slideshow available on this site.

The problem relates to reading the thumb and image paths in the xml file. The error that is coming back is:

Loading error on ImageLoader 'loader1' (assets/thumbs/): Error #2035: URL Not Found. URL: file:///C|/Documents%20and%20Settings/Alistair.HOME/Desktop/AB%20gallery%20proj/assets/thumbs/

[Code].....

View 1 Replies

ActionScript 3.0 :: Getting Preloader Working Using The Loader Class

Feb 4, 2008

I'm having trouble getting my preloader working using the Loader class, here's the code so far...

[Code]...

View 5 Replies

IDE :: Loader Class Working In Flash, But Not In Browser?

Sep 21, 2009

I'm running into a problem loading an external swf. Check it out here: [URL]

If it's working right, the top and bottom red areas should end up looking exactly the same.

I have "init.swf" loading "cc_home.swf" into a container. When successful, it should fade up (that animation is in "init.swf") and then load the white text (cc_home.swf). What you're seeing on that page is init.swf on top, and cc_home.swf down below.

When I test init.swf directly from Flash, it works fine. In the browser, though, it doesn't load the movie.

Here's the code I'm using in "init.swf" to load cc_home.swf (which I got from Kirupa):

var mycontainer:MovieClip;
var myloader:Loader = new Loader();
var urlrequest:URLRequest = new URLRequest("cc_home.swf")
myloader.load(urlrequest);

[Code]....

View 1 Replies

ActionScript 3.0 :: XML Gallery Sorting With Loader Class?

Sep 26, 2009

I'm reasonably new to AS3 having made the leap from Flash 8 to CS4 in a single bound. I've been doing okay, but I've stumbled across a bit of an issue:I'm using an XML file to load a gallery of images and information, where a node typically looks like this:

PHP Code:

 <project>  <image>1.jpg</image>   <link>gallery-1</link> - <title>- <![CDATA[ This is image number 1]]>   </title>- <info>- <![CDATA[ Lorem ipsum dolor sit amet, consectetaur adipisicing elit. ]]>   </info>  </project>- <project> 

In AS, once my XML has been parsed, it runs this function:

[AS]
var projectTitles:Array = new Array();
function createProjectClips(list:XMLList):void {

[code]....

This all works fine; I need all of these thumbs loaded and parsed at the same time to show the full gallery. The issue is that, as the images are of varying file sizes they don't load in sequence, and because I can't pass additional parameters through the eventListener, I've apparently got no way to organise the images on screen. So, my images on screen might be in the sequence 1.jpg, 4.jpg, 3.jpg, 2.jpg, but my projectTitles array will say Image 1, Image 2, Image 3, Image 4.

View 6 Replies

ActionScript 3.0 :: No Support For HTML Loader Class

Dec 30, 2010

I was originally writing my code in flash AS3 then I found out AS3 do not support the HTMLLoader class... so I publish my code in Adobe AIR. And my code run perfectly fine when I ctrl+Enter in CS4... but when I run the exported .swf file... it just fail when I click on the buttons that associated with HTMLLoader class. Why it is not working when I play the .swf but it works when I ctrl+enter it in cs4?

Here's the error:
VerifyError: Error #1014: Class flash.html::HTMLLoader could not be found.
I did import flash.html.HTMLLoader;

View 5 Replies

ActionScript 3.0 :: Loader Class - Best Solution For Communication Between SWFs?

Mar 18, 2009

I want to ' import ' or ' download ' some SWF file into my main-swf file. I then want them to do a lot of communication back and forth. The best would be if I could just call functions from the new SWF file from my main-swf file, or the other way around. Do I use the loader class? And do I use the .parent.parent thing? Or is there a better solution?

View 3 Replies

ActionScript 3.0 :: Load A Movieclip From The Library Using The Loader Class?

Sep 17, 2009

I just want to ask if is it possible to load a movieclip from the library using the Loader class together with the URLRequest and then use gotoAndPlay method?

View 1 Replies

ActionScript 3.0 :: Loading A Compiled Flex Swf With Loader Class

Dec 25, 2008

I'm not sure whether to post this in a flex forum or here,but since the error is generated from AS3 code, I'll try it here.When I try to load a compiled flex swf with the loader class.As a test I tried 2 very basic programs:See the actionscript code in the attached code..As you can see I just load the swf without doing anything.I've found very few threads about this error, and even less solutions...Does anyone know if it's even possible to load a Flex swf?

View 8 Replies







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