Hi
Is it possible by action script to make a new page in a project?
Professional Software Development Tools
Hi
Is it possible by action script to make a new page in a project?
No.
New object, yes, but not new page.
Yossi
Ok
thanks for your reply.
You can have action script create a new page in another project that is in the design phase, but not a project that has been compiled. One cool thing is you can now get the action script for a page and set the action script for a page as well. With these actions, you could have a blank page in your project that you could build anyway you wanted through action script. It is just that the page would have to exist when the project was compiled.
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
That's a great idea Tigger... you'd have one page in your project that is effectively a "shape-shifter" that gets rebuilt anytime you need based on any number of external scripts.
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================
Just great.
It was just that I was looking for.
I want to build a wizard for making new projects.
So happy now.
But I guess I will be hara asking allot on the way![]()
Thanks allot
Now I need help from you TJ Tigger.
How do I start?
What are you wanting to do? I see that you want to have a project wizard, but is this design time, or run time. If it is design time, I would suggest looking in the examples forum, I have a couple of projects posted there that have code for reading the XML file for IR projects. Look for the XML parser and the IR Project CodeViewer.Originally Posted by Raindog26
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
You'll want to familiarize yourself with the actions related to creating and manipulating objects. The help file is very good!
Here are some (but not all) of the important ones:
Page.CreateObject()
Page.SetObjectScript()
Page.EnumerateObject()
Page.GetObjectType()
Page.DeleteObject()
Button.SetProperties() (every object type has a set properties action... you'll need to know these well.)
Here's a sample implementation:
1. Create a new project with one blank page. Add this to the On Show script:
2. Create a new text file. Open the new file with notepad and put the following in it:Code:Application.RunScriptFile("AutoPlay\\Scripts\\StartupScript.lua");
3. Save you new text file as "StartupScript.lua" in the AutoPlay\Scripts\ folder of your project.Code:-- Set the properties for the exit button t_ExitButtonProps = {}; t_ExitButtonProps.ButtonFile = "AutoPlay\\Buttons\\button.btn"; t_ExitButtonProps.Text = "EXIT"; t_ExitButtonProps.ObjectName = "btn_Exit"; t_ExitButtonProps.X = 10; t_ExitButtonProps.Y = 10; -- Create the exit button Page.CreateObject(OBJECT_BUTTON, "btn_Exit", t_ExitButtonProps); -- Add functionality to the new button Page.SetObjectScript("btn_Exit", "On Click", "Application.Exit();");
4. Make sure that the "button.btn" file or whatever .btn file you decide to use exists in the AutoPlay\Buttons\ folder of your project.
5. Preview or build and run the app to see how it works. You should get a blank page with an exit button in the top left corner that closes the app when pressed.
Your imagination is the limit from here...
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================
hmmmm.... interesting.
giving the user a page to input some parameters that would write variables to txt (lua) file, then page jumping and have the user see the changes they've made. This could give interactivity to the project.
The wheels are turning, now
thanx guys.
"Hello user! Where would you like me to put this Input Object?"
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================
I was actually thinking of using this in a product catalog. If the customer would like to see a variation on a product that is unique, you could offer more choices without loading up the project with examples.
Or a simple room designer, Logo designer, landscaping choices, etc. I don't know how complex you could get, but it is something I would like to explore "when I get a roundtuit", or the time, whichever comes first.
Just kidding...
This would also work well if you wanted to build a "content management" application to allow non-tech users to prepare updates for your AMS apps... that one is worth $$$!
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================
This looks just great.
I will look into this now and try to get there I want to get.
Thank you all.
It's like building APMS inside APMS... LOL!
Never know what life is gonna throw at you.
(Based on a true story.)