Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash


Advertisements:










ActionScript 3.0 :: Use Loop To Add External Images To Existing MovieClips?


I have a file with existing MovieClips on the stage that I want to add Loaders to that will call external .jpgs from an XML file. I have the code working, but currently I have to add the Loaders one by one to the MovieClips. I'm sure there's a way to do this more easily by using a Loop, but I can't seem to get it to work no matter what I've tried.

I also want to be able to call a larger version of the image by clicking on the MovieClip/thumbnail. I've got the code working just fine, but when I tried to add a preloader to the full size image Loader, I got an error: Error #1009: Cannot access a property or method of a null object reference. Flash indicates this is happening at the callFull function so its definitely an error with my preloader code. [code]...


View 4 Replies (Posted: May 29th, 2010)

Sponsored Links:

Related Forum Messages For Flash category:
IDE :: Loading External Images Dynamically - Into Different Movieclips?
I have a website which needs to load 3 external images into 3 movieclips when the page loads. The page gets the URLs for the 3 images from an XML document, ie.

<imgurl>graphics/panda.jpg</imgurl>
<imgurl>graphics/panda2.jpg</imgurl>
<imgurl>graphics/panda3.jpg</imgurl>

[code].....

Posted: October 11th, 2009

View 3 Replies!   View Related
Flash :: AS3 - Load In External Images In A Loop?
I'm making a highscore table in flash using AS3, I have successfully got working code that displays the names and the scores but also part of my high score table it needs to display the users country flag. The images for the flags are stored on a remote server.

Now I know how to load in a single image and add it to my movie clip but things get very complicated when I want to load in 20+ by iterating through a loop. I've looked at many examples and just cant adopt the sample code to work for me. Anyway without a further a do here is what I have so far.

[Code]....

Posted: Nov 3 10 at 20:50

View 1 Replies!   View Related
ActionScript 3.0 :: Loading External Images But Need A Way To Loop That Allow The Load?
I 'm checking to see if an image file exist but I don't think the code checks but the last iteration in the loop. Here's my code:

[Code]....

fix this or if you know a better way to check if an image file exist could you let me know.

Posted: March 2nd, 2012

View 1 Replies!   View Related
ActionScript 3.0 :: Flash For Loop Loading Multiple Images Into Multiple Movieclips
[Code].....

I have a group of 16 images that I would like to load 1 of each into each movieclip. I want image1 to be inside of visual1, image 2 inside of visual2, and so on. the images are named like, 1960s_(1).png where the 1960 (year) part is coming from the rangeNum variable. The above gives me this error: 1061: Call to a possibly undefined method addChild through a reference with static type int.

Posted: February 5th, 2012

View 4 Replies!   View Related
MX04 Loop A Pre-existing FLV?
I have been asked to loop an existing FLV file that someone else created. I do not know what version of Flash was used to create this file, however I do have an older version 7.2 Flash MX Pro. Currently the FLV starts automatically and stops and the end of the movie. The owner of the site would like the movie to start over with a continuous loop. I'm pretty much of a rookie with Flash and with HTML5 coming out soon, I don't think I'll get a chance to become a pro at this.

Posted: 07-22-2010, 04:14 PM

View 5 Replies!   View Related
ActionScript 3.0 :: Remove All Existing Movieclips From A Sprite?
I have a sprite

Code:
var holder:Sprite = new Sprite();
I then add lots of thumbnails into this sprite from a loop

[code].....

Posted: 01-16-2009, 05:11 PM

View 9 Replies!   View Related
ActionScript 3.0 :: Adding XML Data To Already Existing MovieClips?
I'm trying to redo my App and have everything added dynamicly, so updating will be a lot easier. I have 3 movieClips in my library. 1 is the holder of the other two. This is done because the holder has a class attached to it, and the 2 other movieClips are where the content is being added.

So basicly what I have now is via XMLList and a for loop the content is placed and displayed on the stage. They are added like this:

PHP Code:

varmyXMLLoader:URLLoader=newURLLoader();
myXMLLoader.load(newURLRequest("Avalist.xml"));
myXMLLoader.addEventListener(Event.COMPLETE,processXML);

[Code]....

Now what I'm trying to do is add the same amount of content, but different images to the flipHolders that already exist right now but then the sideB in stead of sideA.

Posted: December 5th, 2011

View 1 Replies!   View Related
ActionScript 2.0 :: Implementing Nested Loop Inside Existing One
I have the following code to control the x position of one single movieclip (company_mc) with five button mc's (btn_corporate, btn_dimitriou, btn_cars, btn_cycles, btn_hertz):

Code:
function movoClip(x) {
company_mc.onEnterFrame = function() {
this._x += (x-this._x)/5;
};}
[Code] .....

Now I also want to control tha alpha fade for 5 photo_mc's (photo_corporate, photo_dimitriou, etc etc) So if btn_corparate is pussed photo_corporate should go to alpha 100 and the others to alpha 0. I think it has something to do with a nested loop, but I'm not sure and also don't know how to implement such a nested loop insite the existing loop.

Posted: April 27th, 2004

View 14 Replies!   View Related
Flash :: Combining Dynamic Symbols/movieclips On 1 Pre-existing Skeleton/bone Structure
[URL]

