# programming

**URL:** https://forum.kirupa.com/c/programming/41.md?page=191

[Latest](https://forum.kirupa.com/latest.md) · [Categories](https://forum.kirupa.com/categories.md)

**Page:** 192

---

## [Video amount played more than amount loaded?](https://forum.kirupa.com/t/video-amount-played-more-than-amount-loaded/327188)

<div class="topic-metadata">

**Author:** [@fhickler](https://forum.kirupa.com/u/fhickler)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 8:21pm UTC](https://forum.kirupa.com/t/video-amount-played-more-than-amount-loaded/327188 "2012-02-11T20:21:44Z")

</div>

So I have been having a serious issue with custom video where flash is saying that the amount of the video so far played is MORE than the amount that it has downloaded, which is clearly impossible. This results in variou…

---

## [AS2 - Arrays to textbox](https://forum.kirupa.com/t/as2-arrays-to-textbox/327187)

<div class="topic-metadata">

**Author:** [@kumba](https://forum.kirupa.com/u/kumba)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 4:22pm UTC](https://forum.kirupa.com/t/as2-arrays-to-textbox/327187 "2012-02-11T16:22:26Z")

</div>

I need to pull \[COLOR=darkgreen\]data\[/COLOR\] from an xml array, then have it alternate listing the data in the same text box. Here is the how I'm loading the XML: loadXML = function (loaded) { if (loaded) { …

---

## [getDefinitionByName with arrays](https://forum.kirupa.com/t/getdefinitionbyname-with-arrays/327186)

<div class="topic-metadata">

**Author:** [@FlashCS5Novice](https://forum.kirupa.com/u/FlashCS5Novice)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 4:07pm UTC](https://forum.kirupa.com/t/getdefinitionbyname-with-arrays/327186 "2012-02-11T16:07:48Z")

</div>

Hi guys! I’m having a new problem today- referring to arrays with getDefinitionByName. I looked aound for an answer, but couldn’t find anything, so here I am! Anyways, in my map editor, I will have two layers of objects…

---

## [Script to resize iframe to fit the content it loads?](https://forum.kirupa.com/t/script-to-resize-iframe-to-fit-the-content-it-loads/327184)

<div class="topic-metadata">

**Author:** [@Zenor](https://forum.kirupa.com/u/Zenor)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 2:55am UTC](https://forum.kirupa.com/t/script-to-resize-iframe-to-fit-the-content-it-loads/327184 "2012-02-11T02:55:16Z")

</div>

Hello, I am still trying to find a method to be able to dynamically resize the iframe to fit the height of the html it loads. Each html I have created has a different height. I tried this script: \<script type="tex…

---

## [How to detect when Flash is loaded from a local drive?](https://forum.kirupa.com/t/how-to-detect-when-flash-is-loaded-from-a-local-drive/327183)

<div class="topic-metadata">

**Author:** [@humbuged](https://forum.kirupa.com/u/humbuged)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 2:05am UTC](https://forum.kirupa.com/t/how-to-detect-when-flash-is-loaded-from-a-local-drive/327183 "2012-02-11T02:05:07Z")

</div>

Hello, Is there a script that checks if the flash is loaded from a local drive? Example: Keric opens a flash file. The script then checks if the file is being played from a local drive. If it's not, ads will be displ…

---

## [as3 scrollbar issue in mac](https://forum.kirupa.com/t/as3-scrollbar-issue-in-mac/327182)

<div class="topic-metadata">

**Author:** [@station\_agent](https://forum.kirupa.com/u/station_agent)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 1:55am UTC](https://forum.kirupa.com/t/as3-scrollbar-issue-in-mac/327182 "2012-02-11T01:55:14Z")

</div>

Hi, I have a scrollbar and it works as a swf locally. It works in the html file too UNTIL I add too much text. Then the dragger "sticks" so it sort of works, but works really poorly. I'm not sure why adding too much te…

---

## [Add font color= to selected text in a textarea](https://forum.kirupa.com/t/add-font-color-to-selected-text-in-a-textarea/327181)

<div class="topic-metadata">

**Author:** [@Ztruker](https://forum.kirupa.com/u/Ztruker)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 1:40am UTC](https://forum.kirupa.com/t/add-font-color-to-selected-text-in-a-textarea/327181 "2012-02-11T01:40:16Z")

</div>

I run an Apache server for my family's web site. One of the things it does is allow us to share messages. What I want to do is allow family members to add color to the text messages they are entering. I had no proble…

---

## [Help with a "bonus acquired" sound effect](https://forum.kirupa.com/t/help-with-a-bonus-acquired-sound-effect/327180)

<div class="topic-metadata">

**Author:** [@SmoothDime](https://forum.kirupa.com/u/SmoothDime)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 12:24am UTC](https://forum.kirupa.com/t/help-with-a-bonus-acquired-sound-effect/327180 "2012-02-11T00:24:13Z")

</div>

Hi, I'm a programmer and I'm clueless when it comes to engineering sound fx for my game. I need a sound effect for when the player kills a highlighted enemy. Imagine there are five of the same type of enemy on screen…

---

## [Class Inheritance](https://forum.kirupa.com/t/class-inheritance/327179)

<div class="topic-metadata">

**Author:** [@jeponkz](https://forum.kirupa.com/u/jeponkz)\
**Replies:** 0\
**Last updated:** [February 11, 2012, 12:07am UTC](https://forum.kirupa.com/t/class-inheritance/327179 "2012-02-11T00:07:42Z")

</div>

package { import fl.motion.Color; import flash.display.MovieClip; import flash.display.Sprite; import flash.geom.ColorTransform; import flash.events.MouseEvent; public class CustomBuildings extends Sprite {…

---

## [Drawing Api Trouble](https://forum.kirupa.com/t/drawing-api-trouble/327178)

<div class="topic-metadata">

**Author:** [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 10:50pm UTC](https://forum.kirupa.com/t/drawing-api-trouble/327178 "2012-02-10T22:50:11Z")

</div>

My code will draw the lines that reflect the game ships momentum but I cant figure out how to get rid of the old line and draw a the new one . As it stands I get a neat looking starburst pattern. if (momentumGauge ==…

---

## [AS3 using an array cross class](https://forum.kirupa.com/t/as3-using-an-array-cross-class/327176)

<div class="topic-metadata">

**Author:** [@cf2004](https://forum.kirupa.com/u/cf2004)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 9:35pm UTC](https://forum.kirupa.com/t/as3-using-an-array-cross-class/327176 "2012-02-10T21:35:44Z")

</div>

Hi all I have the following code Main class package { import ArrayClass; import flash.display.MovieClip; public class stuff extends MovieClip { private var \_ac:ArrayClass; …

---

## [Loading radom FLV vídeo from XML](https://forum.kirupa.com/t/loading-radom-flv-video-from-xml/327175)

<div class="topic-metadata">

**Author:** [@felipegm](https://forum.kirupa.com/u/felipegm)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 7:24pm UTC](https://forum.kirupa.com/t/loading-radom-flv-video-from-xml/327175 "2012-02-10T19:24:26Z")

</div>

Hello I´m building a flash website that will play random vídeos (.flv) in full background. In way for the client to add new videos to the list, how can I make flash to load the videos in a random order? I thought abo…

---

## [Loading SWF files easy](https://forum.kirupa.com/t/loading-swf-files-easy/327174)

<div class="topic-metadata">

**Author:** [@hrvoje986](https://forum.kirupa.com/u/hrvoje986)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 5:34pm UTC](https://forum.kirupa.com/t/loading-swf-files-easy/327174 "2012-02-10T17:34:24Z")

</div>

Hi i am creating a shooting game in AS3,my problem is that i cant do what i used to in AS2. In AS2 i used to have many SWF files for one game(main.swf, level1.swf, level2.swf ...),main.swf would open first and i was jum…

---

## [AS2: Alternate data from array into one text box](https://forum.kirupa.com/t/as2-alternate-data-from-array-into-one-text-box/327173)

<div class="topic-metadata">

**Author:** [@kumba](https://forum.kirupa.com/u/kumba)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 4:08pm UTC](https://forum.kirupa.com/t/as2-alternate-data-from-array-into-one-text-box/327173 "2012-02-10T16:08:13Z")

</div>

I need to pull data from an xml array, then have it alternate listing the data in the same text box. Here is the concept I've tried but can't quite get it right: for (i=0; i\<total; i++) { \[COLOR=#FF0000\]headline…

---

## [Adding to reusable class](https://forum.kirupa.com/t/adding-to-reusable-class/327172)

<div class="topic-metadata">

**Author:** [@Lars\_Laborious](https://forum.kirupa.com/u/Lars_Laborious)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 3:04pm UTC](https://forum.kirupa.com/t/adding-to-reusable-class/327172 "2012-02-10T15:04:20Z")

</div>

Hi all, I have a question that should be easy to answer, but I somehow haven't found an answer to yet. I've been coding in AS3 for two years now but still carry with me old AS2 habits which might explain why I find it …

---

## [How to promote my site](https://forum.kirupa.com/t/how-to-promote-my-site/327171)

<div class="topic-metadata">

**Author:** [@xmedia](https://forum.kirupa.com/u/xmedia)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 12:08pm UTC](https://forum.kirupa.com/t/how-to-promote-my-site/327171 "2012-02-10T12:08:56Z")

</div>

I newly appointed with the SEO work for the Web Designing Company. Now i promote our site,then we made daily back links of our site but google not increased my backlinks. So give me any ideas of how to increase my site r…

---

## [Email form problems](https://forum.kirupa.com/t/email-form-problems/327169)

<div class="topic-metadata">

**Author:** [@0Heroes](https://forum.kirupa.com/u/0Heroes)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 10:08am UTC](https://forum.kirupa.com/t/email-form-problems/327169 "2012-02-10T10:08:58Z")

</div>

Hi folks, I know I might come off as a noob, and you are right. As I am currently fiddling around trying to make an email form for my website, I have gone through numerous php script in order to make this fairly easy …

---

## [AS2 CS4 - Multiple button clicks before action takes place](https://forum.kirupa.com/t/as2-cs4-multiple-button-clicks-before-action-takes-place/327165)

<div class="topic-metadata">

**Author:** [@BinaryBloke](https://forum.kirupa.com/u/BinaryBloke)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 8:28am UTC](https://forum.kirupa.com/t/as2-cs4-multiple-button-clicks-before-action-takes-place/327165 "2012-02-10T08:28:05Z")

</div>

Hi. I am using cs4 and publishing using actionscript 2. I have been searching around but cannot find a solution for this issue... I have one button on the stage. As part of the actions for this button I want to count…

---

## [Actionscript 3 Problem with a button](https://forum.kirupa.com/t/actionscript-3-problem-with-a-button/327164)

<div class="topic-metadata">

**Author:** [@leighgoodman](https://forum.kirupa.com/u/leighgoodman)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 6:43am UTC](https://forum.kirupa.com/t/actionscript-3-problem-with-a-button/327164 "2012-02-10T06:43:47Z")

</div>

Hi there, I am fairly new to actionscript 3. I am creating an animation. 3 buttons come up during the animation, and when one clicks on them, they should take you to the respective scenes (frame 1). Now i spent abo…

---

## [\[AS3\] Newbie Jump Problem](https://forum.kirupa.com/t/as3-newbie-jump-problem/327161)

<div class="topic-metadata">

**Author:** [@LayneStaley](https://forum.kirupa.com/u/LayneStaley)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 2:37am UTC](https://forum.kirupa.com/t/as3-newbie-jump-problem/327161 "2012-02-10T02:37:03Z")

</div>

I've been looking over other threads/tutorials to figure out what I've done wrong on my code to make a character jump. He jumps up just fine, but refuses to reverse direction once the character leaves the ground or you l…

---

## [Loading local images from AIR app on iOS?](https://forum.kirupa.com/t/loading-local-images-from-air-app-on-ios/327159)

<div class="topic-metadata">

**Author:** [@Boreez](https://forum.kirupa.com/u/Boreez)\
**Replies:** 0\
**Last updated:** [February 10, 2012, 12:37am UTC](https://forum.kirupa.com/t/loading-local-images-from-air-app-on-ios/327159 "2012-02-10T00:37:07Z")

</div>

This puzzles me. When I export my AIR 2.6 app to iOS, I can easily add XML files to the .ipa file and load them into my SWF by referring to them in my actionscript as if they were in the same folder as the swf file. Bu…

---

## [How to start to draw a line on MOUSE\_DOWN-not a x\_y position](https://forum.kirupa.com/t/how-to-start-to-draw-a-line-on-mouse-down-not-a-x-y-position/327158)

<div class="topic-metadata">

**Author:** [@M\_gunningham](https://forum.kirupa.com/u/M_gunningham)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 10:49pm UTC](https://forum.kirupa.com/t/how-to-start-to-draw-a-line-on-mouse-down-not-a-x-y-position/327158 "2012-02-09T22:49:12Z")

</div>

\[COLOR=#000000\]\[FONT=verdana\]I want to drag a line from the mouse down anywhere on the screen but my problem is I can only do it from a set position eg.120,120.\[/FONT\]\[/COLOR\] \[COLOR=#000000\]\[FONT=verdana\]Everything el…

---

## [Java server (can't receive data from as3)](https://forum.kirupa.com/t/java-server-cant-receive-data-from-as3/327157)

<div class="topic-metadata">

**Author:** [@dario111cro](https://forum.kirupa.com/u/dario111cro)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 6:59pm UTC](https://forum.kirupa.com/t/java-server-cant-receive-data-from-as3/327157 "2012-02-09T18:59:18Z")

</div>

I am building java socket server for flash, but I can't receive any data. I builded test client in java and it works, so it's problem in reading data from flash socket. I get this error in java when I try to send data fr…

---

## [Class import basic question](https://forum.kirupa.com/t/class-import-basic-question/327156)

<div class="topic-metadata">

**Author:** [@VertexFusion](https://forum.kirupa.com/u/VertexFusion)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 5:09pm UTC](https://forum.kirupa.com/t/class-import-basic-question/327156 "2012-02-09T17:09:17Z")

</div>

I just wondered, what is the benefit of listing each class in imports separately instead of using a wildcard? import flash.display.Sprite; import flash.display.Loader; import flash.display.Graphics; ... and so on... …

---

## [Embedding Fonts Problem](https://forum.kirupa.com/t/embedding-fonts-problem/327155)

<div class="topic-metadata">

**Author:** [@DanDaMan](https://forum.kirupa.com/u/DanDaMan)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 4:11pm UTC](https://forum.kirupa.com/t/embedding-fonts-problem/327155 "2012-02-09T16:11:29Z")

</div>

\[EDIT\] please delete I figured out the problem. Sorry

---

## [\[AS3\] Displaying variables in textfields inside a movieclip](https://forum.kirupa.com/t/as3-displaying-variables-in-textfields-inside-a-movieclip/327154)

<div class="topic-metadata">

**Author:** [@MattAS3](https://forum.kirupa.com/u/MattAS3)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 3:09pm UTC](https://forum.kirupa.com/t/as3-displaying-variables-in-textfields-inside-a-movieclip/327154 "2012-02-09T15:09:55Z")

</div>

\[COLOR=#000000\]\[FONT=verdana\]This issue is my constant pain, and has set my project back some time. I'm creating a message system for my game, it's supposed to record events that happened during travel, 3 vars per messag…

---

## [Predictive collision between Balls](https://forum.kirupa.com/t/predictive-collision-between-balls/327153)

<div class="topic-metadata">

**Author:** [@paras\_](https://forum.kirupa.com/u/paras_)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 2:28pm UTC](https://forum.kirupa.com/t/predictive-collision-between-balls/327153 "2012-02-09T14:28:03Z")

</div>

hi friends .... can someone help me with collision between two balls..... What happen is the ball moves so fast that it sometimes missses the whole collision... I tried predictive collision detection ... bt may b somet…

---

## [PHP Twitter feed importer](https://forum.kirupa.com/t/php-twitter-feed-importer/327152)

<div class="topic-metadata">

**Author:** [@Elev8](https://forum.kirupa.com/u/Elev8)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 1:47pm UTC](https://forum.kirupa.com/t/php-twitter-feed-importer/327152 "2012-02-09T13:47:55Z")

</div>

I work as a social media consultant for a local company and get asked to pull data from Twitter. At the time Twitter's JavaScript API was returning incorrect headers for IE so thought I'd create my own little script. …

---

## [as2 to as3 conversion](https://forum.kirupa.com/t/as2-to-as3-conversion/327150)

<div class="topic-metadata">

**Author:** [@raman\_arena](https://forum.kirupa.com/u/raman_arena)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 6:13am UTC](https://forum.kirupa.com/t/as2-to-as3-conversion/327150 "2012-02-09T06:13:18Z")

</div>

how can i convert this code into as3.0 its applied on the movieclip with name of em1 onClipEvent (load) { nu = 1; } on (rollOver) { if (\_root.ln != nu) { this.gotoAndPlay("s1"); } // end if } o…

---

## [Break apart lowers image quality](https://forum.kirupa.com/t/break-apart-lowers-image-quality/327149)

<div class="topic-metadata">

**Author:** [@FuglyBastard](https://forum.kirupa.com/u/FuglyBastard)\
**Replies:** 0\
**Last updated:** [February 9, 2012, 3:52am UTC](https://forum.kirupa.com/t/break-apart-lowers-image-quality/327149 "2012-02-09T03:52:57Z")

</div>

Is there any way to save the image quality? Also every time I try use the trace bitmap my CS4 crashes so I am unable to use that..

[Previous page](https://forum.kirupa.com/c/programming/41.md?page=190)

[Next page](https://forum.kirupa.com/c/programming/41.md?page=192)
