Get the dynamically loaded movieclip content
Hey,.
After trying without success to get the totalframes to a .swf dynamically loaded in AS3, I regressed to AS2.
Now, I can add the clip and get the totalframes of content, no problem.
The problem is that I can't resize the content at all.
I have no idea how to target the loaded content.
Here is the code I use:
var myXML:XML = new XML(); var path:String; var mcl:MovieClipLoader = new MovieClipLoader(); var mclm:MovieClipLoader = new MovieClipLoader(); var mclL:Object = new Object(); var frames:Number; var i:Number = 0; var mc:MovieClip = new MovieClip myXML.ignoreWhite=true; myXML.load("content.xml"); holder_mc._alpha = 0; myXML.onLoad = function(xmlLoaded){ menu(); load(); } mclL.onLoadComplete = function() { frames = (MovieClip(holder_mc)._totalframes); if (frames == 1) { image(); } else if (frames > 1) { clip(); } } load = function(){ clearInterval(timer); path = myXML.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue; mcl.loadClip(path, holder_mc); var tFiles:Number = myXML.firstChild.childNodes.length; if (i < tFiles){ i++; } else if (i == (tFiles)){ i=0; load(); } mcl.addListener(mclL); } image = function() { seconds=1000; holder_mc._alpha = 100; timer = setInterval(load, seconds); } clip = function() { holder_mc._alpha = 100; ftimer = setInterval(checkFrames, 100); } checkFrames = function() { frame = (MovieClip(holder_mc)._currentframe); if (frame==(frames-1)){ clearInterval(ftimer); load(); } } menu = function(){ var tFiles:Number = myXML.firstChild.childNodes.length; for (me=0; me < tFiles; me++){ path = myXML.firstChild.childNodes[i].childNodes[1].childNodes[0].nodeValue; i++; _root.attachMovie("circle", "circle"+me, me, {_x:(me*30), _y:330}); mclm.loadClip(path, ("circle"+me)); } }
I need to resize the content as well for the main holder_mc, as well as for menu items.
Use onLoadInit():
mclL.onLoadInit = function(target:MovieClip) { frames = target._totalframes; if (frames == 1) { image(); } else if (frames > 1) { clip(); }// size target here }
Tags: Adobe Animate
Similar Questions
-
How to get the class Loader of Progress event
I was charge test.swf file threw Loader class. How to get the class Loader of ProgressEvent, IOErrorEvent.
function getLoader() {}
var loader: Loader = new Loader();
loader.contentLoaderInfo.addEventListener (ProgressEvent.PROGRESS, progressHandler)
loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);
var request: URLRequest = new URLRequest ("test.swf");
Loader.Load (request);
}
function progressHandler(event:ProgressEvent):void {}
get the class loader
}function ioErrorHandler(event:IOErrorEvent):void {}
get the class loader
}
getLoader()the event target has a property of charger:
Event.Target.Loader
-
On installed SDL Trados Studio 2009, get the provider load error
SDL Trados Studio 2009, I installed on my computer (windows vista) and after that it worked fine for two weeks, I now get a "provider load error" when I try to start the program. What can I do?
http://www.Google.com/search?q=provider+load+error&ie=UTF-8
-
Cannot get the film loader to work
I have trouble getting my animation Flash loader file works. I created 3 movies test (1.swf, 2.swf, 3.swf). Each of the test file has long been a second. Everything they do is display a number. In my loader file, I load the test files a second part. The first two movies load very well, but instead of loading the third film the charger makes a loop to the first image and start again. The last film is ignored even when I place the order. For example, 3. SWF does not charge for 1-2-3, and does not load swf 1. 3-2-1. here is the actionscript code that I used. Anyone know how I can fix this problem? I am using Flash CS5. Thank you
Stop();
unloadMovieNum (1);
loadMovieNum ("1.swf", 1);
**************************
Stop();
unloadMovieNum (1);
loadMovieNum ("2.swf", 1);
**************************
Stop();
unloadMovieNum (1);
loadMovieNum ("3.swf", 1);
The reason why I'm a little confused, you're not using stop(), so I wonder how your timeline is to progress beyond. The loaded SWF files needs to communicate with the main timeline or your main timeline look the _currentFrame of the clip loaded into waiting so that she reaches _totalFrames.
Here is an example (sans-stop ()) in saved AS2 until CS5 (I can't go lower) who did what you describe and works perfectly fine for me:
http://www.ERTP.com/tmp/LoadMovieNum.zip
Is there a difference between that and what you do, and this simple example works for you?
-
My Netflix App is stuck on waiting. How can I get the app load?
MY Netflix application is pasted on the wait. How can I get the app to completely update?
Have you tried restarting your iPhone? Once it restarts, try the update again.
If it does not, consider uninstalling and reinstalling Netflix. Then connect back with your email and password.
-
Update Firefox 6.0 is useless to me because many websites I visit are not displayed properly, I guess because the Java modules are disabled because of incompatibility. They appear correctly in Internet Explorer.
In addition, the add-on from Trend Micro is not compatible, which leaves me with a positive feeling.
When I try to check to see if these modules can be updated, the menu item Tools/Addons just goes to a page with "loading" and stays there for several minutes without change until I close it.
I would like to know the procedure to regularize this version of Firefox to my previous version that worked.
Firefox 5.0/5.0.1/4.0/4.0.1 and earlier 3.6.20 all contain questions of security and stability that will not be corrected. You put your system at risk by using any version of Firefox that 6.0 or 3.6.20. Any person who displays a link to other versions is to be irresponsible, in my opinion.
Java
If the incompatible extensions in Add-ons > Extensions are Java Console, you have no need them unless your doing Java development. Most of the users have not yet installed, but Java will install Java Console with each update. You can delete them manually:The only thing that affects the functioning of the sites/Java applets on the web is the plugin (Add-ons - > Plugins) "Java (TM) Platform SE (version)". Do not forget that it is enabled and that you have not all extensions which affect/block "scripts".
- Check commonly used plugins: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
- Update or install Java (aka, next generation Java plug-in for the Mozilla browsers): install or update Java in Firefox
Trend Micro
You must contact Trend Micro or go to the forums on their website to inquire about their plans to update the add-ons/toolbars they install in Firefox.Problem with the display of the Add-ons Manager
The Add-ons Manager gets in a loop of loading due to the recent update of Firefox 6 and servers being overloaded because users and update process are looking for updates to the add-on. If you stay away from the "Get Add-ons" selection on the left of the screen of the add-on Manager, you should have no problem with that. This situation is expected to resolve when the overload of Firefox 6 update is complete. I do not always use this "Get Add-ons" option, instead, I go to the website of modules and the search for what I want from there: https://addons.mozilla.org/en-US/firefox/search/?q=clone & cat = all & x = 0 & y = 0 -
Get the error loading file csv to oracle table
Hello
I'm tryitng to load the csv file into oracle db table.
Source:
CSV file have account_numbers, customer_names. all the fields, it took as channel.
Target: Oracle db
If I took all the fields as varchar, it loads very well. but I want to
Oracle table fields: digital account numbers or decimal (20.2)
customer_names as varchar2 format.
When I'm trying to load csv to oracle table, I am getting following error.
ODI-1228: fgh1 (integration) task fails on the target odi_user1 ORACLE connection.
Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
I tried so many times. I am still getting error.
TO_NUMBER function I also used, getting same error
Please help me,
Thank you and best regards,
A.Kavya.
Hi, String, CSV file data type have values of amount a 54,356,4657.89 format. Like this. In odi, I took number (30.2) of data types for the target table. When I traced in odi, I get error like invalid number. to do this, I changed the values in csv file format. I removed commas. for example, 543564657.89. Yet once, I traced csv to oracle in odi. executd successfully. Thanks & regards, A.kavya.
-
Get the dynamic query alias name
Hi all
I have a plsql function using a dynamic query.
And the function takes an entire sql query as a parameter.
The main problem is that the function must get what aliases or columns were interviewed.
For example,.
FUNCTION_GET_QUERY_ALIAS ('SELECT 1 AS col1, col2 FROM DUAL 2 AS')
Inside the function, he must find the alias name COL1 and COL2.
I would be grateful for any help.I modified print_table as fact and function to meet your needs.
SQL> CREATE OR REPLACE TYPE my_column_object AS OBJECT(ruw_number integer, column_name VARCHAR2(1000), column_val VARCHAR2(1000)) 2 / Type created. SQL> CREATE OR REPLACE TYPE my_table_type AS TABLE OF my_column_object 2 / Type created. SQL> CREATE OR REPLACE FUNCTION print_table( p_query in varchar2 ) RETURN my_table_type PIPELINED 2 AS 3 l_theCursor INTEGER DEFAULT DBMS_SQL.OPEN_CURSOR; 4 l_columnValue VARCHAR2(4000); 5 l_status INTEGER; 6 l_descTbl DBMS_SQL.DESC_TAB; 7 l_colCnt NUMBER; 8 l_rcount INTEGER := 0; 9 BEGIN 10 DBMS_SQL.PARSE( l_theCursor, p_query, dbms_sql.native ); 11 12 DBMS_SQL.DESCRIBE_COLUMNS( l_theCursor, l_colCnt, l_descTbl ); 13 14 FOR i IN 1 .. l_colCnt 15 LOOP 16 DBMS_SQL.DEFINE_COLUMN(l_theCursor, i, l_columnValue, 4000); 17 end loop; 18 19 l_status := DBMS_SQL.EXECUTE(l_theCursor); 20 21 WHILE ( DBMS_SQL.FETCH_ROWS(l_theCursor) > 0 ) 22 LOOP 23 l_rcount := l_rcount + 1; 24 FOR i IN 1 .. l_colCnt 25 LOOP 26 DBMS_SQL.COLUMN_VALUE( l_theCursor, i, l_columnValue ); 27 28 PIPE ROW(my_column_object(l_rcount,l_descTbl(i).col_name,l_columnValue)); 29 END LOOP; 30 END LOOP; 31 32 RETURN; 33 end; 34 / Function created. SQL> select * from table(print_table('select * from emp')) 2 / RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 1 EMPNO 7369 1 ENAME SMITH 1 JOB CLERK 1 MGR 7902 1 HIREDATE 17-DEC-80 1 SAL 800 1 COMM 1 DEPTNO 20 1 DIV 10 2 EMPNO 7499 2 ENAME ALLEN RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 2 JOB SALESMAN 2 MGR 7698 2 HIREDATE 20-FEB-81 2 SAL 1600 2 COMM 300 2 DEPTNO 30 2 DIV 10 3 EMPNO 7521 3 ENAME WARD 3 JOB SALESMAN 3 MGR 7698 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 3 HIREDATE 22-FEB-81 3 SAL 1250 3 COMM 500 3 DEPTNO 30 3 DIV 10 4 EMPNO 7566 4 ENAME JONES 4 JOB MANAGER 4 MGR 7839 4 HIREDATE 02-APR-81 4 SAL 2975 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 4 COMM 4 DEPTNO 20 4 DIV 10 5 EMPNO 7654 5 ENAME MARTIN 5 JOB SALESMAN 5 MGR 7698 5 HIREDATE 28-SEP-81 5 SAL 1250 5 COMM 1400 5 DEPTNO 30 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 5 DIV 10 6 EMPNO 7698 6 ENAME BLAKE 6 JOB MANAGER 6 MGR 7839 6 HIREDATE 01-MAY-81 6 SAL 2850 6 COMM 6 DEPTNO 30 6 DIV 10 7 EMPNO 7782 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 7 ENAME CLARK 7 JOB MANAGER 7 MGR 7839 7 HIREDATE 09-JUN-81 7 SAL 2450 7 COMM 7 DEPTNO 10 7 DIV 10 8 EMPNO 7788 8 ENAME SCOTT 8 JOB ANALYST RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 8 MGR 7566 8 HIREDATE 19-APR-87 8 SAL 3000 8 COMM 8 DEPTNO 20 8 DIV 10 9 EMPNO 7839 9 ENAME KING 9 JOB PRESIDENT 9 MGR 9 HIREDATE 17-NOV-81 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 9 SAL 5000 9 COMM 9 DEPTNO 10 9 DIV 10 10 EMPNO 7844 10 ENAME TURNER 10 JOB SALESMAN 10 MGR 7698 10 HIREDATE 08-SEP-81 10 SAL 1500 10 COMM 0 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 10 DEPTNO 30 10 DIV 10 11 EMPNO 7876 11 ENAME ADAMS 11 JOB CLERK 11 MGR 7788 11 HIREDATE 23-MAY-87 11 SAL 1100 11 COMM 11 DEPTNO 20 11 DIV 10 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 12 EMPNO 7900 12 ENAME JAMES 12 JOB CLERK 12 MGR 7698 12 HIREDATE 03-DEC-81 12 SAL 950 12 COMM 12 DEPTNO 30 12 DIV 10 13 EMPNO 7902 13 ENAME FORD RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 13 JOB ANALYST 13 MGR 7566 13 HIREDATE 03-DEC-81 13 SAL 3000 13 COMM 13 DEPTNO 20 13 DIV 10 14 EMPNO 7934 14 ENAME MILLER 14 JOB CLERK 14 MGR 7782 RUW_NUMBER COLUMN_NAME COLUMN_VAL ---------- -------------------- -------------------- 14 HIREDATE 23-JAN-82 14 SAL 1300 14 COMM 14 DEPTNO 10 14 DIV 10 126 rows selected. SQL>
Thank you
Knani.Published by: Karthick_Arp on September 23, 2008 12:11 AM
-
How can I get the page loading in the visible progress and 3.6 meter?
1)
When a page is slow to load, it would be nice to see his progress, if any, that I used to have in the previous ' FF-version. Is it possible somehow?2)
If I choose "without tab" to save space on the screen I the tabs you see when necessary, without going into preferences?1. https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/
2. This pref removes the tab bar when there is only one tab open. With two or more tabs Firefox should always show the tab bar. Unless you are referring to a preference added to Firefox by an add-on.
-
The clearing of movieclip content
Is it possible that you can erase all that has been added to a clip easily?
I basically want to withdraw all textfields, fills, etc. lines the entire clip is empty without actually removing the clip.It would be useless. It would be more efficient to create an empty movieclip, position it where your current, about to be erased, clip is positioned, it is the name of the store, remove your movieclip and name the empty movieclip.
-
Can't get the background to have content inside.
I wonder why the background box in this test http://www.aami.org/dev/tgs/template.htm page is not containing the content inside.
have created a 'container' that sets the background color and containing the masthead and a 'wrap' div that contains the two divs 'sidebar' and 'content '. Why the background is not expanding to contain the content?
I have attached the relevant CSS.Hello
Now that the floats are empty, there are a few changes to make in your CSS.
First of all, remove the width of the body.
Replace:
{body
font: 11px/1.33 Verdana, Arial, Helvetica, without serif.
color: #222;
background-color: white;
background: #DEE5EC url(images/body_bgrnd.jpg) horizontal;
margin: 12px auto;
padding: 0;
}Then, add a width to the utility div and Center it with a left-auto
the margin of
(Center a div to a width and a left and right margin set to automatic):{#utilities}
margin: 0px auto 12px;
text-align: right;
Width: 856px;
}Then give the container div a width and Center:
#container {}
background-color: #FFFFFF;
Padding: 12px;
border: 1px solid #666;
Width: 856px;
margin: 0px auto;
}Then, add a width to the div of film:
#wrap {}
padding: 0px 24 PX.
background: #FF0000;
Width: 856px;
}Now the width % fleet in scarf have a width value, they can be a
percent of.Take care
Tim"TSemmes" wrote in message
News:ft042u$3dg$1@forums. Macromedia.com...
> Seems to work in Mozilla, but not in Firefox.
> http://www.aami.org/dev/tgs/template.htm
> It works for you in your browser? -
Drive d image cannot be erased.
Drive d image cannot be erased.
==================================
The following article might be worth a visit, but
I guess that you have a hardware problem
with the DVD player.(314060) your CD or DVD drive is missing
or is not recognized by Windows or other programs
http://support.Microsoft.com/kb/314060/en-us John Inzer - MS - MVP - digital media experience -
To access the dynamic MovieClips of the child
Dev environment: Flash Pro 9
Well, I have a movie that has a movieclip (imageHolder, this is defined in the library and is an empty movieClip used as placeholder) which is on the stage. I read in load images in the flash file and create in their own movie clips WITHIN imageHolder as follows:
========================
NM var = imageHolder.createEmptyMovieClip ("swfHolder" + i,-(i * 10));
nm.loadMovie (filename);
========================
Obviously, this is a snippet of code, I use the LoadVars object to load these files. Once everything is loaded, it appears on the scene, with a depth in the order of the first image to last (first image on top, last picture down). After that, I have a set of intervals, to call a function called 'selectImage', which gets a variable called photonum and alter images for the number you passed in. In selectImage, I make sure that the image that is coming is then one level deep below the image currently displayed using swapDepths, and I am constantly incrementing a variable called "curdepth" which is global and always assign this depth to the image currently displayed at this depth. Thus, the image will be displayed in depth 30, and the following image upward will appear deep 29. Then I melted the current image using the tween object, and it works like a charm! To refer to these MovieClips, I use the following code:
====================
var cmc:MovieClip = eval ("imageHolder.swfHolder" (curpho + 1));
var nmc:MovieClip = eval ("imageHolder.swfHolder" (nexpho + 1));
Current clip force forward
cmc.swapDepths (curdep);
Next clip force as below before
nmc.swapDepths (curdepth - 1);
====================
and it works perfectly... Flash. Once it is on the page, or displayed in the independent movie player, everything goes south. I assigned the typeof cmc and nmc in a text box, and I got "movieclip", Flash and on the page. However, if I store the "cmc.getDepth ()" in the text box, I get "[type function]" in flash, but on the page "undefined", it seems that all that is specific to the MovieClip object, such as getDepth() or swapDepths() is not defined when I plug it into the textbox, but the things that are inherited, as enabled, _x, or FLF are all available for my reading and setting.
Does anyone have an idea how to fix this? I can reach all my code in a few hours if necessary. I tried not to get the images loaded into the imageHolder, and I found that did not help. I also tried a combination to add "_level0." and "_root." to my cmc and nmc references, does not. Any help would be greatly appreciated.Seems he had something to do with my Installation of Flash... I tried on another computer and everything was fine. What a pain!
-
How to get the plugin working in Adobe Muse Unity3D
Hello
I'm trying to migrate my site from Dreamweaver at Adobe Muse and I can't get the player Unity3D in Muse. Unity3D makes an HTML page and I took the code < head > of this and put it in the in the < head > Muse region using the page properties dialog box. I also created an HTML object in the body <>the page and pasted into the content of the < body > of Unity3D HTML generation. When I preview the page, I get the page loading of the unit, but nothing loads. No progress bar is displayed. Any thoughts? Thank you.
(Through this announcement on the forum Unity3D)
In my view, that a change is necessary in the work of any code.
Thank you
Sanjit
-
play nested MC in dynamically loaded MC
Hello
I have a dynamically loaded movieclip. Inside of this, I have a movieclip (with a menu in it) that I want to play when the user clicks a button. I can't make it work. Help?
check the option 'Allow debugging' in your publishing settings, so that we can see the error line number.
Maybe you are looking for
-
Qosmio x 500-'delay in the delivery part' duration 2 months of repair
I booked my laptop Qosmio x 500 for repair under warranty for a replacement of defective hard drive almost 2 months ago and just received a text from the repair center saying eta on the part is now for * next * months. When I booked it, it still had
-
How can I get my old dos programs?
My computer would not start. only, went to a diagnostic screen. A friend suggested to reinstall windows xp and had a drive. so I did. Now I have windows but nothing else. and restore does not work, I can restore to the date I install the new windo
-
Scanner HP 3570c Photo and imaging Director does not
Being out of warranty, HP help is not cheap. I've uninstalled and reinstalled the driver disc and online, but still the HP Director will not work. This does not seriously affect the operation of the program, it's basically a big thing pop of menu wit
-
Smartphones blackBerry BBM icon gone?
The BBM icon has disappeared from the face of the EART on my torch 9800. search for it and nothing, so it redownloaded from the Web site as has been suggested, and he said he would replace the other version. fine? but where devil is this? a battery
-
Suchen bei meinem Versuch zu, immer keine Suchergebnisse me something. Warum Beim Nachschaeun, in der Problembehandlung; means are ploetzlich. unberechtiger name oder Zugriff. Der der surely an meinem computer bin ich und sonst no one works. ICH kann