I have a "person" so to speak, in flash, with a few different parts; head, pants, shirt and hat. There can be, for example, 10 different colors of shirts for the person. I've done a lot of the AS3 code behind it, but I'm awful in flash, and I've had a ton of trouble with this.

What I'm really trying got figure out (in vain) is how I can have basically a blank skeleton structure (i.e. I'm trying to have "blank" or "placeholder" symbols connected by Inverse Kinematics as bones) consisting of the pants, shirt, & head, and when I find out that shirt #6 needs to be on the person... put it in that placeholder. Does that make sense? That's the big problem. The other thing is that I've had nothing but trouble figuring out how to have, for example, one or two outlines of shirts, and when it sees shirt #6, it fills in that shirt with blue dynamically. But that might be for another question.

How I have it now: In AS3, each of the parts, the shirt, the pants, the head & hat, have their own custom classes behind movieclips, and for example, I've got it set up that the body contains the pants, shirt and head classes, and the head contains the hat class, etc.

Posted: Oct 21 10 at 19:33

View 1 Replies!   View Related
Professional :: Importing Images Onto The Stage But They Keep Replacing Existing Frames?
i'm using Flash CS3 on my Mac. I'm making a stop motion animation. I've already successfully imported some images, but when i've tried importing more, it replaces my last frame!! Is there something that i might of pressed??

Posted: May 17, 2010 6:58 AM

View 3 Replies!   View Related
ActionScript 3.0 :: Replacing Existing MC With External SWF?
I'm trying to load an external swf on a button push but cant seem to get the code right. it loads behind instead of replacing what is already there.

var bg_mc:Background = new Background();
addChildAt(bg_mc, 0);
controls_mc.play_btn.addEventListener(MouseEvent.CLICK,

[Code].....

Posted: Oct 25, 2008 9:39 AM

View 1 Replies!   View Related
ActionScript 2.0 :: Loading An External .swf Into A Pre-existing .swf?
What I wan't to do is load a .swf into an existing .swf to keep down loadtimes. I've placed the visual representation of the actuall loading on the external .swf [URL] (Actuall website I need this for, I'm redesigning it)

I would copy the elements/AS from the website above but it doesn't work. So obviously I've missed something. What I've got is quite simply:

Code:
loadMovie("my_path/my_swf.swf", "stageloader");

"stageloader" being the instance name of a movieclip on the _root containing a graphic at the size I want loaded loaded .swf's to fit.

Posted: September 1st, 2008

View 3 Replies!   View Related
ActionScript 2.0 :: Gallery Of Images Automatically Scrolling Horizontally While Having The Set Of Images Loop
i couldn't find a tutorial on this matter so i sorta started making my own hypothesis... what i'm trying to do is: have a gallery of images automatically scrolling horizontally while having the set of images loop. like at[URL]..

here are a couple of my theories and questions for AS commands to have this work:

1) display a range of pixels of an image at certain positions, i.e. if gallery is scrolling to the left, leftmost image when its parts are disappearing out of the viewing area, they become visible at the right.

2) have two instances of each image and when an image is disappearing on left, the second instance of that image comes visible on the right. this I imagine would take up more HD space.

i guess what i was wondering more about is how jager did their gallery where there's only enough images are in a set to be viewed in the viewing area.

Posted: December 22nd, 2005

View 3 Replies!   View Related
Professional :: Existing 'load External .flv' Code?
Recently, I found a great little Flash project that acts like a jukebox for external mp3 song files, and am using it on my website to play my song demos.I'm now trying to find if there is an existing solution like that for video. I just need some way to progressively download video files from my webspace when the thumbnail is clicked... and am now looking into some sort of Flash jukebox.

I've tried just embedding the video files into HTML, but they don't progressively download for some reason (even though they are saved as Progressive With Compressed Header). I've even tried using prettyPhoto (...a script that mimics a Lightbox like feature, where the whole page dims, and a floating window appears over your site, displaying any media, and allowing you to move back/forth through your list of media)..... works great, but again, not a progressive download, so you stare at a blank screen for a while.

Seems the only way it works is if I have the file on YouTube or some other site, then embed it or use the prettyPhoto app.So, can someone either tell me how to make the embedded file download (OT, but I figured I'd ask), or point at some existing Flash file that serves as a video jukebox, showing all media on a common window?

Posted: Jun 13, 2010 9:50 AM

View 2 Replies!   View Related
ActionScript 3.0 :: Loading External SWF Inside Existing Empty MC
I would like to automatically load an external swf inside an existing empty mc (or a new one) and load/unload different external swf on several button click functions.I've been trying so many different methods until its probably loaded with irrelevant functions!

var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("homepage.swf"); myLoader.load(url);
myLoader.x=477;
myLoader.y=0;

/* Click to Load/Unload SWF or Image from a URL.
Clicking on the symbol instance loads and displays the specified SWF or image URL. Clicking on the symbol instance a second time unloads the SWF or image.
Instructions:
1. Replace "[URL]" below with the desired URL address of the SWF or image. Keep the quotation marks ("").
2. Files from internet domains separate from the domain where the calling SWF resides cannot be loaded without special configuration.
*/

button_1.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);
var fl_Loader:Loader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad:Boolean = true;
function fl_ClickToLoadUnloadSWF(event:MouseEvent):void
[Code] .....

Posted: Nov 28, 2010 9:58 PM

View 17 Replies!   View Related
ActionScript 3.0 :: Handle Existing MovieClip From External Class?
how to addChild() a new Object to an existing movieClip on stage from an external class....

for better understanding:

This is my external Class:

ActionScript Code:
package joueur
{
public class CreeJoueur

[Code]....

Then i have the main .fla file with a movieClip on frame1 called 'terrain'.

When i try my code, the external class does'nt reach the terrain MovieClip :

ActionScript Code:
Error 1120: Access of undefined property terrain

Posted: 08-06-2009, 08:58 AM

View 4 Replies!   View Related
ActionScript 2.0 :: Loading A External Swf Into An Existing Flash Site
i just need to know about loading external sxf into an existing flash site. i used the load external code. but i just want to know about the link . how must i be. the example it like so

[Code]...

now the path where it says path how must it be. once these files are uploaded to my server. must it be like so(as above) or how the full part which is ./public_html/pics.swf

Posted: April 13th, 2009

View 1 Replies!   View Related
ActionScript 3.0 :: Access An External Class In An Existing Fla File?
I have an Existing FLA file (It is my Project file) and I have downloaded one good example Class file with Fla. But there is no code at all on the stage just it is retrieving instructions from the Class. How can I use this class file in my existing fla file.

Posted: December 20th, 2010

View 3 Replies!   View Related
ActionScript 3.0 :: Load An External Xml File On Clicking The Node In Existing Tree?
i've created a tree using an xml file. now i want to load an another xml file on clickinh the particular node which contains the path of another xml file..can any one guide in this regard...

actually i've called a handler on clicking the node and reading the path then calling urlloader methodds for loading another xml file ..but beforeloading the file the control goes to next instruction.

Posted: 06-22-2009, 11:56 AM

View 2 Replies!   View Related
Professional :: Load Preloader From External File Or Place It Directly Into Existing Movie?
Is it best to load the preloader from external file or place it directly into an already existing movie?

Posted: Sep 13, 2010 7:56 AM

View 3 Replies!   View Related
ActionScript 2.0 :: Pulling External Images - Make The Small Images When Click To Appear In The Place Of The Main Image
I am pulling external images, I have my main image, and five small images, I have that to make the small images when click to appear in the place of the main image, but I am not obtaining to make they to click, I am placing my archive who to want to make download

Posted: October 17th, 2004

View 2 Replies!   View Related
IDE :: Loop Does Not Pick Up Movieclips?
I've got a movieclip(we'll call this "A") on my stage, which attaches another movieclip("B") into itself. So it's nested.Now, once this movieclip("A") has attached the other movieclip("B") into itself,It uses a "gotoAndStop()" to send the frame of movieClip("B") to the right frame, eg. frame 2. Then it runs a loop which checks for all movieclips in "B" and populates an Array.The script I'm using for this is :

Code:
for (var i=0; i<h.numChildren; i++) {// This loop is suppose to populate my "bitArray" Array with all of the attached clip's childclips
if (h.getChildAt(i) is MovieClip) {[code]....

if there were 22 MovieClips on frame 2 in movieClip"B" , this code would still be able to populate my array with all 22 clips right?It doesn't. For some reason, if there were 22 clips, then out of the 22, the loop would only pick up 9. However, doing a trace with numChildren() in movieClip"B", it would still show 22. But my array would only show 9.I've attached a sample fla, I think it would explain my problem a lot better.Once you run it, it should spit out an output telling you how many movieclips in the attached movieclip, and it'll tell you how many clips it pushed onto the array.I can't seem to get the number of movieclips in my array to equal the number of clips in total inside my attached movieclip.

Posted: October 16th, 2009

View 4 Replies!   View Related
ActionScript 3.0 :: Set Movieclips Invisible Through For Loop?
I use to do this in AS2, but find it impossible in AS3. The commented code is what I need to achieve through my for loop.

/*
TopIcons.btText01feedback1.visible=false;
TopIcons.btText01feedback2.visible=false;

[Code].....

Posted: 07-16-2010, 09:43 AM

View 1 Replies!   View Related
ActionScript 3.0 :: Animating Movieclips Through Loop
I'm trying to create an accordion menu that contains three submenus. The idea is that when you mouseover one submenu (or rectangle, to keep it simple) that the rectangles which were previously covering it will move to reveal it. Menus of this type can be found at the bottom of nvidia's site [URL] for reference.

At first I tried creating each function, which will make the rectangles move, separately but this resulted in three very repetitive functions and there seemed like there should be a better way, especially since I'd like a good way to add and remove submenus. The animation did work then. I tried to clean it up by creating a for loop that would move each rectangle but now, for some reason, it doesn't work. It is still missing some key points such as utilizing the mOver variable to figure out when each rectangle is moused over and act appropriatly

[Code]...

Posted: 07-26-2010, 06:43 PM

View 1 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved