This content has been marked as final.
Show 6 replies
-
1. Re: Easy Function
Newsgroup_User Dec 28, 2006 2:10 PM (in response to Obster)Hi,
This way won't have effect.. I made two modifications, try this...
Obster wrote:
> [...]
> import mx.managers.PopUpManager;
> import mx.containers.Window;
>
> var issueLocation:Boolean = true;
> function toggleCity(value:String) { //I modified here
> var currentArea:Number;
> if (issueLocation) {
> currentArea = 0;
> issueLocation = false;
> var my_win = mx.managers.PopUpManager.createPopUp(_root,
> mx.containers.Window, true, {title:"test picture 1",
> closeButton:true,contentPath:value:String});
> my_win.setSize (800,600);
> var winListener:Object = new Object();
> winListener.click = function() {
> my_win.deletePopUp();
> };
> my_win.addEventListener("click", winListener);
>
> } else {
> currentArea = 1;
> issueLocation = true;
> var my_win = mx.managers.PopUpManager.createPopUp(_root,
> mx.containers.Window, true, {title:"test picture 2",
> closeButton:true,contentPath:"pics/test.jpg"});
> my_win.setSize (800,600);
> var winListener:Object = new Object();
> winListener.click = function() {
> my_win.deletePopUp();
> };
> my_win.addEventListener("click", winListener);
>
>
>
> // location for future code to calculate Payoff from mySQL
> }
>
> }
>
> button_btn.onPress = function() {
> toggleCity("pics/test.jpg"); //I modified here
> }
>
--
Regards,
Erick Souza | ericksouza.com -
2. Re: Easy Function
Newsgroup_User Dec 28, 2006 2:15 PM (in response to Obster)I sent this line with a mistake, remove it ": String"
[...]
var my_win = mx.managers.PopUpManager.createPopUp(_root,
mx.containers.Window, true, {title:"test picture 1",
closeButton:true,contentPath:value:String});
[...]
--
Regards,
Erick Souza | ericksouza.com -
3. Easy Function
Peter Lorent Dec 28, 2006 2:20 PM (in response to Obster)Try the following, attached code.
And change the contentPath to image:
,contentPath:image});
-
4. Re: Easy Function
Newsgroup_User Dec 28, 2006 2:38 PM (in response to Obster)LuigiL, I believe that the correct as follows.
function changePic(path:String):String{
return path;
}
--
Regards,
Erick Souza | ericksouza.com -
5. Re: Easy Function
Peter Lorent Dec 29, 2006 2:31 AM (in response to Newsgroup_User)No. The script uses a simple timeline var 'image' which is set by changePic().
As always there are several solutions and I was just following the path the OP took with his approach. -
6. Re: Easy Function
Newsgroup_User Dec 29, 2006 3:00 AM (in response to Newsgroup_User)I understand. You didn't indicate the alteration in the toggleCity
function and I confused his objective.
--
Regards,
Erick Souza | ericksouza.com