# Newbie needs help~

**URL:** <https://forum.kirupa.com/t/newbie-needs-help/59746>\
**Category:** Uncategorized\
**Created:** [August 3, 2004, 2:56pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746 "2004-08-03T14:56:55Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![eudora](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@eudora](https://forum.kirupa.com/u/eudora)\
**Post date:** [August 3, 2004, 2:56pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/1 "2004-08-03T14:56:55Z")

</div>

:hugegrin:

okie I got my php working with all the results i need…  
albumId=0&albumName=default1&albumId=1&albumName=default2

now how do i work this within flash? bascially for each pair of albumId and albumName, I want to attach a movieclip to a empty container.

I tried the tutorials and loadVars but dun quite seem to get it right… what is the standard procedure for me to get the result from the php file within flash? and how do i work with it?

thanks a million

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 4:31pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/2 "2004-08-03T16:31:40Z")

</div>

a bit more info…  
i tried this quote in the frame for a test movie and it doesn’t work… ☹

```auto
myVars = new LoadVars(); 
myVars.load("http://www.fakedevil.com/albums2.php");
myVars.onLoad = function(){
    if(success){
        trace("variables loaded");
     } else {
        trace("Error loading page");
    } 
}

```

keeps giving me error loading page…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 4:42pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/3 "2004-08-03T16:42:56Z")

</div>

Howdy… 🙂

That probably is where your problem lies…

You have to make sure that your PHP file spits out the valid output that Flash can understand…

If I run this, [http://www.fakedevil.com/albums2.php](http://www.fakedevil.com/albums2.php), over the IE, I get this…

> 

Warning: main(config.php): failed to open stream: No such file or directory in /home/eudora/public\_html/albums2.php on line 3

Warning: main(): Failed opening ‘config.php’ for inclusion (include\_path=‘.:/usr/lib/php:/usr/local/lib/php’) in /home/eudora/public\_html/albums2.php on line 3

Warning: mysql\_num\_rows(): supplied argument is not a valid MySQL result resource in /home/eudora/public\_html/albums2.php on line 6  
completed=true

That means that your PHP script has problem that you need to fix BEFORE you go on and supply that data to Flash…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 4:54pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/4 "2004-08-03T16:54:51Z")

</div>

i get this error on mine

Parse error: parse error, unexpected $ on line 20

all i did was copy the code straight out of the tutorial but put in my own db location username and password

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 4:59pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/5 "2004-08-03T16:59:13Z")

</div>

Well… I don’t know what you are talking about, sizzle… Does your question belong to this thread??? In other words, are you another entity of the eudora??? 😃

At any rate, post your code and somebody will try to help you… (Nobody knows which tutorial you are talking about, so it’s best to post what you have…)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 4:59pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/6 "2004-08-03T16:59:51Z")

</div>

\*\*\*\* it i posted in the wrong thread on accident  
my multitaskin skills are lacking today 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 5:01pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/7 "2004-08-03T17:01:21Z")

</div>

It does look like it… Go get some rest and fresh air… That’ll make it better… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 5:05pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/8 "2004-08-03T17:05:37Z")

</div>

hmmz… think i got the cached page earlier… thanks let me look into taht

edit : how abt this one?  
[http://www.fakedevil.com/lurgee/albums2.php](http://www.fakedevil.com/lurgee/albums2.php)  
i tried with this url same error trace

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 5:06pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/9 "2004-08-03T17:06:43Z")

</div>

how abt this one?  
[http://www.fakedevil.com/lurgee/albums2.php](http://www.fakedevil.com/lurgee/albums2.php)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 5:10pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/10 "2004-08-03T17:10:28Z")

</div>

This works fine…

```php

myVars = new LoadVars();
myVars.onLoad = function(success)
{
	if (success)
	{
		trace("variables loaded");
		trace(unescape(this));
	}
	else
	{
		trace("Error loading page");
	}
}
myVars.load("http://www.fakedevil.com/lurgee/albums2.php");

```

Make sure that you define onLoad before you actually use load() function…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 3, 2004, 5:25pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/11 "2004-08-03T17:25:43Z")

</div>

oic!  
haha thanks!! now i can continue… 🙂

edited:

from [http://www.fakedevil.com/lurgee/albums2.php](http://www.fakedevil.com/lurgee/albums2.php)  
i got…  
completed=true&album0=album1&album1=…

now how do i get the myVars.completed?  
do i place it here?

```auto
myVars.onLoad = function(success)
{
    if (success)
    {
        trace("variables loaded");
        trace(unescape(this));
		**trace(this.completed);**
    }
    else
    {
        trace("Error loading page");
    }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 2:41am UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/12 "2004-08-04T02:41:52Z")

</div>

a bit of progress…

```auto
myVars = new LoadVars();
**myVars._path = this;**
myVars.onLoad = function(success) {
	if (success) {
		trace(" variables loaded ");
		i = myVars.albumCount;

```

with that i can get the myVars.albumCount…  
am i right to say that the value of i only exists within the onLoad function?  
how can i access the other objects from within this function? \_root.Object1?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 3:04am UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/13 "2004-08-04T03:04:43Z")

</div>

edited… still got some problems…

this is my current code

```auto
myVars.onLoad = function(success) {
	if (success) {
		trace(" variables loaded ");
		nodeNum = 0;
		while (myVars['album'+nodeNum] != undefined) {
			// value of the duplicates radio
			container.entryHolderMC.attachMovie("link", "nodeMC"+nodeNum, nodeNum);
			container.entryHolderMC["nodeMC"+nodeNum]._x = 1;
			container.entryHolderMC["nodeMC"+nodeNum]._y = 2+nodeNum*20;
			container.entryHolderMC["nodeMC"+nodeNum].output = myVars['album'+nodeNum];
			container.entryHolderMC["nodeMC"+nodeNum].hitArea.onRollOver = function() {
				myTextFormat2.bold = false;
				myTextFormat2.color = 0xEBC7A4;
				myTextFormat2.applyChanges();
				container.entryHolderMC["nodeMC"+nodeNum].link1.setTextFormat(myTextFormat2);
			};
			container.entryHolderMC["nodeMC"+nodeNum].hitArea.onRollOut = function() {
				myTextFormat2.bold = false;
				myTextFormat2.applyChanges();
				myTextFormat2.color = 0xFFFFFF;
				container.entryHolderMC["nodeMC"+nodeNum].link1.setTextFormat(myTextFormat2);
			};
			container.entryHolderMC["nodeMC"+nodeNum].hitArea.onPress = function() {
				this.buttonHit = container.entryHolderMC["nodeMC"+nodeNum].output;
			};
			container.entryHolderMC["nodeMC"+nodeNum].hitArea._width = container.entryHolderMC["nodeMC"+nodeNum].link1.textWidth+2;
			container.entryHolderMC["nodeMC"+nodeNum].hitArea._height = container.entryHolderMC["nodeMC"+nodeNum].link1.textHeight+2;
			nodeNum++;
		}

```

so for each album i will attach a button MC… i tried to add in the onRollOver etc functions to it but that don’t seems to work. I tried the same code with XMl and it worked… anyone knows why?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 3:47pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/14 "2004-08-04T15:47:44Z")

</div>

anyone pls?  
:book:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 4:08pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/15 "2004-08-04T16:08:50Z")

</div>

Got a sample that I can try??? 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 4:22pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/16 "2004-08-04T16:22:15Z")

</div>

> [@CyanBlue](#):
>
> Got a sample that I can try??? 🙂

thanks!  
i made a typo of not declaring the textFormat earlier… but after declaring still no difference… the onPress is obviously working cos i got the trace of a msg… but onRollOver and onRollOut dun seems to work…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 4:28pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/17 "2004-08-04T16:28:50Z")

</div>

Try this…

```php

container.entryHolderMC["nodeMC"+nodeNum].hitArea.onRollOver = function() {
				myTextFormat2.bold = true;
				myTextFormat2.color = 0xEBC7A4;
				myTextFormat2.applyChanges();
				this._parent.link1.setTextFormat(myTextFormat2);
};
container.entryHolderMC["nodeMC"+nodeNum].hitArea.onRollOut = function() {
				myTextFormat2.bold = false;
				myTextFormat2.applyChanges();
				myTextFormat2.color = 0xFFFFFF;
				this._parent.link1.setTextFormat(myTextFormat2);
};

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 4:33pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/18 "2004-08-04T16:33:16Z")

</div>

> [@CyanBlue](#):
>
> Try this…
> 
> ```php
> 
> container.entryHolderMC["nodeMC"+nodeNum].hitArea.onRollOver = function() {
> myTextFormat2.bold = true;
> myTextFormat2.color = 0xEBC7A4;
> myTextFormat2.applyChanges();
> this._parent.link1.setTextFormat(myTextFormat2);
> };
> container.entryHolderMC["nodeMC"+nodeNum].hitArea.onRollOut = function() {
> myTextFormat2.bold = false;
> myTextFormat2.applyChanges();
> myTextFormat2.color = 0xFFFFFF;
> this._parent.link1.setTextFormat(myTextFormat2);
> };
> 
> ```

whew! thanks! can explain a bit to me why we use this.\_parent?

and how can i make the album name appear in the textbox i created in the main timeline onpress?  
🙂

edited… i got the textbox thingy… think I understand the rationale now… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2004, 5:08pm UTC](https://forum.kirupa.com/t/newbie-needs-help/59746/19 "2004-08-04T17:08:30Z")

</div>

When you say ‘this’ from that onRollOver handler block, it refers to the button’s hitArea instance and the one you need to refer to is the one that is one level above that one, hence ‘this.\_parent’ comes in… 🙂
