Download presentation
Presentation is loading. Please wait.
Published byWilfrid Burke Modified over 8 years ago
1
NumericStepper Component You can use the numeric stepper anywhere you want a user to select a numeric value. You can use the numeric stepper anywhere you want a user to select a numeric value. NumericStepper parameters: NumericStepper parameters: 1. maximum: sets the maximum value that can be displayed in the stepper. The default value is 10. 2. minimum: sets the minimum value that can be displayed in the stepper. The default value is 0.
2
NumericStepper Component 3. stepSize: sets the unit by which the stepper increases or decreases with each click. The default value is 1 4. Value: sets or gets the value displayed in the text area of the stepper. The default value is zero. ملاحظة اذا مسحنا الصفر ولم نضع شيء بدلها يعرض قيمة الماكسيمم
3
NumericStepper example Ex) this example shows how to use numeric stepper component to change the speed of moving movie clip symbol. Ex) this example shows how to use numeric stepper component to change the speed of moving movie clip symbol. 1. Create a new flash file 2. Create new movie clip symbol and give it (m) as instance name 3. Add a NumericStepper component from the component panel and name it (stepper) 4. Give it the range (-10 to 10) 5. Write the following action script in the action panel of the first frame:
4
NumericStepper example onEnterFrame = function() { m._x = m._x + 10; } You will notice that the symbol will move in a constant speed You will notice that the symbol will move in a constant speed Try to change the value of the stepper, you will notice that nothing will happen. Try to change the value of the stepper, you will notice that nothing will happen.
5
NumericStepper example 5. Now, write stepper.value instead of (10) You will notice that the speed of the symbol will change when the stepper value is updated يعني هيك نكتب على الاكشن لاول فرام onEnterFrame = function() { m._x = m._x +stepper.value; }
6
Loader Component You can use a loader whenever you need to retrieve content from a remote location and pull it into a flash application. يمكنك استخدامه كلما كنت بحاجة لاستعادة المحتوى من موقع بعيد وربطه مع تطبيق فلاش You can use a loader whenever you need to retrieve content from a remote location and pull it into a flash application. يمكنك استخدامه كلما كنت بحاجة لاستعادة المحتوى من موقع بعيد وربطه مع تطبيق فلاش
7
Loader Parameters autoload indicates whether the content should load automatically ( true ), or wait to load until the Loader.load() method is called ( false ). The default value is true. يبين اذا ماكان ( نحدد ) تحميل المحتوى يجب ان يتم تلقائيا وهو حالة ترو او سيتم الانتظار حتى يحمل الى لودر. لود وهو حالة فالز autoload indicates whether the content should load automatically ( true ), or wait to load until the Loader.load() method is called ( false ). The default value is true. يبين اذا ماكان ( نحدد ) تحميل المحتوى يجب ان يتم تلقائيا وهو حالة ترو او سيتم الانتظار حتى يحمل الى لودر. لود وهو حالة فالز contentPath: the path of the file to load into the loader. مسار تحميل الملف الى contentPath: the path of the file to load into the loader. مسار تحميل الملف الى scaleContent: indicates whether the content scales to fit the loader (true), or the loader scales to fit the contents (false). The default value is true. لتحديد المحتوى يناسب جداول الودر وهوحالة ترو او العكس وهوفالز scaleContent: indicates whether the content scales to fit the loader (true), or the loader scales to fit the contents (false). The default value is true. لتحديد المحتوى يناسب جداول الودر وهوحالة ترو او العكس وهوفالز
8
Loader Example Ex) This examples shows how to select an image name from a list and display it in a Loader. Ex) This examples shows how to select an image name from a list and display it in a Loader. 1. Create a new flash file 2. Add a list component into stage and give it (lst) as instance name. 3. Add a button component and give it (btn) as instance name 4. Add a Loader component and give it (lod) as instance name
9
Loader Example 5. Bring 4 images and put them beside the flash file (in the same folder). 6. Add the file names (without extensions) to the label parameter of the list. 7. Add the file names (with extensions) to the data parameter of the list. 8. In the action panel of the first frame add the following statement lst.selectedIndex=0; then test the movie and notice that the first item of the list is selected.
10
Loader Example 9. Add the following statement in the action panel of the first frame and notice the loaded image after playing the movie. lod.contentPath = lst.selectedItem.data 10. In the action panel of the first frame, add the following statements btn.onPress = function() { lod.contentPath = lst.selectedItem.data; }
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.