Perhaps the most direct way would be to make your own event that you can<div>send when you set the correct value, something like this</div><div><br></div><div>(<canvas proxied="false" oninit="canvas.sprite.setBGColor(null);" debug="true"></div>
<div><br></div><div> <attribute name="prof" type="string" value=""/></div><div> <attribute name="data_url" type="string" value="BADVALUE"/></div>
<div><br></div><div> <method name="init"> </div><div> canvas.prof = lz.Browser.getInitArg('prof'); </div><div> if(canvas.prof) {</div><div> canvas.setAttribute('data_url','/trunk/xml/request_key/' + canvas.prof+".xml");</div>
<div> canvas.onurldatavalid.sendEvent();</div><div> }</div><div><br></div><div> </method> </div><div> <event name="onurldatavalid"/></div><div><br></div><div><br></div><div> <dataset id="perms"</div>
<div> name="perms"</div><div> type="http"</div><div> autorequest='false'</div><div> ondata="Debug.info(this.serialize())"</div><div> src="${canvas.data_url}"</div>
<div> ></div><div> <handler name="onurldatavalid" reference="canvas"></div><div> this.doRequest();</div><div> </handler></div><div> </dataset></div>
<div><br></div><div> <button onclick="perms.doRequest()">dorequest</button></div><div><br></div><div></canvas></div><div><br></div><div><div><br></div><div><br></div></div><div><br><div class="gmail_quote">
On Sun, Jan 24, 2010 at 6:00 PM, Lucas Lain <span dir="ltr"><<a href="mailto:lucas.lain@gmail.com">lucas.lain@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Henry, <div><br></div><div>thank you very much for trying the code. I tried several things, and realized that everythings works OK when I use the button (as in your example). </div><div><br></div><div>But when I try to automatically execute the perms.doRequest on init, it does not work. </div>
<div><br></div><div>Is there a way to automatically execute perms.doRequest after finishing loading?</div><div>Which is the best way of doing this. </div><div><br></div><div>Thank you very much. </div><div><br></div><div>
Lucas. </div><div><div><div></div><div class="h5"><br><div class="gmail_quote">On Sat, Jan 23, 2010 at 6:52 PM, Henry Minsky <span dir="ltr"><<a href="mailto:henry.minsky@gmail.com" target="_blank">henry.minsky@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Note, I am using the HttpFox plugin to trace the HTTP request from the Flash player<br><br><div class="gmail_quote">2010/1/23 Henry Minsky <span dir="ltr"><<a href="mailto:henry.minsky@gmail.com" target="_blank">henry.minsky@gmail.com</a>></span><div>
<div></div><div><br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">I'm not able to reproduce the problem you are reporting.<br><br>I used the following test case<br>
<br><canvas proxied="false" oninit="canvas.sprite.setBGColor(null);" debug="true"><br><br> <attribute name="prof" type="string" value=""/><br> <attribute name="data_url" type="string" value="BADVALUE"/><br>
<br> <method name="init"> <br> canvas.prof = lz.Browser.getInitArg('prof'); <br> if(canvas.prof) {<br> canvas.setAttribute('data_url','/trunk/xml/request_key/' + canvas.prof+".xml");<br>
}<br> </method> <br><br> <dataset id="perms"<br> name="perms"<br> type="http"<br> autorequest='false'<br> ondata="Debug.info(this.serialize())"<br>
src="${canvas.data_url}"<br> /><br><br> <button onclick="perms.doRequest()">dorequest</button><br><br></canvas><br><br><br>and fetched it with the URL <br>
<a href="http://127.0.0.1:8080/trunk/test/foo/player.lzx?prof=foo&debug=true&lzr=swf9" target="_blank">http://127.0.0.1:8080/trunk/test/foo/player.lzx?prof=foo&debug=true&lzr=swf9</a><br><br>When I click the button, the correct request is issued, to <br>
GET /trunk/xml/request_key/foo.xml?__lzbc__=1264279916554 HTTP/1.1<br><br>Does this test case work for you? <br><br><br><div class="gmail_quote">On Sat, Jan 23, 2010 at 1:43 PM, Lucas Lain <span dir="ltr"><<a href="mailto:lucas.lain@gmail.com" target="_blank">lucas.lain@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div>I renamed everything to prof_p, but still can make it to work. <div><br></div>
<div>Did anyone have a workaround for this?</div><div><br></div><div>I just want to send some information to the webserver from the flashclient. </div>
<div><br></div><div>Best.</div><div><br></div><div>L.</div><div><br></div><div><br></div></div><div><div><div></div><div><br><div class="gmail_quote">On Sat, Jan 23, 2010 at 11:04 AM, Henry Minsky <span dir="ltr"><<a href="mailto:henry.minsky@gmail.com" target="_blank">henry.minsky@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">One thing that is important, you should probably use a different query arg than "profile", because that has a special<br>
meaning to the LPS server, it is used to enable the profiler which is used to meter performance. <br><div><div></div><div>
<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div><br></div><div>Best.</div>
<div><br></div><div>L.</div><div><div><div></div><div><br><br><div class="gmail_quote">On Fri, Jan 22, 2010 at 1:14 AM, Lucas Lain <span dir="ltr"><<a href="mailto:lucas.lain@gmail.com" target="_blank">lucas.lain@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Please see both attached files. <div><br></div><div>The perms.doRequest is called from the view inside play_button.</div><div><br></div><div>I'm using OL 4.7. The file is compiled to SWF9. </div><div><div><div></div>
<div>
<br><br><div class="gmail_quote">
On Fri, Jan 22, 2010 at 1:04 AM, Henry Minsky <span dir="ltr"><<a href="mailto:henry.minsky@gmail.com" target="_blank">henry.minsky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Where do you actually call the doRequest() method on the dataset? Do you<br>call it manually?<br><br>If the dataset is set to make the request automatically, e.g., (the 'request' attribute == true) then<br>the request might get made before the constraint updates. <br>
<br>Also, what runtime are you using? <br><div><div></div><div><br><br><br><br><br><div class="gmail_quote">On Thu, Jan 21, 2010 at 9:48 PM, Lucas Lain <span dir="ltr"><<a href="mailto:lucas.lain@gmail.com" target="_blank">lucas.lain@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><div>Hello Everybody, </div><div><br></div><div>I'm trying to set a dataset url dynamically. The thing is that the dataset actually connects to the default data_url specified by default ("/xml/request_key") and not the dynamic one ("/xml/request_key/" + canvas.profile).</div>
<div><br></div><div>When I check the value in the debug console, the value is set to the second, but actually connects to the first one. </div><div><br></div><div>When the oninit method is executed? after processing all ${} values? </div>
<div><br></div><div>Thanks in advance!</div><div><br></div><div>code:</div><div><br></div><div><canvas proxied="false" oninit="canvas.sprite.setBGColor(null);" debug="true"></div><div>
<br>
</div><div> <attribute name="profile" type="string" value=""/></div><div> <attribute name="data_url" type="string" value="/xml/request_key/"/></div>
<div><br></div><div> <handler name="oninit"></div><div> canvas.profile = lz.Browser.getInitArg('profile');</div><div> if(canvas.profile) {</div><div> canvas.setAttribute('data_url','/xml/request_key/' + canvas.profile);</div>
<div> }</div><div> </handler> </div><div><br></div><div><div> <dataset id="perms"</div><div> name="perms"</div><div> type="http"</div><div> src="${canvas.data_url}"</div>
<div> /></div><div><br></div><div>...</div></div><br>-- <br><font color="#888888">Lucas<br>
</font></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br>
<br><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br>Lucas<br>
</div>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>Lucas<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br><br><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br>Lucas<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br><br><br>
</blockquote></div></div></div><div><div></div><div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com" target="_blank">hminsky@laszlosystems.com</a><br>
<br><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br>Lucas<br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br><br>
</div>