Professional :: Calling Functions Within SWFs In TileList?

Jul 14, 2010

I've used the code below to load swfs into my tileList and set their colors using setData() within each swf. Everything seems to work except "source:e.currentTarget.content". The swfs seem to be mixed up randomly each time it runs. Their colors are set correctly and all the other tilelist info is correct. What have I done wrong with "source:e.currentTarget.content"? I can swap "source:e.currentTarget.content" with "source:myXMLList[loadPosition].source" which gives me the correct swf but then the colors aren't set.

for(var f:int = 0; f<myXMLList.length(); f++){
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void{
Object(e.currentTarget.content).setData(myXMLList[loadPosition].param eter[0], myXMLList[loadPosition].parameter[1]);
[Code] .....

View 4 Replies


Similar Posts:


Professional :: SWFs In Tilelist Slowing Down?

Jul 13, 2010

I have a tileList that I'm loading swfs into. One of my swfs has a particle system in it and every time it is loaded into the tilelist the particle system slows down. Every time the swfs are loaded I use tileList.removeAll() to clear it and then tileList.addItem() to repopulate the tileList. My guess is that this isn't actually unloading the swfs completely so they are building up in memory. What do I have to do to unload the swfs completely to prevent them from slowing down?

View 1 Replies

Actionscript 3 :: Calling Functions In Functions And Avoiding The Player To Crash / Hang?

Oct 6, 2011

I have a series of calculations i'm doing over a bunch of objects stored in a array. Each function is pretty CPU demanding but if you only run one function, it just works fine.

[Code]...

View 2 Replies

ActionScript 2.0 :: Calling Functions Within Mouse Event Functions?

Mar 16, 2003

Is it not possible to call other functions from generic mouse event functions? Surely it is !!??ie....

Code:
_root.myButton.onPress = function(){
hide();

[code]........

View 11 Replies

Actionscript 3 :: Flash Cs4 - Throwing Error #1009 When Calling AddChild With A TileList As The Argument?

Mar 23, 2011

To be exact this is the error.

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.containers::BaseScrollPane/drawBackground()
at fl.controls::TileList/draw()
at fl.core::UIComponent/callLaterDispatcher()

Now I've tried several of Adobe's own examples from this page, http:/[url]....., and they all throw this error as well.The error is triggered by the TileList instance being the argument of the addChild function.Here's my package, which works fine when I change the displayComponent is be a List.

package com.pennstate {
import fl.data.DataProvider;
import flash.display.MovieClip;[code]........

View 2 Replies

Actionscript 3 :: Custom TileList Component FLASH CS5 - Built A Skin For A TileList

Sep 17, 2011

has anyone made a Custom Skin for a TileList component in Flash CS5. I want to change the scrollbar of the TileList, i want the track bar as just a thin white line and the thumb a orange circle, this for a Touch Interface.

View 1 Replies

AS3 :: CS3 - Calling Variables From Other Functions

Aug 20, 2009

If I have a function and I want to call a variable from another function (only 1variable), how do I do it? I know in the olden days you could set the variable to local or global, but that does not seem to work anymore. There is only 1 variable I need access to, but all the tutorials I have come across talk about making classes for multiple variables.

e.g. function2();
{
variable_b = variable_a;
}

[Code].....

View 3 Replies

ActionScript 3.0 :: Calling Functions From Another Swf?

Feb 12, 2009

I can't get it but, i'm coding in as3 and i can't target a function from a swf file loaded in the DisplayObject loader in any way. I don't want to create a class to make this function works. It's a simple function, made to change a picture every time the user navigates on another swf. Well. The point is, why in the name of God, the as3 cannot target another swf? How can i do it?

View 0 Replies

ActionScript 3.0 :: Calling The Random SWFs?

Feb 12, 2009

I have a Master SWF file that needs to load one of five different content SWFs on a random basis. In other words, I would like the visitor to see a different one of five content animations each time he/she visits the page. Is there a way to just call one of five different URLs on a random basis? Here's my code so far:

var swfLoader:Loader = new Loader();
swfLoader.x = 12;
var swfURL:String = "b2bAnim1.swf"

[code]...

I would like to randomly differ the URL variable (swfURL) to select one of the following five URLs:

b2bAnim1.swf
b2bAnim2.swf
b2bAnim3.swf
b2bAnim4.swf
b2bAnim5.swf

View 3 Replies

CS3 Calling Functions Using Event Listeners?

Aug 7, 2009

I have made an event listener:text0_mc.addEventListener(MouseEvent.CLICK, showMe);showMe is a function, but I need it to call more than 1 function at once i.e. -ext0_mc.addEventListener(MouseEvent.CLICK, showMe1, showMe2, showMe3, showMe4, showMe5, showMe6, showMe7);Each function contains an if statment as below.

function showMe1(event:MouseEvent):void
{
if (shuffledArray[1]==orderArray[1]){

[code].....

View 1 Replies

ActionScript 3.0 :: Calling 2 Functions Concurrently?

Feb 23, 2010

Is there any way to call two functions concurrently at the same time in AS3? I have two functions which do very sensitive things, a difference of 0.1 second is considered failure.

View 2 Replies

ActionScript 2.0 :: Calling Functions From JavaScript

Jun 17, 2009

I'm having some trouble calling a JavaScript function from the HTML file I've embedded my SWF in.

I'm currently using Flash 8.

I'm trying to to simply call a function which will open an alert window, but when I click my button, nothing happens.

Flash Code:

import flash.external.*;
testbutton.onRelease = function() {
ExternalInterface.call("testAlert", "Yay, it finally worked");
}

[Code].....

View 0 Replies

ActionScript 3.0 :: Calling Functions From Within A Function?

Nov 8, 2009

why the following does not work:

private function test():void
{
Parse1(textarea1.text);
Parse2(textarea2.text);[code].........

It seems only the first parse function is called and the rest is simply ignored.

View 6 Replies

ActionScript 3.0 :: Calling Functions From Loaded SWF?

Apr 29, 2010

I'm loading a flash file using the built in Loader class. How can I call one of the original swf's functions from the loaded swf?I know about LocalConnection and using that with other SWFs on the same webpage, but is there a better way of doing it if you're loading an swf within another? The reason is that I need to get a return value from the function, and local connection's send() only provides a true/false.

View 0 Replies

ActionScript 2.0 :: Calling Functions From Vars?

Feb 7, 2006

PHP Code:

function finale(){    finalFunc = "section" + _root.selectedSection    finalFunc();}_root.selectedSection = 1finale();function section1(){trace("moo")}function section2(){}

View 1 Replies

ActionScript 2.0 :: OnMotionFinished And Calling Other Functions

Sep 6, 2006

I have this function that builds menus, and I'm using a tweening class function to move the menu items around. The thing is that when calling the tween function I need the submenu building function to wait until the tween is finished otherwise things start freaking out. It's organized like this (pseudo code):

[Code]...

The problem is that I need the first tweening to finish before I can build the submenu. I've tried using the onMotionFinished, but it doesn't seem to want to call a function nestled into another function (in this case buildMenu()).

View 1 Replies

ActionScript 2.0 :: Calling Functions From Within An If Statement?

Jun 5, 2007

while the condition of a if statement is true, as in the following hypothetical example, will it keep executing that code continuously until the condition somehow becomes false?

i.e. - will it keep trying to load the photo into the photo_movieClip instance continuously until the condition is false?

Code:

if (condition == true) {photo_movieClip.loadPhoto(image); //send image from array to load into photo_mc};

[i]...If so, how can i make it call that function only once even if the condition remains true?

View 3 Replies

ActionScript 2.0 :: Calling Functions In MovieClips?

Jun 16, 2007

I have this REALLY wierd problem. I have a MovieClip that is attached onto the stage. In this MovieClip I have the init() function. When I try and call this function, after the MovieClip has been attached on stage it doesn't work! I can't belive it!

MovieClip Frame 1
function init(){
trace("bleh");

[code].....

View 2 Replies

ActionScript 2.0 :: Calling Functions From External SWF'S?

Aug 19, 2007

its a site about interior design. my job is to add some code to do something. i checked the code and his approach is not so good.. he's coding inside objects and frames at the same time. (ive read many actionscript books and this is a really bad practice). Here's the problem... he wants this to be implemented in the site...1.) in the gallery there is a scrolling thumbnails, he wants this to pause about 4 seconds then it will start to scroll..(ive already fixed this by creating a function interval.

Here is where my problem is...2.) When you click the thumbnail, the enlarged view will pop up.. the enalarged view are external swfs... the client wants that when you click on the thumbnail, the scrolling will stop and the external popup enlarged image will come out...this external swf has an exit button to go back to the main gallery window which is another swf... so the client wants that when you hit exit from the external swf popup window, the scrolling will resume.... im having a hard time figuring this out because i dont know how to call a function from an external swf to the main movie (the gallery page) Ill post the fla of main movie, gallery and a single external swf link of the thumbnail. just click on the first picture that will appear on the gallery

View 1 Replies

ActionScript 2.0 :: Functions Random Calling?

Nov 20, 2008

I was able to find different threads about random loads: the most are photocontainer, well I also found a text random loader But I can't find some about function random calling: in a site I'm building I have three functions (but other will be added) that when called in callback change general graphic appearance, loading a dozen of different parts in various container with attachMovie; I wish a function that loads them randomly

Actually I'm trying:
//variable "funArr" with the three function names
var funArr:Array = new Array("montaspazio", "montabilancia", "montaaereo");

[Code]...

View 1 Replies

ActionScript 2.0 :: Calling Functions In Loaded Swf

Apr 22, 2010

I am having problems calling functions in a SWF (B.swf) which I load into my first SWF (A.swf).

Nothing seem to happen when I call the functions, values that are supposed to be returned from the function call are undefined.

[Code]....

View 1 Replies

ActionScript 2.0 :: Calling Functions Dynamically?

Oct 13, 2003

i'm trying to call a function on a clip, but i want to use a variable that i'm sending to the clip so that when the one function gets done it knows what to do next. i just have no idea of what the syntax would be. here's a sample.

[code]...

View 3 Replies

Professional :: Clickable Buttons And Other Elements In TileList

May 14, 2010

I have a TileList with movie clips as elements. The MCs contain buttons, but I can't click on the buttons and other elements because TileList is "over" them. How to make buttons clickable? Also, I don't need highlighting in the TileList on rollover and click. How to remove this effect?

View 1 Replies

Professional :: TileList - Put It On The Scene And Call It Thumbnails?

Jun 29, 2010

I begin with flash in CS5 and learn it with "classroom in a book" on a mac on snow leopard.At the lesson 8 I have a problem with the componant tileList.I put it on the scene and call it thumbnails_tl properties:

x:47 y:150
w:1270 h:318
columnwith:125[code]....

in the action panel I put the next code : "thumbnails_tl.addItem({label:"test", source:"thumbnails/image.jgp", data:"nothing"});

but when I test it, I have no image on my screen and no error in the script and execution ??

View 8 Replies

ActionScript 2.0 :: Calling Multiple Functions From A Click Cs2

May 20, 2009

Is it not possible to call more than one function at a time?, this is my problem:-

btn.onRelease = function()
{
blah();
something();
jump();
}

When I run something like the one above, jump is executed but everything else is ignored, would really like to run all functions at the same time.

View 6 Replies

ActionScript 2.0 :: Flash8 : Calling Functions From JavaScript?

Jun 17, 2009

I'm having some trouble calling a JavaScript function from the HTML file I've embedded my SWF in.I'm currently using Flash 8.I'm trying to to simply call a function which will open an alert window, but when I click my button, nothing happens.

Flash Code:

import flash.external.*;
testbutton.onRelease = function() {
ExternalInterface.call("testAlert", "Yay, it finally worked");

[code]....

View 1 Replies

ActionScript 3.0 :: Calling Functions With Loops And Arrays?

Feb 9, 2009

I want to loop through a array to call my functions, but can't get the syntax right?

var myArray:Array = ['function1()', 'function2()'];
for (var key:String in myArray){
// I want to call the function here
}

View 1 Replies

ActionScript 3.0 :: Calling Functions Between Different Class Files?

Mar 13, 2010

I'm new to writing several different class files.. and trying to make a set of boxes that expand/collapse by mouse click and timer..
 
I have 4 class files, Box, BoxGroup, BoxTimer, and Main.
 
I can call the functions in Box class from BoxGroup class, but not the functions in the BoxTimer class. it keeps throwing this error.  I don't understand why since i'm using the same method between the other 2 class files...
 
ReferenceError: Error #1069: Property timer_start not found on
CollapsingBox and there is no default value.    at
CollapsingBoxGroup/on_click()

[Code].....

View 4 Replies

ActionScript 3.0 :: Calling User-defined Functions?

Apr 22, 2011

I don't understand why within my function, initially the status of stage.scaleMode via a trace() is NO_SCALE, then it becomes SHOW_ALL.  The code below is found at three different location in my overall code.
 
stage.scaleMode = StageScaleMode.NO_SCALE;    backgroundPositioning(myStage.stageWidth, myStage.stageHeight);    stage.scaleMode = StageScaleMode.SHOW_ALL;

View 8 Replies

Flex :: Adobe Calling MXML Functions?

Jul 16, 2010

i allready searched abit around here and found the solution to call a fx:script function defined in a mxml from a AS class.

[Code]...

View 7 Replies







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