Dynamic MC depth swap

i have several duplicated movie clips, and want to have 2
buttons that swap the depth of these so that the user can page
through (like pages of a book).
the first part of the code generates the movie clips and puts
them on different depths (this all works fine):
function GeneratePortfolio(portfolio_xml) {
var portfolioPictures = portfolio_xml.firstChild.childNodes;
// thumb vars (unrelated)
var x_pos = 0;
var y_pos = 0;
var col_count = 0; // columns
var col_count_max = 4; // max number of columns per row
var row_count = 0; // rows
var row_count_max = 6; // max number of rows per row
// calculate required number of menu pages
var menu_max = Math.ceil((portfolioPictures.length) /
(col_count_max * row_count_max)) - 1; // number of menu pages
required
trace ("menu_max = " + menu_max);
// generate menu pages
if (menu_max > 1) {
for (var m = 2; m <= menu_max; m++) {
_root.attachMovie("menu_mc", "menu_mc"+m,
this.getNextHighestDepth());
thisMenu = _root["menu_mc"+m];
thisMenu.text1 = m;
thisMenu._x = 14;
thisMenu._y = 41;
// move first page to top
menu_mc1.swapDepths(thisMenu);
pagation_nav.swapDepths(menu_mc1);
_root.m_page = 1;
_root.m_page_swap = m_page;
this next part is where i have the problem. this function
gets activated when the "next" button is pressed. the traces for
both "m_page" and "m_page_swap" register good. but "m_page_swap"
comes up undefined when applied to the end of "m_menu", even though
this works with "m_page". so, untimately, the swapDepths method
does not work.
can anyone help me?!
pagation_nav.b_nextPage.onRelease = function() {
m_page_swap = m_page + 1;
trace ("m_page = " + m_page);
trace ("m_page_swap = " + m_page_swap);
trace ("swap1 " + (_root["menu_mc"+m_page]));
trace ("swap2 " + (_root["menu_mc"+m_page_swap]));
_root["menu_mc"+m_page].swapDepths(_root["menu_mc"+m_page_swap]);
_root.m_page++;
~ M

More research into depth swapping and removal of MCs revealed
an inability to repeatedly set the depth of a dynamically created
MC. The code is called every 2 secs (for dev for now) via a
setInterval(). One would expect the value of n to increase and it
does, but that value does not get 'piped through' to the argument
of the createEmptyMovieClip() method.
The code below returns this output:
first mc : 5
n:5
first mc : 5
n:6
first mc : 5
n:7
Any thoughts on why this happens, and ways around it, would
be deeply appreciated. This is a huge stumbling block and my
program was built on the assumption I could do something like this
cheers
mm66

Similar Messages

  • Dynamic pager not swapping - kernel panic on out of memory

    My problem is that I have a python program that chews a fair bit of memory.
    At the moment it crashes when OSX Yosemite runs out of physical memory. No page swaps appear to occur. On the Activity Monitor, the swap used stays zero
    As far as I can tell, the /sbin/dynamic_pager is not running. I cannot find it when I execute the command
    ps -alx | grep dynamic_pager
    I do not recall stopping this in the past. I have tried (unsuccessfully I believe) to start it with ...
    sudo launchctl load -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
    I have even tried this in single user mode (boot-command-s).
    Also, there does not appear to be a swapfile ... /private/var/vm/swapfile does not exist.
    I am thinking that either the dynamic_pager is not launching or there is some other setting I need to fix.
    The content of the com.apple.dynamic_pager.plist is as follows ...
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
      <key>EnableTransactions</key>
      <true/>
      <key>Label</key>
      <string>com.apple.dynamic_pager</string>
      <key>KeepAlive</key>
      <dict>
      <key>SuccessfulExit</key>
      <false/>
      </dict>
      <key>POSIXSpawnType</key>
      <string>Interactive</string>
      <key>ProgramArguments</key>
      <array>
      <string>/sbin/dynamic_pager</string>
      <string>-F</string>
      <string>/private/var/vm/swapfile</string>
      </array>
    </dict>
    </plist>
    Any help gratefully received.

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.
    Don't be put off by the complexity of these instructions. The process is much less complicated than the description. You do harder tasks with the computer all the time.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. As I wrote above, it changes nothing. It doesn't send or receive any data on the network. All it does is to generate a human-readable report on the state of the computer. That report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents to me or anyone else.
    You should be wondering whether you can believe me, and whether it's safe to run a program at the behest of a stranger. In general, no, it's not safe and I don't encourage it.
    In this case, however, there are a couple of ways for you to decide whether the program is safe without having to trust me. First, you can read it. Unlike an application that you download and click to run, it's transparent, so anyone with the necessary skill can verify what it does.
    You may not be able to understand the script yourself. But variations of it have been posted on this website thousands of times over a period of years. The site is hosted by Apple, which does not allow it to be used to distribute harmful software. Any one of the millions of registered users could have read the script and raised the alarm if it was harmful. Then I would not be here now and you would not be reading this message.
    Nevertheless, if you can't satisfy yourself that these instructions are safe, don't follow them. Ask for other options.
    4. Here's a summary of what you need to do, if you choose to proceed:
    ☞ Copy a line of text in this window to the Clipboard.
    ☞ Paste into the window of another application.
    ☞ Wait for the test to run. It usually takes a few minutes.
    ☞ Paste the results, which will have been copied automatically, back into a reply on this page.
    The sequence is: copy, paste, wait, paste again. You don't need to copy a second time. Details follow.
    5. You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode, under the conditions in which the problem is reproduced. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    6. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.
    7. The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, though you may not see all of it in the browser window, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.
    Triple-click anywhere in the line of text below on this page to select it:
    PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/libexec;clear;cd;p=(Software Hardware Memory Diagnostics Power FireWire Thunderbolt USB Bluetooth SerialATA Extensions Applications Frameworks PrefPane Fonts 1024 85 percent 20480 1 MB/s 25000 ports KiB/s DYLD_INSERT_LIBRARIES\ DYLD_LIBRARY_PATH -86 "` route -n get default|awk '/e:/{print $2}' `" 25 N\\/A down up 102400 25600 recvfrom sendto CFBundleIdentifier 25 25 25 1000 MB 'com.adobe.AAM.Updater-1.0 com.adobe.AAM.Updater-1.0 com.adobe.AdobeCreativeCloud com.adobe.CS4ServiceManager com.adobe.CS5ServiceManager com.adobe.fpsaud com.adobe.SwitchBoard com.adobe.SwitchBoard com.apple.aelwriter com.apple.AirPortBaseStationAgent com.apple.FolderActions.enabled com.apple.installer.osmessagetracing com.apple.mrt.uiagent com.apple.ReportCrash.Self com.apple.rpmuxd com.apple.SafariNotificationAgent com.apple.usbmuxd com.citrixonline.GoToMeeting.G2MUpdate com.google.keystone.agent com.google.keystone.daemon com.microsoft.office.licensing.helper com.oracle.java.Helper-Tool com.oracle.java.JavaUpdateHelper com.oracle.java.JavaUpdateHelper org.macosforge.xquartz.privileged_startx org.macosforge.xquartz.privileged_startx org.macosforge.xquartz.startx' '879294308 4071182229 461455494 3627668074 1083382502 1274181950 1855907737 2758863019 1848501757 464843899 3694147963 1233118628 2456546649 2806998573 2778718105 2636415542 842973933 2051385900 3301885676 891055588 998894468 695903914 1443423563 4136085286 523110921 2883943871 3873345487' 51 5120 files 4 1000 25 5120 -\\t 'PlistBuddy -c Print' );N5=${#p[@]};p[N5]=` networksetup -listnetworkserviceorder|awk ' NR>1 { sub(/^\([0-9]+\) /,"");n=$0;getline;} $NF=="'${p[26]}')" { sub(/.$/,"",$NF);print n;exit;} ' `;f=('\n%s: %s\n' '\n%s\n\n%s\n' '\nRAM details\n%s\n' %s\ %s '%s\n'"${p[50]}"'%s\n' '%s (UID %s) is using %s %s' '\nContents of %s\n   '"${p[50]}"'mod date: %s\n   '"${p[50]}"'checksum: %s\n%s\n' '\n   ...and %s more line(s)\n' );S0() { echo ' { q=$NF+0;$NF="";u=$(NF-1);$(NF-1)="";gsub(/^ +| +$/,"");if(q>='${p[$1]}') printf("'"${f[5]}"'",$0,u,q,"'${p[$2]}'");} ';};s=(' s/[0-9A-Za-z._]+@[0-9A-Za-z.]+\.[0-9A-Za-z]{2,4}/EMAIL/g;/faceb/s/(at\.)[^.]+/\1NAME/g;/\/Shared/!s/(\/Users\/)[^ /]+/\1USER/g;s/[-0-9A-Fa-f]{22,}/UUID/g;' ' s/^ +//;/de: S|[nst]:/p;' ' {sub(/^ +/,"")};/er:/;/y:/&&$2<'${p[46]} ' 1s/://;3,6d;/[my].+:/d;s/^ {4}//;H;${ g;s/\n$//;/s: (E[^m]|[^EO])|x([^08]|02[^F]|8[^0])/p;} ' ' 5h;6{ H;g;/P/!p;} ' ' ($1~/^Cy/&&$3>'${p[47]}')||($1~/^Cond/&&$2!~/^N/) ' ' /:$/{ N;/:.+:/d;s/ *://;b0'$'\n'' };/^ *(V.+ [0N]|Man).+ /{ s/ 0x.... //;s/[()]//g;s/(.+: )(.+)/ (\2)/;H;};$b0'$'\n'' d;:0'$'\n'' x;s/\n\n//;/Apple[ ,]|Genesy|Intel|SMSC/d;s/\n.*//;/\)$/p;' ' s/^.*C/C/;H;${ g;/No th|pms/!p;} ' '/= [^GO]/p' '{$1=""};1' ' /Of/!{ s/^.+is |\.//g;p;} ' ' $0&&!/ / { n++;print;} END { if(n<10) print "com.apple.";} ' ' { sub(/ :/,"");print|"tail -n'${p[48]}'";} ' ' NR==2&&$4<='${p[49]}' { print $4;} ' ' END { $2/=256;if($2>='${p[15]}') print int($2) } ' ' NR!=13{next};{sub(/[+-]$/,"",$NF)};'"`S0 21 22`" 'NR!=2{next}'"`S0 37 17`" ' NR!=5||$8!~/[RW]/{next};{ $(NF-1)=$1;$NF=int($NF/10000000);for(i=1;i<=3;i++){$i="";$(NF-1-i)="";};};'"`S0 19 20`" 's:^:/:p' '/\.kext\/(Contents\/)?Info\.plist$/p' 's/^.{52}(.+) <.+/\1/p' ' /Launch[AD].+\.plist$/ { n++;print;} END { if(n<200) print "/System/";} ' '/\.xpc\/(Contents\/)?Info\.plist$/p' ' NR>1&&!/0x|\.[0-9]+$|com\.apple\.launchctl\.(Aqua|Background|System)$/ { print $3;} ' ' /\.(framew|lproj)|\):/d;/plist:|:.+(Mach|scrip)/s/:.+//p ' '/^root$/p' ' !/^\/[AD]|\/Contents\/.+\/Contents\/|\.prefP/&&/\/(Lib|usr).+\/(.+\.lproj|Contents|Info\.plist|Resources)|\.framework$/ { n++;sub(/\/Info\.plist$/,"");sub(/\/([A-Za-z_]+\.lproj|Contents|Resources|Versions)(\/.+)?/,"");print|"sort|uniq";} END { if(n<1100) print "/System/";} ' '/\.dylib$/p' ' /Temp|emac/{next};/(etc|Preferences|Launch[AD].+)\// { sub(".(/private)?","");n++;print;} END { split("'"${p[41]}"'",b);split("'"${p[42]}"'",c);for(i in b) print b[i]".plist\t"c[i];if(n<500) print "Launch";} ' ' /^\/(Ap|Dev|Inc|Prev)/d;/\.(component|mdimporter|plugin|qlgenerator|saver|wdgt)$/p;' 's/Pr.+n //p' ' BEGIN{FS=":"};{ if($1~/\.kext$/) { s=system("'"${p[51]}"'\\ :OSBundleRequired "$1"/*/I*|grep -q Sa");if(!s) $1=$1" S";printf("'"${f[4]}"'",$1,$2);} else print;} ' p '{print $3"\t"$1}' 's/\'$'\t''.+//p' 's/1/On/p' '/Prox.+: [^0]/p' '$2>'${p[43]}'{$2=$2-1;print}' ' BEGIN { i="'${p[26]}'";M1='${p[16]}';M2='${p[18]}';M3='${p[31]}';M4='${p[32]}';} !/^A/{next};/%/ { getline;if($5<M1) a="user "$2"%, system "$4"%";} /disk0/&&$4>M2 { b=$3" ops/s, "$4" blocks/s";} $2==i { if(c) { d=$3+$4+$5+$6;next;};if($4>M3||$6>M4) c=int($4/1024)" in, "int($6/1024)" out";} END { if(a) print "CPU: "a;if(b) print "I/O: "b;if(c) print "Net: "c" (KiB/s)";if(d) print "Net errors: "d" packets/s";} ' ' /r\[0\] /&&$NF!~/^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./ { print $NF;exit;} ' ' !/^T/ { printf "(static)";exit;} ' '/apsd|BKAg|OpenD/!s/:.+//p' ' (/k:/&& $3!~/(255\.){3}0/)||(/v6:/&&$2!~/A/) ' ' $1~"lR"&&$2<='${p[25]}';$1~"li"&&$3!~"wpa2";' ' BEGIN { FS=":";p="uniq -c|sed -E '"'s/ +\\([0-9]+\\)\\(.+\\)/\\\2 x\\\1/;s/x1$//'"'";} { n=split($3,a,".");sub(/_2[01].+/,"",$3);print $2" "$3" "a[n]$1|p;b=b$1;} END { close(p);if(b) print("\n\t* Code injection");} ' ' NR!=4{next} {$NF/=10240} '"`S0 27 23`" ' END { if($3~/[0-9]/)print$3;} ' ' BEGIN { L='${p[36]}';} !/^[[:space:]]*(#.*)?$/ { l++;if(l<=L) f=f"\n   "$0;} END { F=FILENAME;if(!F) exit;if(!f) f="\n   [N/A]";"cksum "F|getline C;split(C, A);C=A[1];"stat -f%Sm "F|getline D;"file -b "F|getline T;if(T~/^Apple b/) { f="";l=0;while("'"${p[51]}"' "F|getline g) { l++;if(l<=L) f=f"\n   "g;};};if(T!~/^(AS.+ (En.+ )?text(, with v.+)?$|(Bo|PO).+ sh.+ text ex|XM)/) F=F"\n   '"${p[50]}"'"T;printf("'"${f[6]}"'",F,D,C,f);if(l>L) printf("'"${f[7]}"'",l-L);} ' ' s/^ ?n...://p;s/^ ?p...:/-'$'\t''/p;' 's/0/Off/p' ' END{print NR} ' ' /id: N|te: Y/{i++} END{print i} ' ' / / { print "'"${p[28]}"'";exit;};1;' '/ en/!s/\.//p' ' NR!=13{next};{sub(/[+-M]$/,"",$NF)};'"`S0 39 40`" ' $10~/\(L/&&$9!~"localhost" { sub(/.+:/,"",$9);print $1": "$9|"sort|uniq";} ' '/^ +r/s/.+"(.+)".+/\1/p' 's/(.+\.wdgt)\/(Contents\/)?Info\.plist$/\1/p' 's/^.+\/(.+)\.wdgt$/\1/p' ' /l: /{ /DVD/d;s/.+: //;b0'$'\n'' };/s: /{ /V/d;s/^ */- /;H;};$b0'$'\n'' d;:0'$'\n'' x;/APPLE [^:]+$/d;p;' ' /^find: /d;p;' "`S0 44 45`" ' BEGIN{FS="= "} /Path/{print $2} ' ' /^ *$/d;s/^ */   /;' ' s/^.+ |\(.+\)$//g;p ' '/\.(appex|pluginkit)\/Contents\/Info\.plist$/p' ' /2/{print "WARN"};/4/{print "CRITICAL"};' ' /EVHF|MACR|^s/d;s/^.+: //p;' ' $3~/^[1-9][0-9]{0,2}(\.[1-9][0-9]{0,2}){2}$/ { i++;n=n"\n"$1"\t"$3;} END { if(i>1) print n;} ' ' s/:[^:]+$//;s/ +([0-9]+)(.+)/\2: \1/p;' ' { gsub(/[()"]/,"",$3);if(!$3) $3="N/A";print $3;} ' ' /es: ./{ s/^.+://;b0'$'\n'' };/^ +C.+ted: +[NY]/H;/:$/b0'$'\n'' d;:0'$'\n'' x;/: +N/d;s/\n.+//p;' ' 1d;/:$/b0'$'\n'' $b0'$'\n'' /(D|^ *Loc.+): /{ s/^.+: //;H;};/(By|m): /H;d;:0'$'\n'' x;/[my]: [AM]|^\/Vo/d;s/(^|\n) [ -~]+//g;s/(.+)\n(.+)/\2:\1/;s/\n//g;/[ -~]/p;' );c1=(system_profiler pmset\ -g nvram fdesetup find syslog df vm_stat sar ps crontab iotop top pkgutil 'PlistBuddy 2>&1 -c Print\' whoami cksum kextstat launchctl smcDiagnose sysctl\ -n defaults\ read stat lsbom 'mdfind -onlyin /' ' for i in ${p[24]};do ${c1[18]} ${c2[27]} $i;done;' pluginkit scutil dtrace profiles sed\ -En awk /S*/*/P*/*/*/C*/*/airport networksetup mdutil lsof test osascript\ -e netstat mdls kextfind );S1() { printf kMDItemContentTypeTree=com.apple.$1;};S2() { printf 'L*/Ca*/com.ap*.Saf*/E*/* -d 1 -name In*t -exec '"${c1[14]}"' :'$1' {} \;|uniq';};c2=(com.apple.loginwindow\ LoginHook ' /L*/P*/loginw*' "'tell app \"System Events\" to get properties of login items'|tr , \\\n" "`S2 CFBundleDisplayName`" '~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \)' '-F \$Message -k Sender kernel -k Message CSeq "I/O e"|sort|uniq -c' :${p[35]} :Label '{/,}L*/{Con,Pref}* -type f ! -size 0 -name *.plist -exec plutil -s {} \;' "-f'%N: %l' Desktop L*/Keyc*" therm sysload boot-args status " -F '\$Time \$(RefProc): \$Message' -k Sender Req 'fsev|kern|launchd' -k RefProc Rne 'Aq|WebK' -k Message Rne '08012|Goog|ksadm|probe|Roame|SMC:|smcD|sserti|suhel| VALI|ver-r|xpma' -k Message Req 'abn|bad |Beac|caug|corru|dead[^bl]|FAIL|fail|GPU |hfs: Ru|idle ex|inval|jnl:|last value [1-9]|NVDA\(|pagin|pci pa|proc: t|Roamed|rror|SL|TCON|Throttli|tim(ed? ?|ing )o|WARN' " '-du -n DEV -n EDEV 1 10' 'acrx -o comm,ruid,%cpu' '-t1 10 1' '-f -pfc /var/db/r*/com.apple.*.{BS,Bas,Es,J,OSXU,Rem,up}*.bom' '{/,}L*/Lo*/Diag* -type f -regex .\*[cght] ! -name .?\* ! -name \*ag \( -exec grep -lq "^Thread c" {} \; -exec printf \* \; -o -true \) -execdir stat -f:%Sc:%N -t%F {} \;|sort -t: -k2 |tail -n'${p[38]} '/S*/*/Ca*/*xpc* >&- ||echo No' '-L /{S*/,}L*/StartupItems -type f -exec file {} +' "`S1 bundle`" "`S1 mach-o-dylib`" "`S2 ${p[35]}`" "/e*/{auto,{cron,fs}tab,hosts,{[lp],sy}*.conf,mach_i*/*,pam.d/*,ssh{,d}_config,*.local} {,/usr/local}/etc/periodic/*/* /L*/P*{,/*}/com.a*.{Bo,sec*.ap}*t {/S*/,/,}L*/Lau*/*t .launchd.conf" list getenv /Library/Preferences/com.apple.alf\ globalstate --proxy '-n get default' -I --dns -getdnsservers\ "${p[N5]}" -getinfo\ "${p[N5]}" -P -m\ / '' -n1 '-R -l1 -n1 -o prt -stats command,uid,prt' '--regexp --files com.apple.pkg.*|sort|uniq' -kl -l -s\ / '-R -l1 -n1 -o mem -stats command,uid,mem' '+c0 -i4TCP:0-1023' com.apple.dashboard\ layer-gadgets '-d /L*/Mana*/$USER&&echo On' '-app Safari WebKitDNSPrefetchingEnabled' "+c0 -l|awk '{print(\$1,\$3)}'|sort|uniq -c|sort -n|tail -1|awk '{print(\$2,\$3,\$1)}'" -m 'L*/{Con*/*/Data/L*/,}Pref* -type f -size 0c -name *.plist.???????|wc -l' kern.memorystatus_vm_pressure_level '3>&1 >&- 2>&3' " -F '\$Time \$Message' -k Sender kernel -k Message CSeq 'n Cause: -' " -i '-app Safari UserStyleSheetEnabled' -name\ kMDItem${p[35]} '-nl -print -print-diagnostics' );N1=${#c2[@]};for j in {0..14};do c2[N1+j]=SP${p[j]}DataType;done;N2=${#c2[@]};for j in 0 1;do c2[N2+j]="-n ' syscall::'${p[33+j]}':return { @out[execname,uid]=sum(arg0) } tick-10sec { trunc(@out,1);exit(0);} '";done;l=(Restricted\ files I/O\ errors 'Elapsed time (s)' POST Battery Safari\ extensions Bad\ plists 'High file counts' User Heat System\ load boot\ args FileVault Diagnostic\ reports Log 'Free space (MiB)' 'Swap (MiB)' Activity 'CPU per process' Login\ hook 'I/O per process' Mach\ ports kexts Daemons Agents XPC\ cache Startup\ items Admin\ access Root\ access Bundles dylibs Stylesheet Font\ issues Inserted\ dylibs Firewall Proxies DNS TCP/IP Wi-Fi Profiles Root\ crontab User\ crontab 'Global login items' 'User login items' Spotlight Memory Listeners Widgets Parental\ Controls Prefetching Nets Descriptors App\ extensions Lockfiles Memory\ pressure SMC Shutdowns Bad\ kexts );N3=${#l[@]};for i in {0..8};do l[N3+i]=${p[5+i]};done;N4=${#l[@]};for j in 0 1;do l[N4+j]="Current ${p[29+j]}stream data";done;A0() { id -G|grep -qw 80;v[1]=$?;((v[1]==0))&&sudo true;v[2]=$?;v[3]=`date +%s`;clear >&-;date '+Start time: %T %D%n';};for i in 0 1;do eval ' A'$((1+i))'() { v=` eval "${c1[$1]} ${c2[$2]}"|'${c1[30+i]}' "${s[$3]}" `;[[ "$v" ]];};A'$((3+i))'() { v=` while read i;do [[ "$i" ]]&&eval "${c1[$1]} ${c2[$2]}" \"$i\"|'${c1[30+i]}' "${s[$3]}";done<<<"${v[$4]}" `;[[ "$v" ]];};A'$((5+i))'() { v=` while read i;do '${c1[30+i]}' "${s[$1]}" "$i";done<<<"${v[$2]}" `;[[ "$v" ]];};A'$((7+i))'() { v=` eval sudo "${c1[$1]} ${c2[$2]}"|'${c1[30+i]}' "${s[$3]}" `;[[ "$v" ]];};';done;A9(){ v=$((`date +%s`-v[3]));};B2(){ v[$1]="$v";};for i in 0 1;do eval ' B'$i'() { v=;((v['$((i+1))']==0))||{ v=No;false;};};B'$((3+i))'() { v[$2]=`'${c1[30+i]}' "${s[$3]}"<<<"${v[$1]}"`;} ';done;B5(){ v[$1]="${v[$1]}"$'\n'"${v[$2]}";};B6() { v=` paste -d: <(printf "${v[$1]}") <(printf "${v[$2]}")|awk -F: ' {printf("'"${f[$3]}"'",$1,$2)} ' `;};B7(){ v=`grep -Fv "${v[$1]}"<<<"$v"|sort`;};C0() { [[ "$v" ]]&&sed -E "$s"<<<"$v";};C1() { [[ "$v" ]]&&printf "${f[$1]}" "${l[$2]}" "$v"|sed -E "$s";};C2() { v=`echo $v`;[[ "$v" != 0 ]]&&C1 0 $1;};C3() { v=`sed -E "${s[63]}"<<<"$v"`&&C1 1 $1;};C4() { echo "Part $((++P)) of 8 done at $((`date +%s`-v[3])) sec">&4;};for i in 1 2 7 8;do for j in 0 2 3;do eval D$i$j'(){ A'$i' $1 $2 $3; C'$j' $4;};';done;done;{ A0;D20 0 $((N1+1)) 2;D10 0 $N1 1;B0;C2 27;B0&&! B1&&C2 28;D12 15 37 25 8;A1 0 $((N1+2)) 3;C0;D13 0 $((N1+3)) 4 3;D23 0 $((N1+4)) 5 4;D13 0 $((N1+9)) 59 $((N3+4));for i in 0 1 2;do D13 0 $((N1+5+i)) 6 $((N3+i));done;D13 0 $((N1+8)) 71 $((N3+3));D13 1 10 7 9;D13 1 11 8 10;B1&&D73 19 53 67 55;D22 2 12 9 11;D12 3 13 10 12;D23 4 19 44 13;D13 5 5 69 1;D13 5 54 30 56;C4;D23 5 14 12 14;C4;D22 6 36 13 15;D22 20 52 66 54;D22 7 37 14 16;D23 8 15 38 17;D22 9 16 16 18;C4;B1&&{ D82 35 49 61 51;D82 11 17 17 20;for i in 0 1;do D82 28 $((N2+i)) 45 $((N4+i));done;};C4;D22 12 44 54 45;D22 12 39 15 21;D13 40 58 32 57;A1 13 40 18;B2 4;B3 4 0 19;A3 14 6 32 0;B4 0 5 11;C4;A1 17 41 20;B7 5;C3 22;B4 4 6 21;A3 14 7 32 6;B4 0 7 11;B3 4 0 22;A3 14 6 32 0;B4 0 8 11;B5 7 8;B1&&{ A8 18 26 23;B7 7;C3 23;};A2 18 26 23;B7 7;C3 24;D13 4 21 24 26;B4 4 12 26;C4;for i in {0..3};do A1 0 $((N1+10+i)) 72;B7 12;B4 0 0 31;((i))&&{ B2 14;A4 39 57 70 14;B2 15;B6 14 15 4;};C3 $((N3+5+i));done;A1 24 22 29;B7 12;B2 14;A4 39 57 70 0;B2 15;B6 14 15 4;C3 29;C4;B3 4 13 27;A1 24 23 32;B7 13;C3 30;B3 4 0 65;A3 14 6 32 0;B4 0 16 11;A1 26 50 64;B7 16;C3 52;D13 25 37 32 33;A2 23 18 28;B2 16;A2 16 25 33;B7 16;B3 0 0 34;B2 21;A6 47 21&&C0;B1&&{ D73 21 0 32 19;D73 10 42 32 40;D82 29 35 46 39;};D23 14 1 62 42;D12 34 43 53 44;D12 22 20 32 25;D22 0 $((N1+14)) 51 32;D13 4 8 41 6;D12 21 28 35 34;D13 27 29 36 35;A2 27 32 39&&{ B2 19;A2 33 33 40;B2 20;B6 19 20 3;};C2 36;D23 38 55 68 50;D23 33 34 42 37;B1&&D83 35 45 55 46;D23 32 31 43 38;D12 36 47 32 48;D13 10 42 32 41;D13 37 2 48 43;A1 4 3 60;B2 30;A1 4 24 60;B2 31;B6 30 31 4;C3 5;D12 21 56 35 31;D12 21 48 49 49;B3 4 22 57;A1 21 46 56;B7 22;B3 0 0 58;C3 47;D22 4 4 50 0;D12 4 51 32 53;D23 22 9 37 7;A9;C2 2;C4;} 4>&2 2>/dev/null|pbcopy;exit 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    8. Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Click anywhere in the Terminal window and paste by pressing command-V. The text you pasted should vanish immediately. If it doesn't, press the return key.
    9. If you see an error message in the Terminal window such as "Syntax error" or "Event not found," enter
    exec bash
    and press return. Then paste the script again.
    10. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important. If you don't know the password, or if you prefer not to enter it, press the key combination control-C or just press return  three times at the password prompt. Again, the script will still run.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.
    11. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, there will be a series of messages in the Terminal window like this:
    Part 1 of 8 done at ... sec
    Part 8 of 8 done at ... sec
    The messages won't be spaced equally apart in time, but they give a rough indication of progress. Wait for the final message
    [Process completed]
    to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report the last message you saw. No harm will be done.
    12. When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    At the top of the results, there will be a line that begins with the words "Start time." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    13. When you post the results, you might see an error message on the web page: "You have included content in your post that is not permitted," or "You are not authorized to post." That's a bug in the forum software. Please post the test results on Pastebin, then post a link here to the page you created.
    14. This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.
    Copyright © 2014 by Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • Dynamic MC _level

    Hi, I am trying to create a dynamically generated MC with
    creatEmptyMovieClip(), and all works well. But looking the list of
    objects/variables in the show I can't seem to detect at what _level
    the clip is generated. I am using getNextHighestDepth() to set the
    level (see code below).
    Ultimately what I am hoping to happen is that each successive
    MC will be generate OVER (or on the _level above) the existing MC.
    Currently it looks like the existing MC is replaced when the new MC
    is generated.
    My next question would be (once I get this lot working) how
    do I then remove the MC that is under the newly generated MC. I
    imagine the RAM or processor wont mind if a few _levels of MCs are
    stacked up and this wont be running up more than about 20 _levels
    max. But for the purpose of best practice.
    Thanks guys. Your help is always greatly appreciated.

    More research into depth swapping and removal of MCs revealed
    an inability to repeatedly set the depth of a dynamically created
    MC. The code is called every 2 secs (for dev for now) via a
    setInterval(). One would expect the value of n to increase and it
    does, but that value does not get 'piped through' to the argument
    of the createEmptyMovieClip() method.
    The code below returns this output:
    first mc : 5
    n:5
    first mc : 5
    n:6
    first mc : 5
    n:7
    Any thoughts on why this happens, and ways around it, would
    be deeply appreciated. This is a huge stumbling block and my
    program was built on the assumption I could do something like this
    cheers
    mm66

  • How to ad link to slide show ? Help !!

    I have this slide show and am trying to add a link to each image loaded, can anyone help me with this ?
    I am new to this and have no clue how to go about this, so maybe you can help me with the completed code if you can !
    thanks to anyone that can help. Here is the code.....
    // set random # variables - each must be 0 for first 'while' loop below
    var randomNum = 0;
    var randomNumLast = 0;
    // parent container
    var container_mc = this.createEmptyMovieClip("container",0);
    // movie clip containers
    container_mc.createEmptyMovieClip("loader1_mc",2);
    container_mc.createEmptyMovieClip("loader2_mc",1);
    // preload watcher
    this.createEmptyMovieClip("watcher_mc",100);
    // load xml
    images_xml = new XML();
    images_xml.ignoreWhite=true;
    images_xml.onLoad = parse;
    images_xml.load("images.xml");
    function parse(success) {
        if (success) {
            imageArray = new Array();
            var root = this.firstChild;
            _global.numPause = Number(this.firstChild.attributes.timer * 1000);
            _global.order = this.firstChild.attributes.order;
            _global.looping = this.firstChild.attributes.looping;
            _global.fadetime = Number(this.firstChild.attributes.fadetime);
            _global.xpos = Number(this.firstChild.attributes.xpos);
            _global.ypos = Number(this.firstChild.attributes.ypos);
            var imageNode = root.lastChild;
            var s=0;
            while (imageNode.nodeName != null) {
                imageData = new Object;
                imageData.path = imageNode.attributes.path;
                imageArray[s]=imageData;
                imageNode = imageNode.previousSibling;
                s++;
            // place parent container
            container_mc._x = _global.xpos;
            container_mc._y = _global.ypos;
            // parse array
            imageArray.reverse();
            imageGen(imageArray);
        } else {
            trace('problem');
    // depth swapping
    function swapPlace(clip,num) {
        eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
    function loadImages(data,num) {
        if (i==undefined || i == 2) {
            i=2;
            createLoader(i,data,num);
            i=1;
        } else if (i==1) {
            createLoader(i,data,num);
            i=2;
    function createLoader(i,data,num) {
        thisLoader=eval("container_mc.loader"+i+"_mc");
        thisLoader._alpha=0;
        thisLoader.loadMovie(data[num].path);
        watcher_mc.onEnterFrame=function () {
            var picLoaded = thisLoader.getBytesLoaded();
            var picBytes = thisLoader.getBytesTotal();
            if (isNaN(picBytes) || picBytes < 4) {
                return;
            if (picLoaded / picBytes >= 1) {
                swapPlace("container_mc.loader2_mc",1);
                alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
                timerInterval = setInterval(imageGen,_global.numPause,data);
                delete this.onEnterFrame;
    function imageGen(data) {
        // random, or sequential?
        if (_global.order=="random") {
            // choose random # between 0 and total number of images
            while (randomNum == randomNumLast) {
                randomNum = Math.floor(Math.random() * data.length);
                trace(randomNum);
            loadImages(data,randomNum);
            randomNumLast = randomNum;
        } else if (_global.order=="sequential") {
            // start at 0, increment to total number of images, then drop back to zero when done
            if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
            loadImages(data,p);
            p++;
        } else {
            trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
        clearInterval(timerInterval);
    stop();

    It doesn't look like the xml file matches the code.  While folks here like to help, there's a point where the effort is fairly time consuming and it becomes doing your design work for you, which is what we normally do for a living.  Your best bet will be to find something that has all of the features you want included in it.  If you are willing to spend a little money, you can probably find one fairly inexpensive that you can tailor to your needs without having to edit the file code at all.
    You can always wait to see if someone else responds.

  • What is wrong with as3

    this is not a question about 'how i do X'. is rather a 'discussion' (flame or whatever, but to defend or argue about aspects, not people) about 'what is wrong with as3' and what aspects whould be taken into consideration for updates. right now i am using as3, and since i paid for this license, i choose this tool over some alternatives and i am using it to do stuff for other people who pay me to do it, i think it can be helpful for all of us if some actions are started in the right direction. i have already posted about 'all people in adobe are dumbasses that do not know how to make a scripting tool and are messing up my work', but i was pissed at the time (i still am pissed) but i believe this is not the right aproach. instead, if this goes to the right people in adobe, we all may get something in the future, like better and easier todo apps and web presentations.
    pre: not only about the as3 specification, but COMPLY with the specification that you set. for example, some time ago there were problems with matrix transforms. this was corrected later with a patch. but this means it is not even doing what is is supposed to do
    1. scriptable masks and movement, sprites and child sprites: there is a sprite with a mask, the mask is a shape drawn via script, something like
    somemask=new shape();
    somemask.graphics.beginfill();
    (...etc)
    somesprite.mask=somemask;
    just like that. now add some child sprites to 'somesprite', and make 'somesprite' move, scale and rotate. there you will have something like a kaleidoscope, but not what you expected to do with your script. as the child sprites move in the parent mask, you will see that the child sprites appear or dissapear kind of randomly, and if the child sprites are textfields, it may be that the text is rendered outside the mask, or partially rendered outside the mask (as in only part of the text), rendered with the wrongf rotation or in the wrong place. some child sprites are clipped correctly, some dissapear totally when only a part should dissapear (clipped) etc.
    way around: have not tried it yet, but i have the impression that bitmaps have different criteria for clipping, so i am thinking of trying this: appli an empty filter (a filter with params so it does not have any effect on the sprite or in the textfield) so the sprite is rendered as bitmap before doing anything else with it. as i said, i have not done it yet, but it may be a way around this problem, to avoid all this inconsistency with clipping
    1-b. inconsistency between hierarchy and coordinates, specially masks: you apply a mask to a sprite, yet the sprite has a set of coordinates (so 'x' in the sprite means an x relative to its container), yet the mask applied to the very same sprite, as another reference as reference for coordinates (like the stage)
    2. painting via script: in any other languaje, in any other situation, something like:
    beginFill(params);
    (...stuff 1)
    endFill();
    beginFill(params);
    (...stuff 2)
    endFill();
    (...etc)
    means: render region of block 1, then render region of block 2 etc, and no matter what, it should be consistent, since there is noplace for ambiguity. if you read it, you may think what that means, even if you dont run it you may have an idea of the picture you want to draw, but not with as3. as3 somehow manages to screw something that simple, and mixes all the blocks, and somehow uses the boundaries of one block as boundaries for other block. is like all blocks are dumped into whatever, and then uses all lines defined into it as boundaries for a unique block. it changes all boundaries and generates inconsistency between what is shown and redraw regions of the resulting picture, like lines that go to the end of the screen and then dont go away in the next frames, even tough the beginfill endfill block should prevent it
    3. event flow: i dont know what was the policy behind as3 event flow design. it is in no way similar or an extension to previous event flow, neither with any event flow in any other plattform. i dont know how most people start with as3; in my case, i unpacked, installed and when i tried to do something with what i already knew i could not, so i started reading the as3 docs, and since is like 800 pages long, i just read the basics and the rest i would 'wing it'. in the part of the event flow, there was something about bubbling and stuff, it was not clear at all and when i tried to do what is was said in the documentation (like preventing events to 'bubble', as is called in the documentation), i could not see any effect but i could see it was a mess. flash is not the only thing out there to work with pictures or to work with mouse events, but is the only one that deals with things like 'target' and 'currentTarget'. my first experience on needing this was when i was dealing with my own event handlers (so the only thing that had control over mouse was the stage, and i would admin everything via script). there were events generated everywhere, the stage got events that were not genrated directly over the stage, but got there not with stage coordinates but the coordinates relative to the sprite that generated the event. so if i hover the mopuse over the stage, and the stage has some things on it how does it work? i get multiple event calls, like it was hovering multiple times over the stage in a single frame, but in each call with different coordinates? and what if i set all child sprites as mouseenabled=false or compare like 'if (event.target != event.currenttarget)', what if i move the mouse over a child, does it prevent the move mouse event at all? or does it filter only the event call with only stage coordinates? in my case, every time i move over another clip (with mouseenabled = true), the stage gets it as 'mouse up', even tough there was never a mouse release, what the hell? do even the people at adobe know how to handle events with their own tool when they require it? why does an event 'bubble' when i have not specifically tell it to do it? mi thought is that this event flow was very poorly conceived, and tough the intention may have been that there were different cases and it shopuld cover all cases, they actually introduced new problems that were not present in traditional ways to handle it, and it is neither the easier way to handle things, and this way, a very simple problem turns into a very ugly thing because it must handle things that were not neccesary to handle, or were implicit in other situations.
    4. legacy: since as3, all interaction is different, and if you want to do things in the new plattform, using the new features, what you already knew just goes to the garbage can. when a new tool arrives, it should be an extension to previous tools (which is a reason to update instead of just buying a new tool from a different vendor). if everything i had or knew just means nothing from now on, then i can not say 'i know flash script', and my previous knowledge gives me no advantage when aproaching the new version. as3 is a new aproach that requires doc reading and stuff, even if you knew something about previous as specifications or other oo languajes. if you decide to change things from now on, like the things mentioned in this post, instead of just throwing away everything the users alerady knew about the tool, do like in java releases, they mark some things as 'deprecated', they keep working as they should, give a warning, but also a message saying this feature is deprecated, we suggest you use this library instead.
    5. lack of previous functionality: if you 'update' something, it meand all previos functionality is still there (probably improved, but not with bugs if it was working fine), plus something else. now it seems backwards, there are some things that could be done in previous versions but not in this one, like 'duplicatemovieclip'
    6. inconsistency with scripting/programming paradigms: (ok, fancy work, but fits perfectly here): as3 proposed ways to handle things, but the people who designed it got 'too creative', and they did something that is not consistent neither with previous versions of as or with other languajes. the documentations is full of things like 'it looks like x languaje or languaje family, but instead of using XXX word, you must use YYY'. great, what is this? namespaces 'work like', but 'differently' for example from java, .net, .c. its got the idea that a namespace means a grouped functionality but there are rules about where should be placed the file (ok, java has this also, .net takes care of it automatically if all files are registered in the project), but what you got is a mess that 'if you know other languajes you got the general idea, but nonetheless, even if you knew this or previosu versions of as, you still have to read whatever we decided arbitrarily just to be different'. namespaces, event handling, vars definition which is not like previous scripting neither like fully typed languajes.. is just a mess.
    7. lack of scripting and graphics integration: unlike flash and adobe tools that just got on the graphics side leaving all the scripting integratuion apart, most tools from other vendors integrate very well interacton with what is on the screen. the script editor: very poor. autocompletion? a drop down list that does not heklp at all, appears in the wrong places, and when you need it to go, it does not go (so if i want to move away from the uncalled drop down list, i have to click somewhere else, making developement slowewr instead of helping, so the drop down list does not capture all events when i dont want to). in other ides you double click somewhere and it will go to the part of code relevant to that event or whatever. for example microsoft tools, ok i am antimicrosoft, and one of the reasons was that when windows 95 got to market proposing itself as the ONLY pc os you could use if you wanted to keep useing the apps you already had, it was a lousy product full of flaws but you had to keep using it because you had no choice. what is so different from what is happening with flash just now? yet the ide of c# is awesome, works very well and seems reliable.
    adobe people: not all user are designers that just make pretty pictures. if it is not intended for scripting then why is it there. and if there are corrections to be done, they should patch all versions, not only the last one. previous version users also paid for their versions.

    Well, there is no point in arguing.
    I personally believe AS3 does exactly what it promises to do within limits (read: reasonable limits) of ECMA type of language. And sometimes it doesn’t do what we expect it to for it cannot possibly emulate everyone’s thinking process. The task, I guess, is to learn to think in terms of AS3 – not to try to make AS3 think like us. No language covers all the grounds. And no, it is not Java - with no negative or positive connotation. It is what it is. Period. I just hope that AS5 will be more Java like.
    You are right about the fact that it is not necessary to know all the aspects of language in order to perform the majority of tasks. But it is paramount to have a clear idea about such fundamental concepts as display list model and events. For instance, depth swap has no meaning in terms of AS3 because display list object stacking is controlled automatically and there is no need for all these jumping through hoops one has to perform in order to control depth in AS2. There no more gaps in depths and one always know where to find things.
    Similarly, there is no point in having duplicateMovieClip method. More conventional OOP ways of object instantiation accomplishes just that and much more. Just because OOP object instantiation needs to be learned doesn’t mean past hacks have place in modern times. duplicateMovieClip is a horse carriage standing next to SUV. What one should choose to travel?
    Events are implemented to the tee in the context of ECMA specifications. I consider Events model as very solid, it works great (exactly as expected) and never failed me. True, it takes time to get used to it. But what doesn’t?
    By the way, speaking about events, contrary to believe in Adobe’s inconsideration to their following. Events are implemented with weakly reference set to false although it would be better to have it set to true. I think this is because there are smart and considerate people out there who knew how difficult it would be for programming novices to deal with lost listeners.
    I think AS3 is million times better than AS2. And one of the reasons it came out this way is that Adobe made a very brave and wise decision to break totally loose from AS2’s inherent crap. They have created a totally new and very solid language. If they had tried to make it backward compatible – it would be a huge screw up, similar to how our friends at Microsoft are prostituting VB and VBA – extremely irritating approach IMHO.
    Also, Flash legacy issues shouldn’t be overlooked. Flash did not start as a platform for programmers. Entire timeline concept in many ways is not compatible with the best OOP practices and advancements. I think for anyone who is used to writing classes the very fact of coding on timeline sounds awkward. It feels like a hack (and AS2 IS a pile of hacks) – the same things can be nicely packaged into classes and scale indefinitely. As such I wouldn’t expect Adobe to waste time on hacking timeline concept issues by making smarter editor. They have made a new one – FlexBuilder – instead. Serious programmers realize very soon that Flash IDE is not for developing industrial strength applications anyway. So, why bother with channeling great minds into polishing path to the dead end?
    I would like to state that all this is coming form a person who knew Flash when there was no AS at all. And I applaud every new generation of this wonderful tool.
    I believe Adobe does a great job making transition from timeline paradigm to total OOP venue as smooth as possible. And no, they don’t leave their devoted followers behind contrary to many claims. They are working on making developing Flash applications as easy as possible for people of all walks. Welcome Catalyst!
    Of course there is not enough information about AS3 capabilities and features. But, on the other hand, I don’t know any area of human kind activities that does.

  • Swf not playing in browser

    Hi. My site works perfectly when played locally, but now that it is on a test server my swf has disappeared. The swf is an empty shell in which an xml file is played. I have encountered this before and have fixed it, but I cannot find where my code is wrong this time. Any ideas?
    http://www.d1082919.mydomainwebhost.com/test/about.html

    thanks. Here is the code from the fla:
    /* Crossfading slide show   */
    /* Author: Todd Dominey     */
    /* http://whatdoiknow.org   */
    /* http://domineydesign.com */
    // set random # variables - each must be 0 for first 'while' loop below
    var randomNum = 0;
    var randomNumLast = 0;
    // parent container
    var container_mc = this.createEmptyMovieClip("container",0);
    // movie clip containers
    container_mc.createEmptyMovieClip("loader1_mc",2);
    container_mc.createEmptyMovieClip("loader2_mc",1);
    // preload watcher
    this.createEmptyMovieClip("watcher_mc",100);
    // load xml
    images_xml = new XML();
    images_xml.ignoreWhite=true;
    images_xml.onLoad = parse;
    images_xml.load("images.xml");
    function parse(success) {
    if (success) {
    imageArray = new Array();
    var root = this.firstChild;
    _global.numPause = Number(this.firstChild.attributes.timer * 1000);
    _global.order = this.firstChild.attributes.order;
    _global.looping = this.firstChild.attributes.looping;
    _global.fadetime = Number(this.firstChild.attributes.fadetime);
    _global.xpos = Number(this.firstChild.attributes.xpos);
    _global.ypos = Number(this.firstChild.attributes.ypos);
    var imageNode = root.lastChild;
    var s=0;
    while (imageNode.nodeName != null) {
    imageData = new Object;
    imageData.path = imageNode.attributes.path;
    imageArray[s]=imageData;
    imageNode = imageNode.previousSibling;
    s++;
    // place parent container
    container_mc._x = _global.xpos;
    container_mc._y = _global.ypos;
    // parse array
    imageArray.reverse();
    imageGen(imageArray);
    } else {
    trace('problem');
    // depth swapping
    function swapPlace(clip,num) {
    eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
    function loadImages(data,num) {
    if (i==undefined || i == 2) {
    i=2;
    createLoader(i,data,num);
    i=1;
    } else if (i==1) {
    createLoader(i,data,num);
    i=2;
    function createLoader(i,data,num) {
    thisLoader=eval("container_mc.loader"+i+"_mc");
    thisLoader._alpha=0;
    thisLoader.loadMovie(data[num].path);
    watcher_mc.onEnterFrame=function () {
    var picLoaded = thisLoader.getBytesLoaded();
    var picBytes = thisLoader.getBytesTotal();
    if (isNaN(picBytes) || picBytes < 4) {
    return;
    if (picLoaded / picBytes >= 1) {
    swapPlace("container_mc.loader2_mc",1);
    alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
    timerInterval = setInterval(imageGen,_global.numPause,data);
    delete this.onEnterFrame;
    function imageGen(data) {
    // random, or sequential?
    if (_global.order=="random") {
    // choose random # between 0 and total number of images
    while (randomNum == randomNumLast) {
    randomNum = Math.floor(Math.random() * data.length);
    trace(randomNum);
    loadImages(data,randomNum);
    randomNumLast = randomNum;
    } else if (_global.order=="sequential") {
    // start at 0, increment to total number of images, then drop back to zero when done
    if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
    loadImages(data,p);
    p++;
    } else {
    trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
    clearInterval(timerInterval);
    stop();
    and here is the code from the xml file:
    <!-- 
    'timer' :: number of seconds between each image transition
    'order' :: how you want your images displayed. choose either 'sequential' or 'random'
    'looping' :: if the slide show is in sequential mode, this stops the show at the last image (use 'yes' for looping, 'no' for not)
    'fadeTime' :: velocity of image crossfade. Increment for faster fades, decrement for slower. Approximately equal to seconds.
    'xpos' :: _x position of all loaded clips (0 is default)
    'ypos' :: _y position of all loaded clips (0 is default)
    -->
    <gallery timer="4" order="sequential" fadetime="2" looping="yes" xpos="0" ypos="0">
    <image path="images/loop_1.jpg" />
    <image path="images/loop_2.jpg" />
    <image path="images/loop_3.jpg" />
    </gallery>

  • Using a popup as a progress indicator.

    Hi All,
    I'm using Jdeveloper REL 1 (11.1.1.1.0)
    I'm relatively new to ADF development.
    Here's my use case:
    1. Display a set of records that will be processed.
    2. User selects OK button to process records
    3. A popup is launched displaying a progress indicator, in my case I went with an animated gif.
    4. After the popup is launched, execute some code to process the records.
    5. After processing code completes, close the popup and refresh the page that launched the popup.
    The problem I'm having is, my method is executed before the popup displays and I need it to run after the popup is displayed. Currently, I have the popup content is in a dynamic region that swaps out an empty task flow for the taskflow that contains the progress indicator jsff fragment. The method to be executed is configured as an executable in the page fragments pagedef file. It's obvious to me now that all the executables are executed during the prepare model phase and before the page is rendered. How do I work around this, or is there a different way to approach this problem?
    I've also tried launching the popup programatically from a managed bean and then run the processing code, however, once the popup is launched, nothing else happens until the popup is closed.
    Thank you,
    Edited by: rvlong on Apr 6, 2010 1:06 PM

    See if these help:
    http://andrejusb.blogspot.com/2008/08/glasspane-in-adf-faces-rc.html
    http://www.oracle.com/technology/products/jdev/tips/fnimphius/glasspane/glasspane.html

  • Flash Product Rotators

    I am modifying a rotator that was used on the old site I
    worked with. Go to orderpaintball.com and look on the right hand
    side of the page, you will see a flash rotator displaying our
    products. This runs off of an XML file and is very flexible when
    hanging products.
    On the rotator I am trying to restrict the image size to
    150x112 px. The current rotator has no limit to the image size,
    thus allowing it to "blow up" the rotator. I have the following
    actionscript under it, but I need to know how to adjust the vlaues
    so it will restrict only to this size.
    // stage alteration
    Stage.scaleMode = "noScale";
    Stage.align = "LT";
    // set random # variables - each must be 0 for first 'while'
    loop below
    var randomNum = 0;
    var randomNumLast = 0;
    // movie clip containers
    this.createEmptyMovieClip("loader1_mc", 2, {_x:0, _y:0});
    this.createEmptyMovieClip("loader2_mc", 1, {_x:0, _y:0});
    this[loader1_mc]._x = 13;
    this[loader1_mc]._y = 31;
    // preload watcher
    this.createEmptyMovieClip("watcher_mc", 3);
    // load xml
    images_xml = new XML();
    images_xml.ignoreWhite = true;
    images_xml.onLoad = parse;
    images_xml.load(folders+"images.xml");
    function parse(success) {
    if (success) {
    imageArray = new Array();
    var root = this.firstChild;
    _global.numPause =
    Number(this.firstChild.attributes.timer*1000);
    _global.order = this.firstChild.attributes.order;
    _global.looping = this.firstChild.attributes.looping;
    loadMovie(this.firstChild.attributes.background,
    "ourMovieClip");
    _global.fadetime =
    Number(this.firstChild.attributes.fadetime);
    _root.adTitle = this.firstChild.attributes.topper;
    var imageNode = root.lastChild;
    var s = 0;
    while (imageNode.nodeName != null) {
    imageData = new Object();
    imageData.path = imageNode.attributes.path;
    imageData.link = imageNode.attributes.jpegURL;
    imageData.item = imageNode.attributes.itemTitle;
    imageData.note = imageNode.attributes.note;
    imageData.price = imageNode.attributes.price;
    imageArray[s] = imageData;
    imageNode = imageNode.previousSibling;
    s++;
    imageArray.reverse();
    imageGen(imageArray);
    } else {
    trace('problem');
    // depth swapping
    function swapPlace(clip, num) {
    eval(clip).swapDepths(eval("loader"+num+"_mc"));
    function loadImages(data, num) {
    if (i == undefined || i == 2) {
    i = 2;
    createLoader(i, data, num);
    i = 1;
    } else if (i == 1) {
    createLoader(i, data, num);
    i = 2;
    function createLoader(i, data, num) {
    thisLoader = eval("loader"+i+"_mc");
    thisLoader._alpha = 0;
    thisLoader.loadMovie(data
    .path);
    _root.linkage = data
    .link;
    _root.itemNote = data
    .note;
    _root.itemText = +data
    .item+"\n"+data
    .price;
    watcher_mc.onEnterFrame = function() {
    var picLoaded = thisLoader.getBytesLoaded();
    var picBytes = thisLoader.getBytesTotal();
    if (isNaN(picBytes) || picBytes<4) {
    return;
    if (picLoaded/picBytes>=1) {
    swapPlace("loader2_mc", 1);
    thisLoader.alpha(_global.fadeTime, 100);
    timerInterval = setInterval(imageGen, _global.numPause,
    data);
    delete this.onEnterFrame;
    function imageGen(data) {
    // start at 0, increment to total number of images, then
    drop back to zero when done
    if (p == undefined || p == data.length &&
    _global.looping == "yes") {
    p = 0;
    } else {
    break;
    loadImages(data, p);
    p++;
    clearInterval(timerInterval);
    stop();
    Can anybody help me out on this? If you know how, please post
    to this topic or email me at [email protected]
    Thank you,
    Sean

    you'll be wanting to reference the _width and _height
    properties of the movieclip holding the image, and without delving
    too deeply it would seem to be in your createLoader function and
    you;d reference the properties in the same manner you're already
    doing for _alpha
    i.e.
    thisLoader._alpha = 0;
    thisLoader._width = 150;
    thisLoader._height = 112;
    but theres a lot of odd looking code there so its hard to
    tell.

  • XML add title

    I found this on intenet and meets my needs, except I want to
    add Title
    // set random # variables - each must be 0 for first 'while'
    loop below
    var randomNum = 0;
    var randomNumLast = 0;
    // parent container
    var container_mc = this.createEmptyMovieClip("container",0);
    // movie clip containers
    container_mc.createEmptyMovieClip("loader1_mc",2);
    container_mc.createEmptyMovieClip("loader2_mc",1);
    container_mc.loader1_mc.createTextField("my_txt", 10, 10, 10,
    520, 100);
    container_mc.loader1_mcmy_txt.border = true;
    container_mc.loader1_mcmy_txt.multiline = true;
    container_mc.loader1_mcmy_txt.wordWrap = true;
    container_mc.loader1_mcmy_txt.textColor = "0xFFFFFF";
    container_mc.loader2_mc.createTextField("my_txt2", 10, 10,
    10, 320, 100);
    container_mc.loader2_mcmy_txt2.border = true;
    container_mc.loader2_mcmy_txt2.multiline = true;
    container_mc.loader2_mcmy_txt2.wordWrap = true;
    container_mc.loader2_mcmy_txt2.textColor = "0xFFFFFF";
    // preload watcher
    this.createEmptyMovieClip("watcher_mc",100);
    // load xml
    images_xml = new XML();
    images_xml.ignoreWhite=true;
    images_xml.onLoad = parse;
    images_xml.load("images.xml");
    trace(images_xml);
    function parse(success) {
    if (success) {
    imageArray = new Array();
    var root = this.firstChild;
    _global.numPause = Number(this.firstChild.attributes.timer *
    1000);
    _global.order = this.firstChild.attributes.order;
    _global.looping = this.firstChild.attributes.looping;
    _global.fadetime =
    Number(this.firstChild.attributes.fadetime);
    _global.xpos = Number(this.firstChild.attributes.xpos);
    _global.ypos = Number(this.firstChild.attributes.ypos);
    var imageNode = root.lastChild;
    var s=0;
    while (imageNode.nodeName != null) {
    imageData = new Object;
    imageData.path = imageNode.attributes.path;
    container_mc.loader1_mc.my_txt.text =
    imageNode.attributes.title;
    container_mc.loader2_mc.my_txt2.text =
    imageNode.attributes.title;
    imageArray[s]=imageData;
    imageNode = imageNode.previousSibling;
    s++;
    // place parent container
    container_mc._x = _global.xpos;
    container_mc._y = _global.ypos;
    // parse array
    imageArray.reverse();
    imageGen(imageArray);
    } else {
    trace('problem');
    // depth swapping
    function swapPlace(clip,num) {
    eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
    function loadImages(data,num) {
    if (i==undefined || i == 2) {
    i=2;
    createLoader(i,data,num);
    i=1;
    } else if (i==1) {
    createLoader(i,data,num);
    i=2;
    function createLoader(i,data,num) {
    thisLoader=eval("container_mc.loader"+i+"_mc");
    thisLoader._alpha=0;
    thisLoader.loadMovie(data
    .path);
    watcher_mc.onEnterFrame=function () {
    var picLoaded = thisLoader.getBytesLoaded();
    var picBytes = thisLoader.getBytesTotal();
    if (isNaN(picBytes) || picBytes < 4) {
    return;
    if (picLoaded / picBytes >= 1) {
    swapPlace("container_mc.loader2_mc",1);
    alphaTween = new mx.transitions.Tween(thisLoader, "_alpha",
    mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
    timerInterval = setInterval(imageGen,_global.numPause,data);
    delete this.onEnterFrame;
    function imageGen(data) {
    // random, or sequential?
    if (_global.order=="random") {
    // choose random # between 0 and total number of images
    while (randomNum == randomNumLast) {
    randomNum = Math.floor(Math.random() * data.length);
    trace(randomNum);
    loadImages(data,randomNum);
    randomNumLast = randomNum;
    } else if (_global.order=="sequential") {
    // start at 0, increment to total number of images, then
    drop back to zero when done
    if (p==undefined || p==data.length &&
    _global.looping=="yes") { p=0; } else { break; }
    loadImages(data,p);
    p++;
    } else {
    trace ("order attribute in xml isn't correct - must specify
    either 'random' or 'sequential'");
    clearInterval(timerInterval);
    stop();
    and XML
    <!--
    'timer' :: number of seconds between each image transition
    'order' :: how you want your images displayed. choose either
    'sequential' or 'random'
    'looping' :: if the slide show is in sequential mode, this
    stops the show at the last image (use 'yes' for looping, 'no' for
    not)
    'fadeTime' :: velocity of image crossfade. Increment for
    faster fades, decrement for slower. Approximately equal to seconds.
    'xpos' :: _x position of all loaded clips (0 is default)
    'ypos' :: _y position of all loaded clips (0 is default)
    -->
    <gallery timer="5" order="sequential" fadetime="2"
    looping="yes" xpos="0" ypos="0">
    <image title="title 1" path="images/calliandra.jpg" />
    <image title="title 2" path="images/dombeya.jpg" />
    <image title="title 3" path="images/strelitzia.jpg" />
    <image title="title 4" path="images/trensa.jpg" />
    <image title="title 5" path="images/treeflower.jpg" />
    <image title="title 6" path="images/bellflowers.jpg" />
    </gallery>
    I have try to add title but it fades title with image. Untill
    image is fade in title fades out and disappear. Help please.

    what do you mean "embedding the fint/characters in the textfield"  plz explain in details and below screen shot.

  • XML Driven rotating banner ad question

    Hi everyone i a very ametur flash designer,
    At the moment i am trying to make a flash banner that rotates banners out randomly and also when the guest sees the a banner they are intrested in they can click on it and it will take them to the respective link. I followed some tutorials out there on how to use xml and flash together and came up with this for my flash code:
    // set random # variables - each must be 0 for first 'while' loop below
    var randomNum = 0;
    var randomNumLast = 0;
    // parent container
    var container_mc = this.createEmptyMovieClip("container",0);
    // movie clip containers
    container_mc.createEmptyMovieClip("loader1_mc",2);
    container_mc.createEmptyMovieClip("loader2_mc",1);
    // preload watcher
    this.createEmptyMovieClip("watcher_mc",100);
    // load xml
    images_xml = new XML();
    images_xml.ignoreWhite=true;
    images_xml.onLoad = parse;
    images_xml.load("images.xml");
    function parse(success) {
        if (success) {
            imageArray = new Array();
            var root = this.firstChild;
            _global.numPause = Number(this.firstChild.attributes.timer * 1000);
            _global.order = this.firstChild.attributes.order;
            _global.looping = this.firstChild.attributes.looping;
            _global.fadetime = Number(this.firstChild.attributes.fadetime);
            _global.xpos = Number(this.firstChild.attributes.xpos);
            _global.ypos = Number(this.firstChild.attributes.ypos);
            var imageNode = root.lastChild;
            var s=0;
            while (imageNode.nodeName != null) {
                imageData = new Object;
                imageData.path = imageNode.attributes.path;
                imageArray[s]=imageData;
                imageNode = imageNode.previousSibling;
                s++;
            // place parent container
            container_mc._x = _global.xpos;
            container_mc._y = _global.ypos;
            // parse array
            imageArray.reverse();
            imageGen(imageArray);
        } else {
            trace('problem');
    // depth swapping
    function swapPlace(clip,num) {
        eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
    function loadImages(data,num) {
        if (i==undefined || i == 2) {
            i=2;
            createLoader(i,data,num);
            i=1;
        } else if (i==1) {
            createLoader(i,data,num);
            i=2;
    function createLoader(i,data,num) {
        thisLoader=eval("container_mc.loader"+i+"_mc");
        thisLoader._alpha=0;
        thisLoader.loadMovie(data[num].path);
        watcher_mc.onEnterFrame=function () {
            var picLoaded = thisLoader.getBytesLoaded();
            var picBytes = thisLoader.getBytesTotal();
            if (isNaN(picBytes) || picBytes < 4) {
                return;
            if (picLoaded / picBytes >= 1) {
                swapPlace("container_mc.loader2_mc",1);
                alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
                timerInterval = setInterval(imageGen,_global.numPause,data);
                delete this.onEnterFrame;
    function imageGen(data) {
        // random, or sequential?
        if (_global.order=="random") {
            // choose random # between 0 and total number of images
            while (randomNum == randomNumLast) {
                randomNum = Math.floor(Math.random() * data.length);
                trace(randomNum);
            loadImages(data,randomNum);
            randomNumLast = randomNum;
        } else if (_global.order=="sequential") {
            // start at 0, increment to total number of images, then drop back to zero when done
            if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
            loadImages(data,p);
            p++;
        } else {
            trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
        clearInterval(timerInterval);
    stop();
    XML:
    <gallery timer="5" order="random" fadetime="2" looping="yes" xpos="0" ypos="0">
    <image path="images/12_02.png" />
    <image path="images/600x300callawway_kodak.jpg" />
    <image path="images/BurnerBucksTemplate_600x300.jpg" />
    <image path="images/DEI-594-X-250-copy.png" />
    <image path="images/Wilson_DFY_600X300.jpg" />
    <image path="images/sky_golf.jpg" />
    </gallery>
    Now everything works right so far, my question is how would i make the banners/images into links so when the banner is clicked i can add a link to it so they are taken to that product.

    That code does not go on the button like you would do with on(release) code.  That code will go with the rest of the code you showed.  You will assign an instance name to that button... if you use the code I showed, that instance name will be "btn"--you assign it by selecting the button on the stage and entering it into the Properties panel where it says <Instance Name>.  You will also declare the urlVAriable where that code is...
    var urlVariable:String;
    As for the xml end of things, I will leave you to solve with a little help.  Look at the parse function and try to see how the current xml information is captured and later utilized.   You will essentially create another parameter in each xml node to go with the current "path" parameter.  You can call it "link" or something like that, and it will contain the url that clicking the button will lead to.
    <gallery timer="5" order="random" fadetime="2" looping="yes" xpos="0" ypos="0">
    <image path="images/12_02.png" link="http://www.somesite.com" />
    <image path="....
    </gallery>
    When you parse the xml you will add the link value as another property of the imageData object that you create.
            while (imageNode.nodeName != null) {
                imageData = new Object;
                imageData.path = imageNode.attributes.path;
                imageData.link = imageNode.attributes.link;
                imageArray[s]=imageData;
                imageNode = imageNode.previousSibling;
                s++;
    The rest I will leave for you to sink your teeth into... you need to dig into the code that is used to present the banners and see where assigning the value of the link to the urlVariable needs to happen.

  • Midtier Install error: dcmctl  createInitialBackup - Not enough space

    Had this puzzling error during installation of Midtier with 10g during 'DCM Repository Backup Assistant' configuration.
    It turned out /tmp was not big enough - it went from 953 MB at the beginning of the Midtier installation down to 46MB by this last step!! Since /tmp comes out of swap/free memory under Solaris 9 (and since at least 2.6), it must have been used up by the install process itself. Once I dynamically added more swap space (for usage by /tmp) of 1 GB, the re-try worked!
    Hoping this helps anyone else with such a weird error (and hoping Oracle will look into making the Universal Installer more careful about dealing with this situation in Solaris at least).
    ROC

    It is time to do a major housecleaning. I'd archive a ton of "stuff," and also remove any unused programs. Once done, defrag your C:\, if you have room to do so. You can use the Windows defrag utility, or a program like Diskeeper.
    Now, if you ONLY have a C:\, and one that is full, you will have issues with Scratch Disk space. If that is the case, you will want to add at least one more HDD. These are cheap today, and one can add a couple of 1TB ATA-300's for less than US$200. Actually, one can add two 1.5TB ATA-300's for under that price!
    I agree completely with Curt, that one should never fill a HDD beyond about 75%. Trouble can ensue.
    Good luck,
    Hunt

  • Swf not playing live

    Hi. My site works perfectly when played locally, but now that it is on a test server my swf has disappeared. I have encountered this before and have fixed it, but I cannot find where my code is wrong this time. Any ideas?
    http://www.d1082919.mydomainwebhost.com/test/about.html

    sorry about that. Here is the code from the fla:
    /* Crossfading slide show   */
    /* Author: Todd Dominey     */
    /* http://whatdoiknow.org   */
    /* http://domineydesign.com */
    // set random # variables - each must be 0 for first 'while' loop below
    var randomNum = 0;
    var randomNumLast = 0;
    // parent container
    var container_mc = this.createEmptyMovieClip("container",0);
    // movie clip containers
    container_mc.createEmptyMovieClip("loader1_mc",2);
    container_mc.createEmptyMovieClip("loader2_mc",1);
    // preload watcher
    this.createEmptyMovieClip("watcher_mc",100);
    // load xml
    images_xml = new XML();
    images_xml.ignoreWhite=true;
    images_xml.onLoad = parse;
    images_xml.load("images.xml");
    function parse(success) {
    if (success) {
    imageArray = new Array();
    var root = this.firstChild;
    _global.numPause = Number(this.firstChild.attributes.timer * 1000);
    _global.order = this.firstChild.attributes.order;
    _global.looping = this.firstChild.attributes.looping;
    _global.fadetime = Number(this.firstChild.attributes.fadetime);
    _global.xpos = Number(this.firstChild.attributes.xpos);
    _global.ypos = Number(this.firstChild.attributes.ypos);
    var imageNode = root.lastChild;
    var s=0;
    while (imageNode.nodeName != null) {
    imageData = new Object;
    imageData.path = imageNode.attributes.path;
    imageArray[s]=imageData;
    imageNode = imageNode.previousSibling;
    s++;
    // place parent container
    container_mc._x = _global.xpos;
    container_mc._y = _global.ypos;
    // parse array
    imageArray.reverse();
    imageGen(imageArray);
    } else {
    trace('problem');
    // depth swapping
    function swapPlace(clip,num) {
    eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
    function loadImages(data,num) {
    if (i==undefined || i == 2) {
    i=2;
    createLoader(i,data,num);
    i=1;
    } else if (i==1) {
    createLoader(i,data,num);
    i=2;
    function createLoader(i,data,num) {
    thisLoader=eval("container_mc.loader"+i+"_mc");
    thisLoader._alpha=0;
    thisLoader.loadMovie(data[num].path);
    watcher_mc.onEnterFrame=function () {
    var picLoaded = thisLoader.getBytesLoaded();
    var picBytes = thisLoader.getBytesTotal();
    if (isNaN(picBytes) || picBytes < 4) {
    return;
    if (picLoaded / picBytes >= 1) {
    swapPlace("container_mc.loader2_mc",1);
    alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
    timerInterval = setInterval(imageGen,_global.numPause,data);
    delete this.onEnterFrame;
    function imageGen(data) {
    // random, or sequential?
    if (_global.order=="random") {
    // choose random # between 0 and total number of images
    while (randomNum == randomNumLast) {
    randomNum = Math.floor(Math.random() * data.length);
    trace(randomNum);
    loadImages(data,randomNum);
    randomNumLast = randomNum;
    } else if (_global.order=="sequential") {
    // start at 0, increment to total number of images, then drop back to zero when done
    if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
    loadImages(data,p);
    p++;
    } else {
    trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
    clearInterval(timerInterval);
    stop();
    and here is the code from the xml file:
    <!-- 
    'timer' :: number of seconds between each image transition
    'order' :: how you want your images displayed. choose either 'sequential' or 'random'
    'looping' :: if the slide show is in sequential mode, this stops the show at the last image (use 'yes' for looping, 'no' for not)
    'fadeTime' :: velocity of image crossfade. Increment for faster fades, decrement for slower. Approximately equal to seconds.
    'xpos' :: _x position of all loaded clips (0 is default)
    'ypos' :: _y position of all loaded clips (0 is default)
    -->
    <gallery timer="4" order="sequential" fadetime="2" looping="yes" xpos="0" ypos="0">
    <image path="images/loop_1.jpg" />
    <image path="images/loop_2.jpg" />
    <image path="images/loop_3.jpg" />
    </gallery>

  • As 2.0 class objects- how to swap depths of a movie clip

    How do you bring an object to the top? if it's just a movie
    clip, I could do a swapdepths, but if it's a movieclip that's part
    of an AS 2.0 object, how do you swap depths of the whole object?
    I create 2 objects (same class) which each have a movieclip
    within them. The movie clip is created on a unique level with
    getNextHighestDepth().
    I have a button which tries to swapDepths of the 2 objects,
    but I can't get it to work. Can anyone help?
    here's the detail:
    1. create a symbol in the library called "someShape_mc" and
    put some shape in it - a circle, a square, whatever - this symbol
    is exported for action script, and has an AS 2.0 Class of
    "ClassObject" ( I also put a dynamic text field in the shape to
    display the current depth - it's called "depth_txt")
    2. create a button called "swap_btn" on the stage.
    Frame 1 has the following actionscript:
    var BottomObject:ClassObject = new ClassObject(this,100,150);
    var topObject:ClassObject = new ClassObject(this,110,160);
    // for the button add this:
    Swap_btn.onRelease=function() {
    // try it with the full path:
    _root.BottomObject.__LocalMovieClip.swapDepths(_root.topObject.__LocalMovieClip);
    // try it with with just the objects:
    BottomObject.__LocalMovieClip.swapDepths(topObject.__LocalMovieClip);
    // try it with the object as a movieclip
    BottomObject.swapDepths(topObject);
    trace("Did it Swap?");
    // try it with a method in the class....
    BottomObject.swapIt(topObject.__LocalMovieClip);
    BottomObject.swapIt(topObject);
    trace("nope... no swapping going on...");
    ================================
    here's the AS file: "ClassObject.as"
    class ClassObject extends MovieClip{
    var __LocalMovieClip;
    var __Depth;
    function ClassObject(passedIn_mc:MovieClip,x:Number,y:Number)
    __Depth = passedIn_mc.getNextHighestDepth();
    __LocalMovieClip =
    passedIn_mc.attachMovie("someShape_mc","__LocalMovieClip",__Depth);
    trace("made a shape at " + __Depth);
    __LocalMovieClip._x = x;
    __LocalMovieClip._y = y;
    __LocalMovieClip.depth_txt.text = __Depth;
    public function swapIt(targetMc) {
    __LocalMovieClip.swapDepths(targetMc);
    __LocalMovieClip.depth_txt.text =
    __LocalMovieClip.getDepth(); // no difference.
    trace("Tried to swap from within the class...");
    ========================
    so- the goal is to bring the "bottom" Class object on top of
    the "top" object. The button tries various methods of swapping the
    depths of the movie clips - but there is not one that works. What
    am I missing?
    tia
    ferd

    Thank you for your response - and here I have included the
    code I reworked to show how it works, and doesn't work. you're
    right about not needing the extra containers, but this example is
    part of a bigger thing...
    I'm confused - it works ONLY if I attach the movie outside
    the class, even though the "attachment" occurs, I'm thinking, at
    the same scope level, that is, _root.holder_mc, in both examples.
    it seems that the advantage of having a class is defeated
    since I have to do the extra coding for each object that will be
    created. It's like the class can only have a reference to the
    movieclip outside itself, and not have a clip INSIDE that is fully
    functioning. am I right about this? Is there someplace good I can
    learn more about class objects and movieclip usage?
    also, my class object IS a movieclip, but " this.getDepth() "
    is meaningless inside the class object. hmmm...
    This one works..... attaching the movies at the root level
    (to a holder_mc)
    // Frame 1
    tmp1 =
    holder_mc.attachMovie("someShape_mc","tmp1",holder_mc.getNextHighestDepth());
    var BottomObject:ClassObject3 = new
    ClassObject3(tmp1,100,150);
    tmp2 =
    holder_mc.attachMovie("someShape_mc","tmp2",holder_mc.getNextHighestDepth());
    var topObject:ClassObject3 = new ClassObject3(tmp2,110,160);
    // for the button add this:
    Swap_btn.onRelease=function() {
    BottomObject.swapIt(topObject);
    trace("clicked button");
    // ClassObject3.as
    class ClassObject3 extends MovieClip{
    var __LocalMovieClip:MovieClip;
    function
    ClassObject3(passedInMovieClip:MovieClip,x:Number,y:Number) {
    trace(" this class object is at ["+this.getDepth()+"]");
    __LocalMovieClip = passedInMovieClip;
    __LocalMovieClip._x = x;
    __LocalMovieClip._y = y;
    public function swapIt(targetMc:MovieClip):Void {
    trace("do the swap in the class");
    trace("===========================");
    trace("target type :" + typeof(targetMc));
    trace("__LocalMovieClip type :" + typeof(__LocalMovieClip));
    __LocalMovieClip.swapDepths(targetMc.__LocalMovieClip);
    This one does NOT work..... attaching the movies within the
    class object...
    // Frame 1
    var BottomObject:ClassObject2 = new
    ClassObject2(holder_mc,100,150);
    var topObject:ClassObject2 = new
    ClassObject2(holder_mc,110,160);
    // for the button add this:
    Swap_btn.onRelease=function() {
    BottomObject.swapIt(topObject);
    trace("clicked button");
    // ClassObject2.as
    class ClassObject2 extends MovieClip{
    var __LocalMovieClip:MovieClip;
    function
    ClassObject2(passedInMovieClip:MovieClip,x:Number,y:Number) {
    __LocalMovieClip =
    passedInMovieClip.attachMovie("someShape_mc","stuff1",passedInMovieClip.getNextHighestDep th());
    __LocalMovieClip._x = x;
    __LocalMovieClip._y = y;
    public function swapIt(targetMc:MovieClip):Void {
    trace("do the swap in the class");
    trace("===========================");
    trace("target type :" + typeof(targetMc));
    trace("__LocalMovieClip type :" + typeof(__LocalMovieClip));
    __LocalMovieClip.swapDepths(targetMc.__LocalMovieClip);

  • Swap task flow in dynamic region from menuitem in menubar

    Hello,
    I have a dynamic region and two task flows. I have action listeners that swap the task flows into the dynamic regions. When these action listeners are tied to buttons, everything works as expected, but if i attach them to menuitems on a menubar, despite the fact the the listener is executed (based on log file debugging), the task flow in the region does not change.
    Can anyone please give me an idea why, and exactly how someone can swap a task flow in a dynamic region from a menuitem.
    I'm using Jdeveloper 11.1.1.0.1
    Thanks
    Edited by: fakintoy on Apr 22, 2009 3:45 PM
    Edited by: fakintoy on Apr 22, 2009 3:46 PM
    Edited by: fakintoy on Apr 22, 2009 4:06 PM

    Hi,
    My guess is that the region is not added to the list of partial targets. Add a partialTrigger on the region pointing on the menu item.
    p.s. Code snippet would really help to get a more precise answer here
    Regards,
    ~ Simon

  • Implement commit,rollback,cancel popup when swapping task in dynamic region

    Hello,
    I have been trying to implement this functionality when I swap task flows in a dynamic region....
    A popup/dialog to be displayed with the following options (assuming there are changes to be saved on the task flow being swapped out)
    Commit - save the changes on the the outgoing task flow and continue to bring in the new task flow
    Rollback - cancel the changes on the the outgoing task flow and continue to bring in the new task flow
    Cancel - remain on the outgoing task flow and do not bring in the new task flow
    If i click on a button within the outgoing task flow, it is possible to determine the condition of the view object, determine if there are pending changes and display such a dialog, the problem is if that the navigation within the dynamic region is being performed from outside the region, we are advised against using task flow return activities when using bounded task flows within regions ( section 17.1.8 of fusion dev guide for 11.1.1.1.0 ) so the only thing i can think of is building a finalizer routine for the task flow. While this does get executed when the task flow is swapped out... how can i display the dialog from there, and stop execution of the finalizer and return to the original task flow if ultimately i want to cancel.
    Any ideas? other solutions?
    Thanks.

    Thanks for the reply Richard,
    I think this will probably be an important feature for anyone using the single page model, unless that model is not being encouraged/being discouraged. Unfortunately I'm not aware of the "How-to" you mentioned, but I would dearly LOVE to be. The project I am working on is in a relatively early stage, and this would be the time to put things in extension libraries, templates and the like. Especially if there is no official line on when a formal fix might be available, the plans not being firm and all...
    But thanks for the reply none the less... I'd still appreciate any further information if anyone has some form of solution.
    Cheers

Maybe you are looking for

  • Is there any way to stop the output of the iMac display to a connected TV?

    I just bought an iMac 21.5 and successfully connected it to my plasma HDTV using a Mini Displayport to HDMI adaptor and HDMI cables. Ideally, I would like to have the HDTV set up as a second display for watching movies, rather than mirroring the two

  • Update termination with BAPI_FIXEDASSET_CHANGE

    Hello, We want to capture the serial number of an asset at the point of goods receipt. There does not appear to be any standard functionality to do this so I am making use of a BAdI in transaction MIGO. But I am encountering a problem with BAPI_FIXED

  • How to make an notification as FYI notification

    Hi all , I want to create an FYI notification , i am unable to do that . please help. Thanks

  • Weblogic Integration 8.1 with SQL Server 2000

    Will weblogic integration 8.1 support SQL Server 2000 in a future service pack? What features do not work with the current version of integration? Has anybody tried using it? Ben Litchfield

  • Passcode bypass for backing up failed iPad

    My iPad screen has gone. I have an appointment at Genius Bar in a couple of days but I have been advised to back it up into my laptop using iTunes. I am getting a message saying that backup can't start until the iPad is unlocked with the passcode. Ob