|
|
LoadSpace from userinterface?Hi and thanks for panosalado, it's wonderful. Im doing a pano project where I need to move between Basically a hotspot thats not in 3D space, just in Im guessing I need to add or change something in a .as file, Thnak you!
|
re: LoadSpace from userinterface?
Thanks!
Im guessing I need to add or change something in a .as file,
Try this in your AS file:
panoSalado.execute("loadSpace:MYSPACE");
Cheers,
Patrick
Patrick Cheatham
FlashPanos.com creator, Panoramic Photographer
Got PanoSalado?
Thanks Patrick, I have tried
Thanks Patrick,
I have tried to figure out exactly wich .as file to put it in and
Im guessing it's Userinterface.as, I have added it as such:
buttons_container.upBtn.addEventListener(MouseEvent.MOUSE_DOWN, panoSalado.execute("loadSpace:upper"), false, 0,true);
Then inside of the Userinterface.fla I have added the button named upBtn,
However, I dont know how to compile the Userinterface.as file, Im using the rev_128 example for the whole thing
and the rev_128 source files for editing the .as files.
Thanks again.
re: LoadSpace from userinterface?
Hey there:
The example Userinterface.fla is set to compile out using the Userinterface.as file as its document class. (check the advanced publish settings for the document)
If you export a SWF from the Userinterface.fla, using the edited version of the .as which you have, then you should be good to go.
You're practically all the way there... just hit the Publish button!
ps: this post here discusses using the command line compiler mxmlc to compile out the PanoSalado source/project. this will work with .as-->.swf, but you will need to manually reference your buttons either as external images or as class(es). an exercise for the reader.
Patrick Cheatham
FlashPanos.com creator, Panoramic Photographer
Got PanoSalado?
Brilliant! thanks Patrick,
Brilliant! thanks Patrick, after a bit of playing around, I finally managed
to solve it. The method of adding:
buttons_container.upBtn.addEventListener(MouseEvent.MOUSE_DOWN, panoSalado.execute("loadSpace:upper"), false, 0,true);
to the UserInterface.as file did not work, I had to add it as a private function, wich is quite obvious
on second thought...
private function moveUp(e:MouseEvent):void {
panoSalado.execute("loadSpace:upper");
}
and then call the function from the button as such:
buttons_container.upBtn.addEventListener(MouseEvent.MOUSE_DOWN, moveUp, false, 0,true);
I still have a problem, im adding 2 buttons to the userinterface, one that goes to the UP space and one for DOWN space, I need to be able to move between them wich kind of works, but I need to tell it that when we are in the UP viewing state the UP button should not respond to any clicks, and the same for the DOWN button when we are in the DOWN space.
Some kind of if statement I suppose, but I have no idea where to begin...
Thank you so much for your help on this, greatly appreciated.
Daniel
Found a temporary solution,
Found a temporary solution,
Added:
ON LOADSPACE UP
buttons_container.downBtn.visible = true;
buttons_container.upBtn.visible = false;
ON LOADSPACE DOWN
buttons_container.downBtn.visible = false;
buttons_container.upBtn.visible = true;
Wich kind of works, but I know its not the right way around this...