SunQuest
           Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #31  
Old March 27th, 2003, 03:10 PM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok. i like the sound of the loadvars - reminds me of a recordset

i have this in frame1:

MyData = new LoadVars();
MyData.Load("viewleadf.txt");
curagt = MyData.CurrentAgentNumber;
trace(MyData.CurrentAgentNumber);
trace(curagt)

Both traces come out undefined. Also, now that im using loadvars, my variable isnt showing up in my textbox.

I know that once i sort this out and get it working, i'm probably going to laugh at my current stupidity, but right now...

I just bought the book you were talking about. Seems heavily geared towards PHP and MySQL., but should still be usefull.

Reply With Quote
  #32  
Old March 27th, 2003, 03:14 PM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oops - missed the on load bit

Reply With Quote
  #33  
Old March 27th, 2003, 03:38 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
you're forgetting to put the onLoad event handler, which is the "listener" that will wait until the data is loaded and then execute a function.

Code:
MyData = new LoadVars();
MyData.onLoad = function(){
     curagt = MyData.CurrentAgentNumber;
     trace(this.CurrentAgentNumber);
     trace(curagt)
}
MyData.Load("viewleadf.txt");

also notice i put a "this" in the trace because "this" will refer to the MyData object inside that function...

Reply With Quote
  #34  
Old March 27th, 2003, 03:46 PM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sucess!!!!!! kind of

Ok! I got the pulldown working.

Thankyou Thankyou Thankyou!!!!

Now that i'm using the LoadVars(), how do i fill the variable field in my text box. I used to just use the name of the variable in my record source, but that doesnt work any more. I tried entering _level0.CurrentAgentNumber and also MyData.CurrentAgentNumber. All to no sucess.

Do i now have to populate my text boxes with code?

Reply With Quote
  #35  
Old March 27th, 2003, 03:58 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
without knowing the paths and everyhing, it would probably be easist to set the text of those text boxes in your onLoad function.

you can either set the variable or the .text value of your text field, depending on whether or not you gave it an instance name or just a variable name. As long as your get yoru path right it should work.

cheers,

bret

Reply With Quote
  #36  
Old March 28th, 2003, 01:32 PM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
k.. on my load (frame 1) i now have this:

MyData = new LoadVars();
MyData.Load("viewleadf.asp");
MyData.onload = function() {
// Populate Variable for Pulldown boxes
curagt = MyData.CurrentAgentNumber;
// Populate text fields
strTEXTBOX.text=MyData.CurrentAgentNumber;
};


This populates the text box on the screen. On my post button i have this:

on (release, keyPress "<Enter>") {
agentnumPD = _root.cbox1.getvalue();
txtmsgmelon = strTEXTBOX.valueOf();
getURL("flashagenttest.asp", "", "GET");
}

Before i started using the loadvar() I defined the value of the text box by simply entering the variable into the text box parameter 'variable' Now that im setting the value for this in load, its populatng the box, but not sending the value...

Can i do loadvars and the old method at the same time? will that mess it up?

Reply With Quote
  #37  
Old March 28th, 2003, 02:18 PM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
after i thought about it, i decided that using two methods at the same time was daft.

i messed with it and now i can put the variable in the text box as i did before, but i am still having trouble picking it up using the valueof setting. its actually giving the the name of the control in place of the value.

Any ideas?

Reply With Quote
  #38  
Old March 28th, 2003, 02:20 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
when you are retrieving the value of a text box, you don't need valuof, that's just a retriever for boolean values. Just use the instance name.text and it will return the textual value of that text box.

cheers,

bret

Reply With Quote
  #39  
Old March 28th, 2003, 02:28 PM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Doh! Yup. I think that macromedia have made this language especially to confuse VB users!!!

Ok. My test form is complete. One last question, then i'll stop bothering you :-^

Whats the best (easiest) way to put a "loading data - please wait" animation on there to give the users something to look at while the data is loading?!

Reply With Quote
  #40  
Old March 28th, 2003, 02:32 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
the simplest way to do it is to just have your results display a "loading..." in the text box... but this only works if you are loading text into a text box In your LoadVars function, you can set the callback to go to the screen that has your display info, and display a "loading" frame when they view the page or try to refresh the info. Does that make sense?

have your first frame of your movie "Loading". in the onLoad even handler function, tell the movie to gotoAndStop your content display page.

in your getURL function, there's no way, since you only get the URL and aren't returning the data back into flash.

make sense?

bret

Reply With Quote
  #41  
Old March 28th, 2003, 02:50 PM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Can i use action script to hide a layer? I was maybe thinking of having a layer with the please wait message on it and then once the data is loaded, hide it

Reply With Quote
  #42  
Old March 28th, 2003, 02:56 PM
bret bret is offline
flash junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: CO, USA
Posts: 172 bret User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 38 sec
Reputation Power: 6
Send a message via Yahoo to bret
well not a layer, but you can put your loading thing in a movieclip, and use actionscript to hide that movieclip. (placing it on the top most layer).

instancename._visible = false; //0 or 1, false or true

Reply With Quote
  #43  
Old March 30th, 2003, 08:36 AM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok. I made a cute little please wait box, with a spinning circle and the words 'please wait'. I saved it as a SWF - I want to be able to reuse it. When i import it into my movie, the text doesnt show up. Any ideas what i did wrong?

Reply With Quote
  #44  
Old March 30th, 2003, 09:19 AM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
here's a sample of my code:
MyData = new LoadVars();
MyData.Load("viewleadf.asp");
MyData.onload = function() {
// Populate Variable for Pulldown boxes
curagt = MyData.CurrentAgentNumber;
// Populate text fields
newagtnumber = MyData.CurrentAgentNumber;
setProperty(pleasewait1, _visible, false);
};

When i run this, everything becomes invisible, form and all!!!

i tried not using the setproperty function like in your example, but nothing happened.

Reply With Quote
  #45  
Old March 31st, 2003, 10:47 AM
Den the Puzzled Den the Puzzled is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 25 Den the Puzzled User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I decided to use a progressbar for my loader. It works great on my local test machine (running Microsoft Personal Web Server), and it works on our website, until you hit refresh - then it doesnt repopulate.

Is there some special code i have to add to my movie to refresh the data when it closed and reopens?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Flash as a database frontend


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump