با استفاده از اکشن میتونم حالت Screen Saver بسازم

adame_haji

Member
من چجوری میتونم تو کلیپ خودم کاری کنم که وقتی به ماوس دست نزدم بعد از 10 ثانیه کلیپ بره رو سیستم Screen Saver ؟
البته نه Screen Saver ویندوز . بلکه یه Screen Saver حودم بسازم و در قالب Movie بچسبونم به فایل

با استفاده از Action ها میشه همچین کاری کرد ؟
 

Security9776

Active Member
سلام ،
دوست عزیز ، شما برای این کار می تونی یک فانکشن تعریف کنی و یک Interval به طوری که این فانکشن در هر لحظه بیاد تغییرات x و y موس رو بگیره و اگر بعد از 10 ثانیه x , y موس تغییر نکرد اون رو Hide کنه و فایل اسکرین سیور رو اجرا کنه .

موفق باشید ، محسن
 

aminflash

Member
adame_haji گفت:
من چجوری میتونم تو کلیپ خودم کاری کنم که وقتی به ماوس دست نزدم بعد از 10 ثانیه کلیپ بره رو سیستم Screen Saver ؟
البته نه Screen Saver ویندوز . بلکه یه Screen Saver حودم بسازم و در قالب Movie بچسبونم به فایل

با استفاده از Action ها میشه همچین کاری کرد ؟

با برنامه MDM Zinc به راحتی می تونی screen saver بسازی
 

aminflash

Member
Security9776 گفت:
سلام ،
دوست عزیز ، شما برای این کار می تونی یک فانکشن تعریف کنی و یک Interval به طوری که این فانکشن در هر لحظه بیاد تغییرات x و y موس رو بگیره و اگر بعد از 10 ثانیه x , y موس تغییر نکرد اون رو Hide کنه و فایل اسکرین سیور رو اجرا کنه .

موفق باشید ، محسن
فلش تابعی بنام interval داره؟ میشه پارامتر ها و طرز کار باهاش رو بگی؟
 

Security9776

Active Member
سلام ،
بله داره . فکر کنم بهترین توضیح مال خود فلش باشه :


Availability

Flash Player 6.

Usage

setInterval( function,interval[,arg1, arg2, ...,argn] )

setInterval(object, methodName,interval[,arg1,arg2, ..., argn] )

Parameters

function A function name or a reference to an anonymous function.

object An object derived from the Object object.

methodName The name of the method to call on the object parameter.

interval The time in milliseconds between calls to the function or methodName parameter.

arg1, arg2, ..., argn Optional parameters passed to the function or methodName parameter.

Returns

An interval identifier that you can pass to clearInterval to cancel the interval.

Description

Action; calls a function or a method or an object at periodic intervals while a movie plays. You can use an interval function to update variables from a database or update a time display.

If interval is less than the movie frame rate (for example, 10 frames per second (fps) is equal to 100 milliseconds), the interval function is called as close to interval as possible. You must use the updateAfterEvent function to make sure that the screen refreshes often enough. If interval is greater than the movie frame rate, the interval function is only called each time the playhead enters a frame in order to minimize the impact each time the screen is refreshed.

The first syntax example above is the default syntax for the setInterval function in the Actions panel in normal mode. To use the second syntax example, you must use the Actions panel in expert mode.

Example

Usage 1:The following example calls an anonymous function every 1000 milliseconds (every 1 second).

setInterval( function(){ trace("interval called"); }, 1000 );

Usage 2: The following example defines two callback functions and calls each of them. Both calls to the setInterval function send the string to the Output window every 1000 milliseconds. The first call to setInterval calls the callback1 function, which contains a trace action. The second call to setInterval passes the string to the function callback2 as a parameter.

function callback1() {
trace("interval called");
}

function callback2(arg) {
trace(arg);
}

setInterval( callback1, 1000 );
setInterval( callback2, 1000, "interval called" );

Usage 3: This example uses a method of an object. You must use this syntax when you want to call a method that is defined for an object. You can only use this syntax in expert mode.

obj = new Object();
obj.interval = function() {
trace("interval function called");
}

setInterval( obj, "interval", 1000 );

obj2 = new Object();
obj2.interval = function(s) {
trace(s);
}
setInterval( obj2, "interval", 1000, "interval function called" );

You must use the second form of the setInterval syntax to call a method of an object, as follows:

setInterval( obj2, "interval", 1000, "interval function called" );

See also

clearInterval
updateAfterEvent


اگر نیاز به توضیح بیشتری داشتید بگید تا کمکتون کنم .
موفق باشید و پیروز ، محسن
 

adame_haji

Member
دمت گرم برادر اگه میشه یه نمونه خودتون یه فایل با کد مربوطه بسازید و اینجا بزارید
من با نگاه متوجه میشم .
قول میدم بعد متوجه شدن آموزشش رو خودم با اسم شما اینجا بزاریم
ممنون
یا علی
 

aminflash

Member
باز هم میگم... برنامه MDM به راحتی فایل های فلش رو به screensaver تبدیل می کنه ... به فرض اگه با فلش خالی هم بشه همچین کاری کرد مسلما اون دیگه screen saver نیست!
 

adame_haji

Member
امین جان من خوندم حرف شما رو ولی شما نخوندی ببینی تاپیک رو برا چی زدم

من یه دموی تبلیغاتی میخوام با فلش بزنم و میخوام وقتی کاربر توی این دمو به مدت 10 ثانیه دست به موس نزنه برنامه بره رو حالت اسکرین سیور که توی این اسکرین سیور میخوام نقشه جغرافی محل رو بگنجونم

یا علی
 

aminflash

Member
از تابع زیر استفاده کن:
HTML:
function timer() {
	t = getTimer();
	if (t>10000) {
		//dastoor dar in ghesmat
	}
}
setInterval(timer, 10);
 

aminflash

Member
چه با امیر بوده چه امین من به نفع امیر کنار می رم چون بیشتر بارشه!!:mrgreen:
 

amir_s

Active Member
aminflash گفت:
چه با امیر بوده چه امین من به نفع امیر کنار می رم چون بیشتر بارشه!!:mrgreen:
ممنون ! شما لطف داری ... شما خودت استادی !

لطفا دیگه تاپیک رو شلوغ نکنید ...
 

جدیدترین ارسال ها

بالا